[Bf-python] blender and external editors - workflow?

Marc Weber marco-oweber at gmx.de
Fri Aug 20 14:30:08 CEST 2010


Excerpts from Marc Weber's message of Fri Aug 20 09:20:20 +0200 2010:
>   File "/home/marc/mwr/vim-addon-blender-scripting/blender_server.py", line 59, in blenderServer
>     sys.exit(1)
> SystemExit: 1

This was caused by a sys.exit() call I forgot to remove. So not using a
background thread works fine now.
Don't ask me why it popped up whenever you typed *any* line.
Maybe the error is not cleared by blender if was caused in a thread (?)


What could be the reason that context.scene has type NoType?

I tracked it down:
after s.accept
context.scene (which was imported by  from bpy import context) is gone

    print("in thread 2 "+str(type(context.scene)))
    try:
      # receive requests loop:
      while True:
        conn, addr = s.accept()
        print("in thread 3 "+str(type(context.scene)))

Everything is working fine but this small detail?

scene is only set to NoneType if s.socket is called in a thread

Marc Weber



More information about the Bf-python mailing list