[Bf-committers] id property changes

joe joeedh at gmail.com
Wed Nov 19 02:26:24 CET 2008


What should we do about property getters?  I can think of two designs for
them, plus the one in the 2.5 branch:

1. Pass in a default value to the getter, which is used to create the
property (if necessary) or replace any incompatible existing ones (for
example, floats and ints and doubles might be considered compatible, but
floats and arrays would not).
2. Same as above, only instead of simply deleting the incompatible
properties, rename them.
3. The solution in the branch, where the functions return a status
indicator, and you have to pass in a pointer to some data that gets filled.

Of the three, I think #2 is safest, #1 is easiest, but #3 might be the best
way to go.

Joe

On Sun, Nov 16, 2008 at 2:23 PM, Brecht Van Lommel <brecht at blender.org>wrote:

> Hi,
>
> > Wrapping ID properties with RNA is an interesting idea. . .  From what
> > you're saying it sounds as if you'd like to use the RNA data API to
> > access both SDNA struct properties and ID properties?  That would
> > require the RNA api to support runtime property data (instead of
> > generating accessors at compile time, eh that is what it does,
> > right?), which sounds like it would be an entirely different set of
> > code (from what I can figure).
>
> It's not a big change, will commit support for that soon. With RNA a C
> API with accessor functions for all properties could be autogenerated,
> but that is not done currently.. there's no immediate application for
> that as far as I can see, I think it would be mostly useful for C
> plugins at some point.
>
> > Do you have any of your RNA code online anywhere, or in the 2.5
> > branch?
>
> It's in the RNA branch, there is a viewer for data using RNA in the
> outliner, and docs in the wiki:
> http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
>
> Brecht.
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-committers/attachments/20081118/bc4669e1/attachment.htm 


More information about the Bf-committers mailing list