Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_rna.c
| Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | static int rna_idproperty_known(CollectionPropertyIterator *iter, void *data) | ||||
| IDProperty *idprop = (IDProperty *)data; | IDProperty *idprop = (IDProperty *)data; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| StructRNA *ptype = iter->builtin_parent.type; | StructRNA *ptype = iter->builtin_parent.type; | ||||
| /* function to skip any id properties that are already known by RNA, | /* function to skip any id properties that are already known by RNA, | ||||
| * for the second loop where we go over unknown id properties */ | * for the second loop where we go over unknown id properties */ | ||||
| do { | do { | ||||
| for (prop = ptype->cont.properties.first; prop; prop = prop->next) | for (prop = ptype->cont.properties.first; prop; prop = prop->next) | ||||
| if ((prop->flag & PROP_BUILTIN) == 0 && STREQ(prop->identifier, idprop->name)) | if ((prop->flag_internal & PROP_INTERN_BUILTIN) == 0 && STREQ(prop->identifier, idprop->name)) | ||||
| return 1; | return 1; | ||||
| } while ((ptype = ptype->base)); | } while ((ptype = ptype->base)); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| static int rna_property_builtin(CollectionPropertyIterator *UNUSED(iter), void *data) | static int rna_property_builtin(CollectionPropertyIterator *UNUSED(iter), void *data) | ||||
| { | { | ||||
| PropertyRNA *prop = (PropertyRNA *)data; | PropertyRNA *prop = (PropertyRNA *)data; | ||||
| /* function to skip builtin rna properties */ | /* function to skip builtin rna properties */ | ||||
| return (prop->flag & PROP_BUILTIN); | return (prop->flag_internal & PROP_INTERN_BUILTIN); | ||||
| } | } | ||||
| static int rna_function_builtin(CollectionPropertyIterator *UNUSED(iter), void *data) | static int rna_function_builtin(CollectionPropertyIterator *UNUSED(iter), void *data) | ||||
| { | { | ||||
| FunctionRNA *func = (FunctionRNA *)data; | FunctionRNA *func = (FunctionRNA *)data; | ||||
| /* function to skip builtin rna functions */ | /* function to skip builtin rna functions */ | ||||
| ▲ Show 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | if (srna->cont.prophash) { | ||||
| propptr.data = prop; | propptr.data = prop; | ||||
| *r_ptr = propptr; | *r_ptr = propptr; | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| for (prop = srna->cont.properties.first; prop; prop = prop->next) { | for (prop = srna->cont.properties.first; prop; prop = prop->next) { | ||||
| if (!(prop->flag & PROP_BUILTIN) && STREQ(prop->identifier, key)) { | if (!(prop->flag_internal & PROP_INTERN_BUILTIN) && STREQ(prop->identifier, key)) { | ||||
| propptr.type = &RNA_Property; | propptr.type = &RNA_Property; | ||||
| propptr.data = prop; | propptr.data = prop; | ||||
| *r_ptr = propptr; | *r_ptr = propptr; | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | static int rna_Property_animatable_get(PointerRNA *ptr) | ||||
| PropertyRNA *prop = (PropertyRNA *)ptr->data; | PropertyRNA *prop = (PropertyRNA *)ptr->data; | ||||
| return (prop->flag & PROP_ANIMATABLE) != 0; | return (prop->flag & PROP_ANIMATABLE) != 0; | ||||
| } | } | ||||
| static int rna_Property_use_output_get(PointerRNA *ptr) | static int rna_Property_use_output_get(PointerRNA *ptr) | ||||
| { | { | ||||
| PropertyRNA *prop = (PropertyRNA *)ptr->data; | PropertyRNA *prop = (PropertyRNA *)ptr->data; | ||||
| return (prop->flag & PROP_OUTPUT) != 0; | return (prop->flag_parameter & PARM_OUTPUT) != 0; | ||||
| } | } | ||||
| static int rna_Property_is_required_get(PointerRNA *ptr) | static int rna_Property_is_required_get(PointerRNA *ptr) | ||||
| { | { | ||||
| PropertyRNA *prop = (PropertyRNA *)ptr->data; | PropertyRNA *prop = (PropertyRNA *)ptr->data; | ||||
| return (prop->flag & PROP_REQUIRED) != 0; | return (prop->flag_parameter & PARM_REQUIRED) != 0; | ||||
| } | } | ||||
| static int rna_Property_is_argument_optional_get(PointerRNA *ptr) | static int rna_Property_is_argument_optional_get(PointerRNA *ptr) | ||||
| { | { | ||||
| PropertyRNA *prop = (PropertyRNA *)ptr->data; | PropertyRNA *prop = (PropertyRNA *)ptr->data; | ||||
| return (prop->flag & PROP_PYFUNC_OPTIONAL) != 0; | return (prop->flag_parameter & PARM_PYFUNC_OPTIONAL) != 0; | ||||
| } | } | ||||
| static int rna_Property_is_never_none_get(PointerRNA *ptr) | static int rna_Property_is_never_none_get(PointerRNA *ptr) | ||||
| { | { | ||||
| PropertyRNA *prop = (PropertyRNA *)ptr->data; | PropertyRNA *prop = (PropertyRNA *)ptr->data; | ||||
| return (prop->flag & PROP_NEVER_NULL) != 0; | return (prop->flag & PROP_NEVER_NULL) != 0; | ||||
| } | } | ||||
| Show All 39 Lines | |||||
| { | { | ||||
| PropertyRNA *prop = (PropertyRNA *)ptr->data; | PropertyRNA *prop = (PropertyRNA *)ptr->data; | ||||
| return (prop->flag & PROP_REGISTER_OPTIONAL) != 0; | return (prop->flag & PROP_REGISTER_OPTIONAL) != 0; | ||||
| } | } | ||||
| static int rna_Property_is_runtime_get(PointerRNA *ptr) | static int rna_Property_is_runtime_get(PointerRNA *ptr) | ||||
| { | { | ||||
| PropertyRNA *prop = (PropertyRNA *)ptr->data; | PropertyRNA *prop = (PropertyRNA *)ptr->data; | ||||
| return (prop->flag & PROP_RUNTIME) != 0; | return (prop->flag_internal & PROP_INTERN_RUNTIME) != 0; | ||||
| } | } | ||||
| static int rna_BoolProperty_default_get(PointerRNA *ptr) | static int rna_BoolProperty_default_get(PointerRNA *ptr) | ||||
| { | { | ||||
| PropertyRNA *prop = (PropertyRNA *)ptr->data; | PropertyRNA *prop = (PropertyRNA *)ptr->data; | ||||
| rna_idproperty_check(&prop, ptr); | rna_idproperty_check(&prop, ptr); | ||||
| return ((BoolPropertyRNA *)prop)->defaultvalue; | return ((BoolPropertyRNA *)prop)->defaultvalue; | ||||
| ▲ Show 20 Lines • Show All 931 Lines • Show Last 20 Lines | |||||