<div dir="ltr"><div>Ah of course, I should have guessed that one.</div><div>Thanks,<br></div><div>Gonçalo<br></div><div><br></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 15, 2019 at 7:53 PM Campbell Barton <<a href="mailto:ideasman42@gmail.com">ideasman42@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Sep 13, 2019 at 03:14:56PM -0300, Goncalo Morgado wrote:<br>
> I see.<br>
> What would be the right path to visualise the CollectionProperty items in a<br>
> panel? It is my understanding that adding a layout.prop() pointing to the<br>
> CollectionProperty will only show the number of items, but not the actual<br>
> values.<br>
<br>
You can loop over each item in the collection and use layout.prop()<br>
passing the item as the first argument.<br>
These can be shown is in UILists too.<br>
<br>
><br>
> Thanks again,<br>
> Gonçalo<br>
><br>
><br>
><br>
><br>
> On Fri, Sep 13, 2019 at 1:03 PM Cambell Barton <<a href="mailto:ideasman42@gmail.com" target="_blank">ideasman42@gmail.com</a>> wrote:<br>
><br>
> > This isn't supported. The closest thing we have to this is a collection<br>
> > property, where you can define a collection of PropertyGroup items.<br>
> > These can be an arbitrary size.<br>
> ><br>
> > On 2019-09-13 23:37, Goncalo Morgado wrote:<br>
> > > Hello,<br>
> > ><br>
> > > Quick question on VectorProperty's:<br>
> > ><br>
> > > I've created a scene property named a:<br>
> > > bpy.types.Scene.a = bpy.props.IntVectorProperty(<br>
> > >      name='a',<br>
> > >      description="Frequencies",<br>
> > >      size=2,<br>
> > >      default=[1, 2]<br>
> > > )<br>
> > ><br>
> > > And now I would like to update it's size dynamically.<br>
> > > The idea is to have a panel showing an array of integers which length<br>
> > > and values the user would change.<br>
> > ><br>
> > > I can probably get away with deleting the property and creating a new<br>
> > > one with the same name, with the new size. If that's the only solution,<br>
> > > and since my IntVectorProperty actually belongs to a PropertyGroup, how<br>
> > > would I be able to delete the IntVectorProperty and create a new one<br>
> > > inside the PropertyGroup?<br>
> > ><br>
> > > I hope this makes sense, let me know if you find the question confusing.<br>
> > ><br>
> > > Thanks in advance,<br>
> > > Gonçalo<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > Bf-python mailing list<br>
> > > <a href="mailto:Bf-python@blender.org" target="_blank">Bf-python@blender.org</a><br>
> > > <a href="https://lists.blender.org/mailman/listinfo/bf-python" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-python</a><br>
> > ><br>
> > _______________________________________________<br>
> > Bf-python mailing list<br>
> > <a href="mailto:Bf-python@blender.org" target="_blank">Bf-python@blender.org</a><br>
> > <a href="https://lists.blender.org/mailman/listinfo/bf-python" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-python</a><br>
> ><br>
<br>
> _______________________________________________<br>
> Bf-python mailing list<br>
> <a href="mailto:Bf-python@blender.org" target="_blank">Bf-python@blender.org</a><br>
> <a href="https://lists.blender.org/mailman/listinfo/bf-python" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-python</a><br>
_______________________________________________<br>
Bf-python mailing list<br>
<a href="mailto:Bf-python@blender.org" target="_blank">Bf-python@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/bf-python" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-python</a><br>
</blockquote></div></div>