Ok here&#39;s a patch for an idproperty array type. &nbsp;I&#39;ve not actually tested it; tell me what you think.<div><br></div><div>Joe<br><br><div class="gmail_quote">On Sat, Dec 27, 2008 at 11:54 PM, joe <span dir="ltr">&lt;<a href="mailto:joeedh@gmail.com">joeedh@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The group type was originally envisioned as a map. &nbsp;What we need here, it sounds like, is a version of a group that acts as an array. &nbsp;A new type that would do arrays of id properties. &nbsp;The existing array type would than simply be &quot;numerical arrays.&quot;<div>

<br></div><div>Anyway, I&#39;ll try and prototype some code. &nbsp;It shouldn&#39;t be too hard to add a new type that implements an array of ID properties.</div><div><br></div><div><font color="#888888">Joe</font><div><div></div>
<div class="Wj3C7c"><br><br><div class="gmail_quote">On Sat, Dec 27, 2008 at 11:17 PM, Brecht Van Lommel <span dir="ltr">&lt;<a href="mailto:brecht@blender.org" target="_blank">brecht@blender.org</a>&gt;</span> wrote:<br>

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