Page 1 of 1

Help with Blender addon Development

Posted: Tue Aug 13, 2013 2:17 am
by brotherlu
Hi guys,

I am trying to create a blender addon for engineers to import airfoils for modeling. I am however stuck with creating the interface in blender.

I would like to add a button the would allow me to continuously add a string property. I included an image of the panel so far.

Also should I be using a CollectionProperty() rather a StringProperty() ?

The code is available on Github.
Also any feedback with respect to the code would be greatly appreciated.
Thank you for assistance

Posted: Fri Aug 16, 2013 3:27 pm
by CoDEmanX
what do you mean by continously? Do you wanna be able to add an arbitrary number of string properties? Then use a CollectionProperty, the base type bpy.types.PropertyGroup comes with a StringProperty "name" already which you can use.

Posted: Sat Aug 17, 2013 6:47 pm
by brotherlu
CoDEmanX wrote:what do you mean by continously? Do you wanna be able to add an arbitrary number of string properties? Then use a CollectionProperty, the base type bpy.types.PropertyGroup comes with a StringProperty "name" already which you can use.
Thanks CoDEmanX, it is exactly what I wanted and works well. I have come to another stumbling block, I created a PropertyGroup and included the StringProperty. And then I tried to used template_list, however no matter what I try the template list does not populate after I add an Item. The code is here. What am I doing wrong?

Thanks

Posted: Sun Aug 18, 2013 12:53 am
by CoDEmanX
You got two int props for the list index, one should be enough

Not sure why it doesnt populate, any errors in sys console?