Help with Blender addon Development

An open space where people who use Blender in an academic environment can share progress and the typical problems and needs of academic environments.

Moderators: jesterKing, stiv

brotherlu
Posts: 2
Joined: Tue Aug 13, 2013 1:32 am
Location: Montreal

Help with Blender addon Development

Postby brotherlu » Tue Aug 13, 2013 2:17 am

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

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Fri Aug 16, 2013 3:27 pm

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.
I'm sitting, waiting, wishing, building Blender in superstition...

brotherlu
Posts: 2
Joined: Tue Aug 13, 2013 1:32 am
Location: Montreal

Postby brotherlu » Sat Aug 17, 2013 6:47 pm

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

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Sun Aug 18, 2013 12:53 am

You got two int props for the list index, one should be enough

Not sure why it doesnt populate, any errors in sys console?
I'm sitting, waiting, wishing, building Blender in superstition...


Return to “Academic & Research”

Who is online

Users browsing this forum: No registered users and 0 guests