Add an array attribute to bones

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
hdd
Posts: 0
Joined: Tue Aug 30, 2005 6:24 pm

Add an array attribute to bones

Post by hdd »

Hi Devs!

I'm trying to add an array of attributes in the bones ...
I've modifyed the bone struct in DNA_armature_type.h in this way:

Code: Select all

typedef struct Bone {
[....]
float          pose[8];
}Bone;
then I've added an entry in rna_armature.c :

Code: Select all

   
prop= RNA_def_property(srna, "pose", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_array(prop, 8);
RNA_def_property_ui_text(prop, "Bone Pose", "poses for bone"); 
once compiled the result is :
Image

now the question is:

how to set the name for the array entity?
I'd like to have :

in , out , up , down.... instead 1 , 2 , 3 etc...

someone can point me in the right direction ?
thanks !

L.

Post Reply