[Bf-python] Problem with Registry module.

Willian Padovani Germano wgermano at ig.com.br
Sun Feb 27 16:08:46 CET 2005


Hi Joe,

joeedh wrote:

> Hi.  I've noticed that if I assign a class to a Registry dict, 
> whenever one of said classes's member functions is executes it 
> inexplicably is unable to find python's, much less Blender's, 
> namespaces (when it executes the classes's function code).

Saving a function in the Registry dict will not keep the context (global 
dictionary of the script where it was defined) saved there, too.  So you 
either have to import and define all you need *inside* the function or 
save the dictionary there, too.

But maybe it'd be better to keep a gui script running that will serve to 
keep the global dictionary available.  The window with the gui doesn't 
even need to be visible and it can be a blank gui or one with a msg, 
some info about your gui lib, etc.

-- 
Willian




More information about the Bf-python mailing list