On Mon, Sep 12, 2011 at 5:44 PM, Edward K. Ream <[email protected]> wrote:
> Now the door is unlocked. We can import sys in the same way, add > paths to sys.path, and use the *embedded* imp module to load the 'bpy' > module. If all goes as expected, the bpy should be able to import the > '_bpy' module. Stay tuned... Alas, not so. The problem is that Blender's init logic creates the _bpy module, and to do that essentially all of Blender's init logic must already have taken place. The init logic consists of main() in creator.c, BPY_python_start() in bpy_interface.py, and BPy_init_modules() in bpy.c. This is extremely complicated code: it's out of the question to try to duplicate the code from Python using ctags. Furthermore, even if we could run main() from Python, it's not at clear that we could then access the *inited* modules from the DLL's. One could well imagine a Python bridge into Blender, but that bridge must be created by *C* code. It is just barely possible that the bridge already exists, but I haven't seen any evidence of it yet. In short, it's unlikely that we can base the autocompletion on a properly imported bpy module. We *can* still provide support for Blender-oriented autocompletion in Leo, but it looks like we shall have to use codewise to do it. Even this way may not be trivial--we may have to use dummy description files to drive ctags. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
