[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21958] branches/blender2.5/blender/source /blender/editors: 2.5 - Start of Make Proxy Operator

Brecht Van Lommel brecht at blender.org
Tue Jul 28 15:18:29 CEST 2009


Hi Joshua,

I think it is best to not store pointers to specific objects in
operators, no other operator does this. What you can do is like
OBJECT_OT_group_add, creating a dynamic enum with the groups in it.

I'm not sure what the ideal solution is, but until now we have avoided
operators being linked to any data in the blender database, to make it
possible to redo them and create macros. Not that this kind of operator
will work well a macro anyway, but I guess we the enum will work well
enough.

Brecht.

On Tue, 2009-07-28 at 05:54 +0200, Joshua Leung wrote:
> Revision: 21958
>           http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21958
> Author:   aligorith
> Date:     2009-07-28 05:54:40 +0200 (Tue, 28 Jul 2009)
> 
> Log Message:
> -----------
> 2.5 - Start of Make Proxy Operator 
> 
> The code has been ported to the operator+rna system, however, there are currently issues related to how the pointer-rna's work for use as operator properties. (NOTE: RNA_property_pointer_set only takes into account builtin props for now, but not id-props, while the corresponding get method seems to take them into account)
> 
> The alternative to using pointer-properties for the operator, is to store strings and look up the relevant objects later, but there should be a nicer way...




More information about the Bf-committers mailing list