Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_access.c
| Show First 20 Lines • Show All 716 Lines • ▼ Show 20 Lines | if (prop_test == (PropertyRNA *)itemptr.data) { | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| RNA_PROP_END; | RNA_PROP_END; | ||||
| return found; | return found; | ||||
| } | } | ||||
| unsigned int RNA_struct_count_properties(StructRNA *srna) | |||||
| { | |||||
| PointerRNA struct_ptr; | |||||
| unsigned int counter = 0; | |||||
| RNA_pointer_create(NULL, srna, NULL, &struct_ptr); | |||||
| /* The way this works is totally primitive and evil :) */ | |||||
| RNA_STRUCT_BEGIN (&struct_ptr, prop) | |||||
| { | |||||
| counter++; | |||||
| UNUSED_VARS(prop); | |||||
| } | |||||
| RNA_STRUCT_END; | |||||
| return counter; | |||||
| } | |||||
| /* low level direct access to type->properties, note this ignores parent classes so should be used with care */ | /* low level direct access to type->properties, note this ignores parent classes so should be used with care */ | ||||
| const struct ListBase *RNA_struct_type_properties(StructRNA *srna) | const struct ListBase *RNA_struct_type_properties(StructRNA *srna) | ||||
| { | { | ||||
| return &srna->cont.properties; | return &srna->cont.properties; | ||||
| } | } | ||||
| PropertyRNA *RNA_struct_type_find_property(StructRNA *srna, const char *identifier) | PropertyRNA *RNA_struct_type_find_property(StructRNA *srna, const char *identifier) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 6,504 Lines • Show Last 20 Lines | |||||