diff options
-rw-r--r-- | intern/cycles/blender/blender_util.h | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_ops.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h index a1508fc6a07..56ac5d1c4ba 100644 --- a/intern/cycles/blender/blender_util.h +++ b/intern/cycles/blender/blender_util.h @@ -363,7 +363,7 @@ static inline void set_enum(PointerRNA& ptr, const char *name, int value) static inline void set_enum(PointerRNA& ptr, const char *name, const string &identifier) { - RNA_enum_set_identifier(&ptr, name, identifier.c_str()); + RNA_enum_set_identifier(NULL, &ptr, name, identifier.c_str()); } static inline string get_string(PointerRNA& ptr, const char *name) diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index eddd67ae8f1..ca775c5c85e 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -336,19 +336,19 @@ void ED_keymap_object(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "OBJECT_OT_select_mirror", MKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); - RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT"); + RNA_enum_set_identifier(NULL, kmi->ptr, "direction", "PARENT"); RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); - RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT"); + RNA_enum_set_identifier(NULL, kmi->ptr, "direction", "PARENT"); RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); - RNA_enum_set_identifier(kmi->ptr, "direction", "CHILD"); + RNA_enum_set_identifier(NULL, kmi->ptr, "direction", "CHILD"); RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); - RNA_enum_set_identifier(kmi->ptr, "direction", "CHILD"); + RNA_enum_set_identifier(NULL, kmi->ptr, "direction", "CHILD"); RNA_boolean_set(kmi->ptr, "extend", true); WM_keymap_verify_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 8b785c8a65f..050c55b2347 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -1006,7 +1006,7 @@ void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values int RNA_enum_get(PointerRNA *ptr, const char *name); void RNA_enum_set(PointerRNA *ptr, const char *name, int value); -void RNA_enum_set_identifier(PointerRNA *ptr, const char *name, const char *id); +void RNA_enum_set_identifier(struct bContext *C, PointerRNA *ptr, const char *name, const char *id); bool RNA_enum_is_equal(struct bContext *C, PointerRNA *ptr, const char *name, const char *enumname); /* lower level functions that don't use a PointerRNA */ diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index ede5073483b..b1038f8e35c 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -4992,13 +4992,13 @@ void RNA_enum_set(PointerRNA *ptr, const char *name, int value) printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name); } -void RNA_enum_set_identifier(PointerRNA *ptr, const char *name, const char *id) +void RNA_enum_set_identifier(bContext *C, PointerRNA *ptr, const char *name, const char *id) { PropertyRNA *prop = RNA_struct_find_property(ptr, name); if (prop) { int value; - if (RNA_property_enum_value(NULL, ptr, prop, id, &value)) + if (RNA_property_enum_value(C, ptr, prop, id, &value)) RNA_property_enum_set(ptr, prop, value); else printf("%s: %s.%s has no enum id '%s'.\n", __func__, ptr->type->identifier, name, id); |