Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_access.c
| Show First 20 Lines • Show All 1,409 Lines • ▼ Show 20 Lines | |||||
| int RNA_property_string_maxlength(PropertyRNA *prop) | int RNA_property_string_maxlength(PropertyRNA *prop) | ||||
| { | { | ||||
| StringPropertyRNA *sprop = (StringPropertyRNA *)rna_ensure_property(prop); | StringPropertyRNA *sprop = (StringPropertyRNA *)rna_ensure_property(prop); | ||||
| return sprop->maxlength; | return sprop->maxlength; | ||||
| } | } | ||||
| StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop) | StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop) | ||||
| { | { | ||||
| if (prop->magic != RNA_MAGIC) { | |||||
| const IDProperty *idprop = (IDProperty *)prop; | |||||
| if (idprop->type == IDP_ID) { | |||||
| const IDPropertyUIDataID *ui_data = (const IDPropertyUIDataID *)idprop->ui_data; | |||||
| if (ui_data) { | |||||
| return ID_code_to_RNA_type(ui_data->id_type); | |||||
| } | |||||
| } | |||||
| } | |||||
| prop = rna_ensure_property(prop); | prop = rna_ensure_property(prop); | ||||
| if (prop->type == PROP_POINTER) { | if (prop->type == PROP_POINTER) { | ||||
| PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop; | PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop; | ||||
| if (pprop->type_fn) { | if (pprop->type_fn) { | ||||
| return pprop->type_fn(ptr); | return pprop->type_fn(ptr); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 5,432 Lines • Show Last 20 Lines | |||||