[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18086] branches/blender2.5/blender/source /blender: RNA:
Brecht Van Lommel
brecht at blender.org
Mon Dec 29 09:58:26 CET 2008
Hi,
I think this can work too yes, it's a superset of the functionality of
IDP_GROUP arrays so I can change over the RNA code to use this if you
prefer this implementation in ID properties.
Brecht.
On Sun, 2008-12-28 at 02:13 -0700, joe wrote:
> Ok here's a patch for an idproperty array type. I've not actually
> tested it; tell me what you think.
>
>
> Joe
>
> On Sat, Dec 27, 2008 at 11:54 PM, joe <joeedh at gmail.com> wrote:
> 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
>
>
>
>
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
More information about the Bf-committers
mailing list