Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_access.c
| Show First 20 Lines • Show All 554 Lines • ▼ Show 20 Lines | const char *RNA_struct_ui_description_raw(const StructRNA *type) | ||||
| return type->description; | return type->description; | ||||
| } | } | ||||
| const char *RNA_struct_translation_context(const StructRNA *type) | const char *RNA_struct_translation_context(const StructRNA *type) | ||||
| { | { | ||||
| return type->translation_context; | return type->translation_context; | ||||
| } | } | ||||
| PropertyRNA *RNA_struct_name_property(StructRNA *type) | PropertyRNA *RNA_struct_name_property(const StructRNA *type) | ||||
| { | { | ||||
| return type->nameproperty; | return type->nameproperty; | ||||
| } | } | ||||
| PropertyRNA *RNA_struct_iterator_property(StructRNA *type) | PropertyRNA *RNA_struct_iterator_property(StructRNA *type) | ||||
| { | { | ||||
| return type->iteratorproperty; | return type->iteratorproperty; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,188 Lines • ▼ Show 20 Lines | |||||
| char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, | char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, | ||||
| char *fixedbuf, int fixedlen, int *r_len) | char *fixedbuf, int fixedlen, int *r_len) | ||||
| { | { | ||||
| char *buf; | char *buf; | ||||
| int length; | int length; | ||||
| BLI_assert(RNA_property_type(prop) == PROP_STRING); | BLI_assert(RNA_property_type(prop) == PROP_STRING); | ||||
| if (!ptr->data) { | |||||
| return NULL; | |||||
| } | |||||
| length = RNA_property_string_length(ptr, prop); | length = RNA_property_string_length(ptr, prop); | ||||
| if (length + 1 < fixedlen) | if (length + 1 < fixedlen) | ||||
| buf = fixedbuf; | buf = fixedbuf; | ||||
| else | else | ||||
| buf = MEM_mallocN(sizeof(char) * (length + 1), "RNA_string_get_alloc"); | buf = MEM_mallocN(sizeof(char) * (length + 1), "RNA_string_get_alloc"); | ||||
| ▲ Show 20 Lines • Show All 4,351 Lines • Show Last 20 Lines | |||||