On Mon, Sep 5, 2011 at 11:07 AM, Terry Brown <[email protected]> wrote:
> Here's my Leo/Blender integration script :-)

Yes.  There are almost too many ways got get the job done.

Another way would simply be to have Leo write files to the blender
scripts folder, or the addons or modules subfolders.

> Basically a forced import of the module being developed, a simple
> import mnbba02; imp.reload(mnbba02) doesn't work because it runs the
> code twice the first time, and import mnbba02 by itself only works once.
>
> Place this in the Blender *Text* window (not Python console), and click
> the Run Script button in blender to run.  print() output goes to the
> terminal window which launched Blender.

I think you could also do:

try:
    del mnbba02
except Exception:
    pass

import mnbba02

> But autocompletion in Leo would sure be nice.

Yes.

I'm also playing around with various ways of initing blender on
startup.  The -P option works.  But apparently blender/Lib/site.py is
*not* executed on startup, so neither is sitecustomize.py.  Indeed
importing the site module causes any message printed by
sitecustomize.py to be displayed (the first time only, of course).

It's a bit strange...

I feel somewhat like the early days of Leo/IPython integration.  There
is a sense that relatively small hacks could produce great things.

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.

Reply via email to