[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18086] branches/blender2.5/blender/source /blender: RNA:

joe joeedh at gmail.com
Sun Dec 28 07:54:47 CET 2008


The group type was originally envisioned as a map.  What we need here, it
sounds like, is a version of a group that acts as an array.  A new type that
would do arrays of id properties.  The existing array type would than simply
be "numerical arrays."
Anyway, I'll try and prototype some code.  It shouldn't be too hard to add a
new type that implements an array of ID properties.

Joe

On Sat, Dec 27, 2008 at 11:17 PM, Brecht Van Lommel <brecht at blender.org>wrote:

>
> Hi,
>
> joe wrote:
> > Could you explain what you need it for?  So I can see where it fits into
> > the big picture :)  It just seems a little klunky to me, having a
> > collection of id properties collections.
>
> I need it to implement an RNA collection of structs. This how I see
> the correspondences:
>
> ID property group ~ C struct        ~ RNA struct
> ID property       ~ C struct member ~ RNA property
> ID array property ~ C array or list ~ RNA collection property
>
> Now, I guess your interpretation of an ID property group is that it is
> both a struct and a collection. I could try to implement RNA
> collections as ID property groups, but it's a bit messy given that I
> would have to work with string keys which I do not have and would need
> to create with sprintf("%d", index) or so.
>
> Brecht.
>
> > On Sat, Dec 27, 2008 at 12:49 AM, Brecht Van Lommel <brecht at blender.org
> > <mailto:brecht at blender.org>> wrote:
> >
> >     Hi,
> >
> >     joe wrote:
> >      > What's the design rationale of supporting arrays of group
> properties?
> >      >  Seems supporting arrays of id properties in general would be a
> >     cleaner
> >      > solution, if it's needed. . .
> >
> >     Can you explain the difference to me? The array before supported
> >     subtypes IDP_INT, ID_FLOAT and IDP_DOUBLE. The logical extension
> >     seemed to me to just add IDP_GROUP. Isn't the end result basically
> the
> >     same?
> >
> >     Well, it could be interesting to support mixed id property types in a
> >     single array, but that is not how the array was implemented here.
> >     Doing it that way would have been inconsistent with the way IDP_INT,
> >     IDP_FLOAT and IDP_DOUBLE already work.
> >
> >     Brecht.
> >     _______________________________________________
> >     Bf-committers mailing list
> >     Bf-committers at blender.org <mailto:Bf-committers at blender.org>
> >     http://lists.blender.org/mailman/listinfo/bf-committers
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-committers
>
> _______________________________________________
> 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/20081227/a916e561/attachment.htm 


More information about the Bf-committers mailing list