[Bf-committers] PyRNA type definition changes (postpone beta until end of week)

Bassam Kurdali bkurdali at freefactory.org
Thu Sep 9 04:41:14 CEST 2010


Hi Campbell
<--snip>
> 
> Another change to help our api be less confusing is to have operator
> properties directly accessible.
> 
> class Operator(bpy.types.Operator):
>     myprop = bpy.props.BoolProperty()
>    def execute(self, context):
> ... this line
>         print(self.properties.myprop)
> ...could be written as
>         print(self.myprop)
> 
> At the moment print(self.myprop) will print the property definition,
> but not the property (which is what you want!)
> I'd like to keep self.properties available since its how operators
> work internally and can be passed as keyword arguments, so this change
> is mostly for convent access.
> 
The question that came to mind here (as I mentioned on irc) is that if
you *did* want to print/access the property definition, how would you do
so if self.myprop just returns the value?
cheers
Bassam
PS- thanks for the mail, it cleared up some things that had been long
confusing me re. the api.




More information about the Bf-committers mailing list