Page 1 of 1

Add an array attribute to bones

Posted: Wed May 06, 2009 2:17 pm
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.