[Bf-python] ID Properties and python hook scripts

Campbell Barton cbarton at metavr.com
Wed Oct 11 07:51:30 CEST 2006


Hi Joe,
Most of this I see as being the way to go though Im not sure about 
pre-compiled scripts (maybe just use an MD5 ?)

After ID props are done, then python panels will be a great way to 
access the ID props and make them usefull.

Id prefer to see a wrapped PyPanel before settling on specifics,

Scriptlinks for initializing and cleaning up can also be done separately 
(Undo/Redo scriptlink?)

I tend to think about these things as a sequence of steps.
* Add ID Props as well as a Python API
* Make a Python GUI to edit the props so it can be used by normal people 
(though far from ideal) - commit this to CVS
* Add Python Panels, as well as a way that the buttons windows can 
associate pyPanels with say the 'render' buttons.
* .start writing scripts and adding tools that use the above... make 
sure they can work well together, add scriptlinks etc where needed.


Joe Eagar wrote:
> Hi. I was thinking about ID properties and stuff, and I realized we're 
> going to need a way to register trusted scripts.  Some sort of generic 
> system that'd work for scripts drawing custom ID properties guis and 
> also normal scripts.
>
> Basically, a trusted registered script can do these things:
> * It can register a function to call whenever a .blend is loaded (e.g. 
> a init/re-init function).
> * It can register space handler scripts and scriptlinks, which are in 
> their own class that can't be disabled (though I think an option to 
> disable the whole trusted script system might be a good idea if people 
> want it :) )
> * It can register a clean-up function that gets called when a 
> different .blend is loaded.
>
> The trusted script system would also be extendable, so for example ID 
> properties could use it to handle custom-gui scripts for ID properties 
> (and wa-hoo! finally panels will have to be wrapped for this to all 
> work! fun!).
>
> My ideas for implementation, is that all trusted scripts are 
> prebytecompiled (with some way to get them to recompile themselves, 
> not sure how).  The system would store the list of registered trusted 
> scripts in a special .B.scripts.
>
> The reasons ID properties custom guis needs this, is that obviously 
> you don't want your renderman material settings to disappear whenever 
> you disable scriptlinks :)
>
> Joe
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list