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

Alex Fraser alex at phatcore.com
Thu Sep 9 02:18:19 CEST 2010


Hi Campbell,

On Thu, Sep 9, 2010 at 9:18 AM, Campbell Barton <ideasman42 at gmail.com> wrote:
> --- Proposed solution
>
> Follow the way operators work, treat properties as class attributes so...
>   bpy.types.Scene.BoolProperty(attr="myprop")
>   bpy.types.Scene.RemoveProperty(attr="myprop")
>  ...is replaced by
>   bpy.types.Scene.myprop = bpy.props.BoolProperty()
>   del bpy.types.Scene.myprop

It is certainly less verbose, but didn't we recently move away from
treating properties as attributes in the BGE? For consistency, maybe
it should be:

   bpy.types.Scene["myprop"] = bpy.props.BoolProperty()
   del bpy.types.Scene["myprop"]

On the other hand, using attributes might be better if properties are
more formally defined than in the BGE.

Cheers,
Alex


More information about the Bf-committers mailing list