That'd be nice, yes.<div><br></div><div>Joe<br><br><div class="gmail_quote">On Mon, Dec 29, 2008 at 1:58 AM, Brecht Van Lommel <span dir="ltr"><<a href="mailto:brecht@blender.org">brecht@blender.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
<br>
I think this can work too yes, it's a superset of the functionality of<br>
IDP_GROUP arrays so I can change over the RNA code to use this if you<br>
prefer this implementation in ID properties.<br>
<font color="#888888"><br>
Brecht.<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Sun, 2008-12-28 at 02:13 -0700, joe wrote:<br>
> Ok here's a patch for an idproperty array type. I've not actually<br>
> tested it; tell me what you think.<br>
><br>
><br>
> Joe<br>
><br>
> On Sat, Dec 27, 2008 at 11:54 PM, joe <<a href="mailto:joeedh@gmail.com">joeedh@gmail.com</a>> wrote:<br>
> The group type was originally envisioned as a map. What we<br>
> need here, it sounds like, is a version of a group that acts<br>
> as an array. A new type that would do arrays of id<br>
> properties. The existing array type would than simply be<br>
> "numerical arrays."<br>
><br>
><br>
> Anyway, I'll try and prototype some code. It shouldn't be too<br>
> hard to add a new type that implements an array of ID<br>
> properties.<br>
><br>
><br>
> Joe<br>
><br>
><br>
><br>
> On Sat, Dec 27, 2008 at 11:17 PM, Brecht Van Lommel<br>
> <<a href="mailto:brecht@blender.org">brecht@blender.org</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> joe wrote:<br>
> > Could you explain what you need it for? So I can<br>
> see where it fits into<br>
> > the big picture :) It just seems a little klunky to<br>
> me, having a<br>
> > collection of id properties collections.<br>
><br>
><br>
> I need it to implement an RNA collection of structs.<br>
> This how I see<br>
> the correspondences:<br>
><br>
> ID property group ~ C struct ~ RNA struct<br>
> ID property ~ C struct member ~ RNA property<br>
> ID array property ~ C array or list ~ RNA collection<br>
> property<br>
><br>
> Now, I guess your interpretation of an ID property<br>
> group is that it is<br>
> both a struct and a collection. I could try to<br>
> implement RNA<br>
> collections as ID property groups, but it's a bit<br>
> messy given that I<br>
> would have to work with string keys which I do not<br>
> have and would need<br>
> to create with sprintf("%d", index) or so.<br>
><br>
> Brecht.<br>
><br>
> > On Sat, Dec 27, 2008 at 12:49 AM, Brecht Van Lommel<br>
> <<a href="mailto:brecht@blender.org">brecht@blender.org</a><br>
><br>
> > <mailto:<a href="mailto:brecht@blender.org">brecht@blender.org</a>>> wrote:<br>
> ><br>
> > Hi,<br>
> ><br>
> > joe wrote:<br>
> > > What's the design rationale of supporting<br>
> arrays of group properties?<br>
> > > Seems supporting arrays of id properties in<br>
> general would be a<br>
> > cleaner<br>
> > > solution, if it's needed. . .<br>
> ><br>
> > Can you explain the difference to me? The array<br>
> before supported<br>
> > subtypes IDP_INT, ID_FLOAT and IDP_DOUBLE. The<br>
> logical extension<br>
> > seemed to me to just add IDP_GROUP. Isn't the<br>
> end result basically the<br>
> > same?<br>
> ><br>
> > Well, it could be interesting to support mixed<br>
> id property types in a<br>
> > single array, but that is not how the array was<br>
> implemented here.<br>
> > Doing it that way would have been inconsistent<br>
> with the way IDP_INT,<br>
> > IDP_FLOAT and IDP_DOUBLE already work.<br>
> ><br>
> > Brecht.<br>
> > _______________________________________________<br>
> > Bf-committers mailing list<br>
><br>
> > <a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
> <mailto:<a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a>><br>
> ><br>
> <a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
> ><br>
> ><br>
> ><br>
><br>
> ><br>
> ------------------------------------------------------------------------<br>
><br>
> ><br>
> > _______________________________________________<br>
> > Bf-committers mailing list<br>
> > <a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
> ><br>
> <a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
><br>
> _______________________________________________<br>
> Bf-committers mailing list<br>
> <a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
> <a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Bf-committers mailing list<br>
> <a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
> <a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
<br>
_______________________________________________<br>
Bf-committers mailing list<br>
<a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
</div></div></blockquote></div><br></div>