diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-11-23 05:49:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-11-23 09:40:09 +0300 |
commit | 676d790d29ead413a9619aa94005c5248d274cb2 (patch) | |
tree | 65fd0b6728a6f2d3db0b8e1dbe0be9edacf1d1d8 /source/blender/editors/object | |
parent | a269287f36cfb99621fc8a5172c050f4a1046ba1 (diff) |
Cleanup: use `rna_enum_` prefix for RNA enums
Definitions could shadow local vars.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 12 | ||||
-rw-r--r-- | source/blender/editors/object/object_bake_api.c | 12 | ||||
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_data_transfer.c | 58 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_lattice.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_select.c | 2 |
8 files changed, 55 insertions, 55 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 77230831a65..7ef6638e753 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -116,7 +116,7 @@ /* this is an exact copy of the define in rna_lamp.c * kept here because of linking order. * Icons are only defined here */ -EnumPropertyItem lamp_type_items[] = { +EnumPropertyItem rna_enum_lamp_type_items[] = { {LA_LOCAL, "POINT", ICON_LAMP_POINT, "Point", "Omnidirectional point light source"}, {LA_SUN, "SUN", ICON_LAMP_SUN, "Sun", "Constant direction parallel ray light source"}, {LA_SPOT, "SPOT", ICON_LAMP_SPOT, "Spot", "Directional cone light source"}, @@ -482,7 +482,7 @@ void OBJECT_OT_add(wmOperatorType *ot) /* properties */ ED_object_add_unit_props(ot); - RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", rna_enum_object_type_items, 0, "Type", ""); ED_object_add_generic_props(ot, true); } @@ -668,7 +668,7 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ot->prop = RNA_def_enum(ot->srna, "type", metaelem_type_items, 0, "Primitive", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_metaelem_type_items, 0, "Primitive", ""); ED_object_add_unit_props(ot); ED_object_add_generic_props(ot, true); @@ -815,7 +815,7 @@ void OBJECT_OT_empty_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", object_empty_drawtype_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_object_empty_drawtype_items, 0, "Type", ""); ED_object_add_unit_props(ot); ED_object_add_generic_props(ot, false); @@ -951,7 +951,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_lamp_type_items, 0, "Type", ""); RNA_def_property_translation_context(ot->prop, BLT_I18NCONTEXT_ID_LAMP); ED_object_add_unit_props(ot); @@ -2186,7 +2186,7 @@ void OBJECT_OT_duplicate(wmOperatorType *ot) /* to give to transform */ RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data"); - prop = RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + prop = RNA_def_enum(ot->srna, "mode", rna_enum_transform_mode_types, TFM_TRANSLATION, "Mode", ""); RNA_def_property_flag(prop, PROP_HIDDEN); } diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 9090bffcbfc..0d57a52b528 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -1331,7 +1331,7 @@ void OBJECT_OT_bake(wmOperatorType *ot) ot->invoke = bake_invoke; ot->poll = ED_operator_object_active_editable_mesh; - RNA_def_enum(ot->srna, "type", render_pass_type_items, SCE_PASS_COMBINED, "Type", + RNA_def_enum(ot->srna, "type", rna_enum_render_pass_type_items, SCE_PASS_COMBINED, "Type", "Type of pass to bake, some of them may not be supported by the current render engine"); RNA_def_string_file_path(ot->srna, "filepath", NULL, FILE_MAX, "File Path", "Image filepath to use when saving externally"); @@ -1347,12 +1347,12 @@ void OBJECT_OT_bake(wmOperatorType *ot) "Distance to use for the inward ray cast when using selected to active", 0.0f, 1.0f); RNA_def_string(ot->srna, "cage_object", NULL, MAX_NAME, "Cage Object", "Object to use as cage, instead of calculating the cage from the active object with cage extrusion"); - RNA_def_enum(ot->srna, "normal_space", normal_space_items, R_BAKE_SPACE_TANGENT, "Normal Space", + RNA_def_enum(ot->srna, "normal_space", rna_enum_normal_space_items, R_BAKE_SPACE_TANGENT, "Normal Space", "Choose normal space for baking"); - RNA_def_enum(ot->srna, "normal_r", normal_swizzle_items, R_BAKE_POSX, "R", "Axis to bake in red channel"); - RNA_def_enum(ot->srna, "normal_g", normal_swizzle_items, R_BAKE_POSY, "G", "Axis to bake in green channel"); - RNA_def_enum(ot->srna, "normal_b", normal_swizzle_items, R_BAKE_POSZ, "B", "Axis to bake in blue channel"); - RNA_def_enum(ot->srna, "save_mode", bake_save_mode_items, R_BAKE_SAVE_INTERNAL, "Save Mode", + RNA_def_enum(ot->srna, "normal_r", rna_enum_normal_swizzle_items, R_BAKE_POSX, "R", "Axis to bake in red channel"); + RNA_def_enum(ot->srna, "normal_g", rna_enum_normal_swizzle_items, R_BAKE_POSY, "G", "Axis to bake in green channel"); + RNA_def_enum(ot->srna, "normal_b", rna_enum_normal_swizzle_items, R_BAKE_POSZ, "B", "Axis to bake in blue channel"); + RNA_def_enum(ot->srna, "save_mode", rna_enum_bake_save_mode_items, R_BAKE_SAVE_INTERNAL, "Save Mode", "Choose how to save the baking map"); RNA_def_boolean(ot->srna, "use_clear", false, "Clear", "Clear Images before baking (only for internal saving)"); diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 2697a5e5fb1..efd1ebbd51b 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1879,7 +1879,7 @@ void OBJECT_OT_constraint_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_constraint_type_items, 0, "Type", ""); } void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot) @@ -1898,7 +1898,7 @@ void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_constraint_type_items, 0, "Type", ""); } void POSE_OT_constraint_add(wmOperatorType *ot) @@ -1917,7 +1917,7 @@ void POSE_OT_constraint_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_constraint_type_items, 0, "Type", ""); } void POSE_OT_constraint_add_with_targets(wmOperatorType *ot) @@ -1936,7 +1936,7 @@ void POSE_OT_constraint_add_with_targets(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_constraint_type_items, 0, "Type", ""); } /************************ IK Constraint operators *********************/ diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index 95e1204e122..ac1935e9652 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -89,7 +89,7 @@ static EnumPropertyItem DT_layer_items[] = { {0, NULL, 0, NULL, NULL} }; -/* Note: DT_layers_select_src_items enum is from rna_modifier.c */ +/* Note: rna_enum_dt_layers_select_src_items enum is from rna_modifier.c */ static EnumPropertyItem *dt_layers_select_src_itemf( bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { @@ -99,18 +99,18 @@ static EnumPropertyItem *dt_layers_select_src_itemf( const int data_type = RNA_enum_get(ptr, "data_type"); if (!C) { /* needed for docs and i18n tools */ - return DT_layers_select_src_items; + return rna_enum_dt_layers_select_src_items; } - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_src_items, DT_LAYERS_ACTIVE_SRC); - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_src_items, DT_LAYERS_ALL_SRC); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_ACTIVE_SRC); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC); if (data_type == DT_TYPE_MDEFORMVERT) { Object *ob_src = CTX_data_active_object(C); if (BKE_object_pose_armature_get(ob_src)) { - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_SELECT); - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_DEFORM); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_SELECT); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_DEFORM); } if (ob_src) { @@ -182,7 +182,7 @@ static EnumPropertyItem *dt_layers_select_src_itemf( return item; } -/* Note: DT_layers_select_dst_items enum is from rna_modifier.c */ +/* Note: rna_enum_dt_layers_select_dst_items enum is from rna_modifier.c */ static EnumPropertyItem *dt_layers_select_dst_itemf( bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { @@ -192,14 +192,14 @@ static EnumPropertyItem *dt_layers_select_dst_itemf( const int layers_select_src = RNA_enum_get(ptr, "layers_select_src"); if (!C) { /* needed for docs and i18n tools */ - return DT_layers_select_dst_items; + return rna_enum_dt_layers_select_dst_items; } if (layers_select_src == DT_LAYERS_ACTIVE_SRC || layers_select_src >= 0) { - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_dst_items, DT_LAYERS_ACTIVE_DST); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_dst_items, DT_LAYERS_ACTIVE_DST); } - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_dst_items, DT_LAYERS_NAME_DST); - RNA_enum_items_add_value(&item, &totitem, DT_layers_select_dst_items, DT_LAYERS_INDEX_DST); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_dst_items, DT_LAYERS_INDEX_DST); /* No 'specific' to-layers here, since we may transfer to several objects at once! */ @@ -229,7 +229,7 @@ static EnumPropertyItem *dt_layers_select_itemf(bContext *C, PointerRNA *ptr, Pr } } -/* Note: DT_mix_mode_items enum is from rna_modifier.c */ +/* Note: rna_enum_dt_mix_mode_items enum is from rna_modifier.c */ static EnumPropertyItem *dt_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *item = NULL; @@ -239,24 +239,24 @@ static EnumPropertyItem *dt_mix_mode_itemf(bContext *C, PointerRNA *ptr, Propert bool support_advanced_mixing, support_threshold; if (!C) { /* needed for docs and i18n tools */ - return DT_mix_mode_items; + return rna_enum_dt_mix_mode_items; } - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_TRANSFER); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_TRANSFER); BKE_object_data_transfer_get_dttypes_capacity(dtdata_type, &support_advanced_mixing, &support_threshold); if (support_threshold) { - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_REPLACE_ABOVE_THRESHOLD); - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_REPLACE_BELOW_THRESHOLD); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_REPLACE_ABOVE_THRESHOLD); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_REPLACE_BELOW_THRESHOLD); } if (support_advanced_mixing) { RNA_enum_item_add_separator(&item, &totitem); - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_MIX); - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_ADD); - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_SUB); - RNA_enum_items_add_value(&item, &totitem, DT_mix_mode_items, CDT_MIX_MUL); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_MIX); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_ADD); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_SUB); + RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_mix_mode_items, CDT_MIX_MUL); } RNA_enum_item_end(&item, &totitem); @@ -562,13 +562,13 @@ void OBJECT_OT_data_transfer(wmOperatorType *ot) RNA_def_boolean(ot->srna, "use_create", true, "Create Data", "Add data layers on destination meshes if needed"); /* Mapping methods. */ - RNA_def_enum(ot->srna, "vert_mapping", DT_method_vertex_items, MREMAP_MODE_VERT_NEAREST, "Vertex Mapping", + RNA_def_enum(ot->srna, "vert_mapping", rna_enum_dt_method_vertex_items, MREMAP_MODE_VERT_NEAREST, "Vertex Mapping", "Method used to map source vertices to destination ones"); - RNA_def_enum(ot->srna, "edge_mapping", DT_method_edge_items, MREMAP_MODE_EDGE_NEAREST, "Edge Mapping", + RNA_def_enum(ot->srna, "edge_mapping", rna_enum_dt_method_edge_items, MREMAP_MODE_EDGE_NEAREST, "Edge Mapping", "Method used to map source edges to destination ones"); - RNA_def_enum(ot->srna, "loop_mapping", DT_method_loop_items, MREMAP_MODE_LOOP_NEAREST_POLYNOR, + RNA_def_enum(ot->srna, "loop_mapping", rna_enum_dt_method_loop_items, MREMAP_MODE_LOOP_NEAREST_POLYNOR, "Face Corner Mapping", "Method used to map source faces' corners to destination ones"); - RNA_def_enum(ot->srna, "poly_mapping", DT_method_poly_items, MREMAP_MODE_POLY_NEAREST, "Face Mapping", + RNA_def_enum(ot->srna, "poly_mapping", rna_enum_dt_method_poly_items, MREMAP_MODE_POLY_NEAREST, "Face Mapping", "Method used to map source faces to destination ones"); /* Mapping options and filtering. */ @@ -593,15 +593,15 @@ void OBJECT_OT_data_transfer(wmOperatorType *ot) RNA_def_property_subtype(prop, PROP_FACTOR); /* How to handle multi-layers types of data. */ - prop = RNA_def_enum(ot->srna, "layers_select_src", DT_layers_select_src_items, DT_LAYERS_ACTIVE_SRC, + prop = RNA_def_enum(ot->srna, "layers_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ACTIVE_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); RNA_def_property_enum_funcs_runtime(prop, NULL, NULL, dt_layers_select_itemf); - prop = RNA_def_enum(ot->srna, "layers_select_dst", DT_layers_select_dst_items, DT_LAYERS_ACTIVE_DST, + prop = RNA_def_enum(ot->srna, "layers_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_ACTIVE_DST, "Destination Layers Matching", "How to match source and destination layers"); RNA_def_property_enum_funcs_runtime(prop, NULL, NULL, dt_layers_select_itemf); - prop = RNA_def_enum(ot->srna, "mix_mode", DT_mix_mode_items, CDT_MIX_TRANSFER, "Mix Mode", + prop = RNA_def_enum(ot->srna, "mix_mode", rna_enum_dt_mix_mode_items, CDT_MIX_TRANSFER, "Mix Mode", "How to affect destination elements with source values"); RNA_def_property_enum_funcs_runtime(prop, NULL, NULL, dt_mix_mode_itemf); RNA_def_float(ot->srna, "mix_factor", 1.0f, 0.0f, 1.0f, "Mix Factor", @@ -719,11 +719,11 @@ void OBJECT_OT_datalayout_transfer(wmOperatorType *ot) "Also delete some data layers from destination if necessary, so that it matches exactly source"); /* How to handle multi-layers types of data. */ - prop = RNA_def_enum(ot->srna, "layers_select_src", DT_layers_select_src_items, DT_LAYERS_ACTIVE_SRC, + prop = RNA_def_enum(ot->srna, "layers_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ACTIVE_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); RNA_def_property_enum_funcs_runtime(prop, NULL, NULL, dt_layers_select_src_itemf); - prop = RNA_def_enum(ot->srna, "layers_select_dst", DT_layers_select_dst_items, DT_LAYERS_ACTIVE_DST, + prop = RNA_def_enum(ot->srna, "layers_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_ACTIVE_DST, "Destination Layers Matching", "How to match source and destination layers"); RNA_def_property_enum_funcs_runtime(prop, NULL, NULL, dt_layers_select_dst_itemf); } diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index fa58e6972c4..fb4065bf5de 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1506,13 +1506,13 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d) static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { - EnumPropertyItem *input = object_mode_items; + EnumPropertyItem *input = rna_enum_object_mode_items; EnumPropertyItem *item = NULL; Object *ob; int totitem = 0; if (!C) /* needed for docs */ - return object_mode_items; + return rna_enum_object_mode_items; ob = CTX_data_active_object(C); if (ob) { @@ -1680,7 +1680,7 @@ void OBJECT_OT_mode_set(wmOperatorType *ot) /* flags */ ot->flag = 0; /* no register/undo here, leave it to operators being called */ - ot->prop = RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, "Mode", ""); + ot->prop = RNA_def_enum(ot->srna, "mode", rna_enum_object_mode_items, OB_MODE_OBJECT, "Mode", ""); RNA_def_enum_funcs(ot->prop, object_mode_set_itemsf); RNA_def_property_flag(ot->prop, PROP_SKIP_SAVE); @@ -1738,7 +1738,7 @@ void OBJECT_OT_game_property_new(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_enum(ot->srna, "type", gameproperty_type_items, GPROP_FLOAT, "Type", "Type of game property to add"); + RNA_def_enum(ot->srna, "type", rna_enum_gameproperty_type_items, GPROP_FLOAT, "Type", "Type of game property to add"); RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the game property to add"); } diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 617c84fb005..23c2bfff482 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -308,7 +308,7 @@ void LATTICE_OT_select_mirror(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - RNA_def_enum(ot->srna, "axis", object_axis_unsigned_items, 0, "Axis", ""); + RNA_def_enum(ot->srna, "axis", rna_enum_object_axis_unsigned_items, 0, "Axis", ""); RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend the selection"); } diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index b7d1d6b817a..4a2dfd73ab5 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -752,10 +752,10 @@ static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr) int totitem = 0, a; if (!ob) - return modifier_type_items; + return rna_enum_object_modifier_type_items; - for (a = 0; modifier_type_items[a].identifier; a++) { - md_item = &modifier_type_items[a]; + for (a = 0; rna_enum_object_modifier_type_items[a].identifier; a++) { + md_item = &rna_enum_object_modifier_type_items[a]; if (md_item->identifier[0]) { mti = modifierType_getInfo(md_item->value); @@ -805,7 +805,7 @@ void OBJECT_OT_modifier_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - prop = RNA_def_enum(ot->srna, "type", modifier_type_items, eModifierType_Subsurf, "Type", ""); + prop = RNA_def_enum(ot->srna, "type", rna_enum_object_modifier_type_items, eModifierType_Subsurf, "Type", ""); RNA_def_enum_funcs(prop, modifier_add_itemf); ot->prop = prop; } diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 2f2eece8018..3b02b13e536 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -181,7 +181,7 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); - ot->prop = RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_object_type_items, 1, "Type", ""); } /*********************** Selection by Links *********************/ |