Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_access.c
| Show First 20 Lines • Show All 3,602 Lines • ▼ Show 20 Lines | |||||
| /* this is the length without \0 terminator */ | /* this is the length without \0 terminator */ | ||||
| int RNA_property_string_default_length(PointerRNA *UNUSED(ptr), PropertyRNA *prop) | int RNA_property_string_default_length(PointerRNA *UNUSED(ptr), PropertyRNA *prop) | ||||
| { | { | ||||
| StringPropertyRNA *sprop = (StringPropertyRNA *)prop; | StringPropertyRNA *sprop = (StringPropertyRNA *)prop; | ||||
| BLI_assert(RNA_property_type(prop) == PROP_STRING); | BLI_assert(RNA_property_type(prop) == PROP_STRING); | ||||
| if (sprop->defaultvalue) { | |||||
| return strlen(sprop->defaultvalue); | return strlen(sprop->defaultvalue); | ||||
| } | } | ||||
| return 0; | |||||
| } | |||||
| int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop) | int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop) | ||||
| { | { | ||||
| EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop; | EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop; | ||||
| IDProperty *idprop; | IDProperty *idprop; | ||||
| BLI_assert(RNA_property_type(prop) == PROP_ENUM); | BLI_assert(RNA_property_type(prop) == PROP_ENUM); | ||||
| if ((idprop = rna_idproperty_check(&prop, ptr))) { | if ((idprop = rna_idproperty_check(&prop, ptr))) { | ||||
| ▲ Show 20 Lines • Show All 4,583 Lines • Show Last 20 Lines | |||||