}
else if(ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
PointerRNA pptr, propptr, *ptr= (PointerRNA*)idv;
- PropertyRNA *prop, *iterprop, *nameprop;
+ PropertyRNA *prop, *iterprop;
PropertyType proptype;
PropertySubType propsubtype;
int a, tot;
}
else if(type == TSE_RNA_STRUCT) {
/* struct */
- nameprop= RNA_struct_name_property(ptr->type);
+ te->name= RNA_struct_name_get_alloc(ptr, NULL, 0);
- if(nameprop) {
- te->name= RNA_property_string_get_alloc(ptr, nameprop, NULL, 0);
+ if(te->name)
te->flag |= TE_FREE_NAME;
- }
else
te->name= (char*)RNA_struct_ui_name(ptr->type);
TreeElement *tem, *temnext, *temsub;
TreeStoreElem *tse, *tsenext;
PointerRNA *ptr, *nextptr;
- PropertyRNA *prop, *nameprop;
+ PropertyRNA *prop;
char *newpath=NULL;
/* optimise tricks:
newpath= RNA_path_append(*path, ptr, prop, 0, NULL);
}
else if(RNA_property_type(prop) == PROP_COLLECTION) {
+ char buf[128], *name;
+
temnext= (TreeElement*)(ld->next->data);
tsenext= TREESTORE(temnext);
nextptr= &temnext->rnaptr;
- nameprop= RNA_struct_name_property(nextptr->type);
+ name= RNA_struct_name_get_alloc(nextptr, buf, sizeof(buf));
- if(nameprop) {
+ if(name) {
/* if possible, use name as a key in the path */
- char buf[128], *name;
- name= RNA_property_string_get_alloc(nextptr, nameprop, buf, sizeof(buf));
-
newpath= RNA_path_append(*path, NULL, prop, 0, name);
if(name != buf)