From 676d790d29ead413a9619aa94005c5248d274cb2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 23 Nov 2015 13:49:52 +1100 Subject: Cleanup: use `rna_enum_` prefix for RNA enums Definitions could shadow local vars. --- source/blender/blenkernel/intern/boids.c | 2 +- .../operations/COM_BlurBaseOperation.cpp | 2 +- .../blender/editors/animation/keyframes_general.c | 4 +- source/blender/editors/armature/armature_add.c | 2 +- source/blender/editors/armature/pose_edit.c | 4 +- source/blender/editors/curve/editcurve.c | 2 +- source/blender/editors/interface/interface_icons.c | 6 +- source/blender/editors/mesh/editmesh_loopcut.c | 2 +- source/blender/editors/mesh/editmesh_select.c | 4 +- source/blender/editors/mesh/editmesh_tools.c | 12 +- source/blender/editors/object/object_add.c | 12 +- source/blender/editors/object/object_bake_api.c | 12 +- source/blender/editors/object/object_constraint.c | 8 +- .../blender/editors/object/object_data_transfer.c | 58 +++--- source/blender/editors/object/object_edit.c | 8 +- source/blender/editors/object/object_lattice.c | 2 +- source/blender/editors/object/object_modifier.c | 8 +- source/blender/editors/object/object_select.c | 2 +- source/blender/editors/physics/dynamicpaint_ops.c | 2 +- source/blender/editors/physics/particle_boids.c | 2 +- .../blender/editors/physics/rigidbody_constraint.c | 2 +- source/blender/editors/physics/rigidbody_object.c | 6 +- source/blender/editors/render/render_shading.c | 8 +- .../editors/sculpt_paint/paint_image_proj.c | 2 +- source/blender/editors/sculpt_paint/paint_ops.c | 16 +- source/blender/editors/sound/sound_ops.c | 2 +- source/blender/editors/space_action/action_edit.c | 10 +- source/blender/editors/space_clip/clip_ops.c | 2 +- source/blender/editors/space_graph/graph_edit.c | 20 +- source/blender/editors/space_image/image_ops.c | 4 +- source/blender/editors/space_logic/logic_ops.c | 2 +- source/blender/editors/space_nla/nla_edit.c | 4 +- source/blender/editors/space_node/node_edit.c | 4 +- .../editors/space_sequencer/sequencer_edit.c | 2 +- .../editors/space_sequencer/sequencer_modifier.c | 2 +- .../blender/editors/space_view3d/view3d_header.c | 2 +- source/blender/editors/transform/transform_ops.c | 10 +- source/blender/makesdna/DNA_windowmanager_types.h | 2 +- source/blender/makesrna/RNA_enum_types.h | 227 +++++++++++---------- source/blender/makesrna/intern/rna_ID.c | 2 +- source/blender/makesrna/intern/rna_action.c | 2 +- source/blender/makesrna/intern/rna_animation.c | 16 +- source/blender/makesrna/intern/rna_animviz.c | 4 +- source/blender/makesrna/intern/rna_boid.c | 4 +- source/blender/makesrna/intern/rna_brush.c | 12 +- source/blender/makesrna/intern/rna_constraint.c | 12 +- source/blender/makesrna/intern/rna_controller.c | 4 +- source/blender/makesrna/intern/rna_curve.c | 4 +- source/blender/makesrna/intern/rna_dynamicpaint.c | 2 +- source/blender/makesrna/intern/rna_fcurve.c | 22 +- source/blender/makesrna/intern/rna_image.c | 8 +- source/blender/makesrna/intern/rna_image_api.c | 2 +- source/blender/makesrna/intern/rna_key.c | 4 +- source/blender/makesrna/intern/rna_lamp.c | 6 +- source/blender/makesrna/intern/rna_lattice.c | 6 +- source/blender/makesrna/intern/rna_linestyle.c | 35 ++-- source/blender/makesrna/intern/rna_main_api.c | 10 +- source/blender/makesrna/intern/rna_mask.c | 2 +- source/blender/makesrna/intern/rna_material.c | 6 +- source/blender/makesrna/intern/rna_mesh.c | 2 +- source/blender/makesrna/intern/rna_meta.c | 4 +- source/blender/makesrna/intern/rna_modifier.c | 96 ++++----- source/blender/makesrna/intern/rna_nla.c | 8 +- source/blender/makesrna/intern/rna_nodetree.c | 26 +-- source/blender/makesrna/intern/rna_object.c | 26 +-- source/blender/makesrna/intern/rna_object_force.c | 2 +- source/blender/makesrna/intern/rna_packedfile.c | 2 +- source/blender/makesrna/intern/rna_particle.c | 2 +- source/blender/makesrna/intern/rna_pose.c | 10 +- source/blender/makesrna/intern/rna_property.c | 4 +- source/blender/makesrna/intern/rna_render.c | 14 +- source/blender/makesrna/intern/rna_rigidbody.c | 12 +- source/blender/makesrna/intern/rna_rna.c | 14 +- source/blender/makesrna/intern/rna_scene.c | 127 ++++++------ source/blender/makesrna/intern/rna_screen.c | 8 +- source/blender/makesrna/intern/rna_sculpt_paint.c | 4 +- source/blender/makesrna/intern/rna_sensor.c | 6 +- source/blender/makesrna/intern/rna_sequencer.c | 10 +- source/blender/makesrna/intern/rna_sound_api.c | 2 +- source/blender/makesrna/intern/rna_space.c | 32 +-- source/blender/makesrna/intern/rna_texture.c | 4 +- source/blender/makesrna/intern/rna_ui.c | 14 +- source/blender/makesrna/intern/rna_ui_api.c | 6 +- source/blender/makesrna/intern/rna_userdef.c | 8 +- source/blender/makesrna/intern/rna_vfont_api.c | 2 +- source/blender/makesrna/intern/rna_wm.c | 40 ++-- source/blender/makesrna/intern/rna_wm_api.c | 42 ++-- source/blender/nodes/intern/node_util.c | 8 +- source/blender/python/intern/bpy_operator.c | 10 +- source/blender/python/intern/bpy_props.c | 8 +- source/blender/python/intern/bpy_rna.c | 2 +- source/blender/python/intern/bpy_rna_anim.c | 2 +- source/blender/python/intern/bpy_rna_callback.c | 4 +- .../blender/windowmanager/intern/wm_event_system.c | 4 +- source/blender/windowmanager/intern/wm_keymap.c | 4 +- source/blender/windowmanager/intern/wm_operators.c | 8 +- 96 files changed, 613 insertions(+), 608 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index 64b9bf48c98..7ce61ec6fab 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -1505,7 +1505,7 @@ BoidRule *boid_new_rule(int type) rule->type = type; rule->flag |= BOIDRULE_IN_AIR|BOIDRULE_ON_LAND; - BLI_strncpy(rule->name, boidrule_type_items[type-1].name, sizeof(rule->name)); + BLI_strncpy(rule->name, rna_enum_boidrule_type_items[type-1].name, sizeof(rule->name)); return rule; } diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp index ce42de7a149..dc5f80e55f3 100644 --- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp @@ -118,7 +118,7 @@ float *BlurBaseOperation::make_dist_fac_inverse(float rad, int size, int falloff for (i = -size; i <= size; i++) { val = 1.0f - fabsf((float)i * fac); - /* keep in sync with proportional_falloff_curve_only_items */ + /* keep in sync with rna_enum_proportional_falloff_curve_only_items */ switch (falloff) { case PROP_SMOOTH: /* ease - gives less hard lines for dilate/erode feather */ diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index f0d9c48eb5e..be58c75e202 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -885,14 +885,14 @@ static void paste_animedit_keys_fcurve(FCurve *fcu, tAnimCopybufItem *aci, float /* ------------------- */ -EnumPropertyItem keyframe_paste_offset_items[] = { +EnumPropertyItem rna_enum_keyframe_paste_offset_items[] = { {KEYFRAME_PASTE_OFFSET_CFRA_START, "START", 0, "Frame Start", "Paste keys starting at current frame"}, {KEYFRAME_PASTE_OFFSET_CFRA_END, "END", 0, "Frame End", "Paste keys ending at current frame"}, {KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, "RELATIVE", 0, "Frame Relative", "Paste keys relative to the current frame when copying"}, {KEYFRAME_PASTE_OFFSET_NONE, "NONE", 0, "No Offset", "Paste keys from original time"}, {0, NULL, 0, NULL, NULL}}; -EnumPropertyItem keyframe_paste_merge_items[] = { +EnumPropertyItem rna_enum_keyframe_paste_merge_items[] = { {KEYFRAME_PASTE_MERGE_MIX, "MIX", 0, "Mix", "Overlay existing with new keys"}, {KEYFRAME_PASTE_MERGE_OVER, "OVER_ALL", 0, "Overwrite All", "Replace all keys"}, {KEYFRAME_PASTE_MERGE_OVER_RANGE, "OVER_RANGE", 0, "Overwrite Range", "Overwrite keys in pasted range"}, diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 59453f0ac71..1d9059f7b4f 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -697,7 +697,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) /* following conventions from #MESH_OT_symmetrize */ void ARMATURE_OT_symmetrize(wmOperatorType *ot) { - /* subset of 'symmetrize_direction_items' */ + /* subset of 'rna_enum_symmetrize_direction_items' */ static EnumPropertyItem arm_symmetrize_direction_items[] = { {-1, "NEGATIVE_X", 0, "-X to +X", ""}, {+1, "POSITIVE_X", 0, "+X to -X", ""}, diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index e87c324d7ec..0260b604408 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -255,7 +255,7 @@ void POSE_OT_paths_calculate(wmOperatorType *ot) RNA_def_int(ot->srna, "end_frame", 250, MINAFRAME, MAXFRAME, "End", "Last frame to calculate bone paths on", MINFRAME, MAXFRAME / 2.0); - RNA_def_enum(ot->srna, "bake_location", motionpath_bake_location_items, 0, + RNA_def_enum(ot->srna, "bake_location", rna_enum_motionpath_bake_location_items, 0, "Bake Location", "Which point on the bones is used when calculating paths"); } @@ -700,7 +700,7 @@ void POSE_OT_rotation_mode_set(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", posebone_rotmode_items, 0, "Rotation Mode", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_posebone_rotmode_items, 0, "Rotation Mode", ""); } /* ********************************************** */ diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 367467b385f..e2cf0c1ec14 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -4954,7 +4954,7 @@ void CURVE_OT_extrude(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", rna_enum_transform_mode_types, TFM_TRANSLATION, "Mode", ""); } /***************** make cyclic operator **********************/ diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 796a7646b87..ed1137fee73 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1317,15 +1317,15 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id) /* reset the icon */ if (mode == OB_MODE_SCULPT) { - items = brush_sculpt_tool_items; + items = rna_enum_brush_sculpt_tool_items; tool = br->sculpt_tool; } else if (mode == OB_MODE_VERTEX_PAINT) { - items = brush_vertex_tool_items; + items = rna_enum_brush_vertex_tool_items; tool = br->vertexpaint_tool; } else if (mode == OB_MODE_TEXTURE_PAINT) { - items = brush_image_tool_items; + items = rna_enum_brush_image_tool_items; tool = br->imagepaint_tool; } diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 593e27ff69d..7236b41577c 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -854,7 +854,7 @@ void MESH_OT_loopcut(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_property(ot->srna, "falloff", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); + RNA_def_property_enum_items(prop, rna_enum_proportional_falloff_curve_only_items); RNA_def_property_enum_default(prop, PROP_INVSQUARE); RNA_def_property_ui_text(prop, "Falloff", "Falloff type the feather"); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 09b146fdff6..f2cbef6e547 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -2604,7 +2604,7 @@ void MESH_OT_select_linked(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_enum_flag(ot->srna, "delimit", mesh_delimit_mode_items, BMO_DELIM_SEAM, "Delimit", + RNA_def_enum_flag(ot->srna, "delimit", rna_enum_mesh_delimit_mode_items, BMO_DELIM_SEAM, "Delimit", "Delimit selected region"); } @@ -2833,7 +2833,7 @@ void MESH_OT_select_linked_pick(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", ""); - RNA_def_enum_flag(ot->srna, "delimit", mesh_delimit_mode_items, BMO_DELIM_SEAM, "Delimit", + RNA_def_enum_flag(ot->srna, "delimit", rna_enum_mesh_delimit_mode_items, BMO_DELIM_SEAM, "Delimit", "Delimit selected region"); /* use for redo */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 2d9de6da244..a0017f93b8a 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -191,7 +191,7 @@ static void mesh_operator_edgering_props(wmOperatorType *ot, const int cuts_defa "Profile Factor", "How much intermediary new edges are shrunk/expanded", -2.0f, 2.0f); prop = RNA_def_property(ot->srna, "profile_shape", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); + RNA_def_property_enum_items(prop, rna_enum_proportional_falloff_curve_only_items); RNA_def_property_enum_default(prop, PROP_SMOOTH); RNA_def_property_ui_text(prop, "Profile Shape", "Shape of the profile"); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ @@ -3850,9 +3850,9 @@ void MESH_OT_quads_convert_to_tris(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_enum(ot->srna, "quad_method", modifier_triangulate_quad_method_items, MOD_TRIANGULATE_QUAD_BEAUTY, + RNA_def_enum(ot->srna, "quad_method", rna_enum_modifier_triangulate_quad_method_items, MOD_TRIANGULATE_QUAD_BEAUTY, "Quad Method", "Method for splitting the quads into triangles"); - RNA_def_enum(ot->srna, "ngon_method", modifier_triangulate_ngon_method_items, MOD_TRIANGULATE_NGON_BEAUTY, + RNA_def_enum(ot->srna, "ngon_method", rna_enum_modifier_triangulate_ngon_method_items, MOD_TRIANGULATE_NGON_BEAUTY, "Polygon Method", "Method for splitting the polygons into triangles"); } @@ -4203,7 +4203,7 @@ void MESH_OT_dissolve_limited(wmOperatorType *ot) RNA_def_property_float_default(prop, DEG2RADF(5.0f)); RNA_def_boolean(ot->srna, "use_dissolve_boundaries", false, "All Boundaries", "Dissolve all vertices inbetween face boundaries"); - RNA_def_enum_flag(ot->srna, "delimit", mesh_delimit_mode_items, BMO_DELIM_NORMAL, "Delimit", + RNA_def_enum_flag(ot->srna, "delimit", rna_enum_mesh_delimit_mode_items, BMO_DELIM_NORMAL, "Delimit", "Delimit dissolve operation"); } @@ -5452,7 +5452,7 @@ void MESH_OT_symmetrize(struct wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ot->prop = RNA_def_enum(ot->srna, "direction", symmetrize_direction_items, + ot->prop = RNA_def_enum(ot->srna, "direction", rna_enum_symmetrize_direction_items, BMO_SYMMETRIZE_NEGATIVE_X, "Direction", "Which sides to copy from and to"); RNA_def_float(ot->srna, "threshold", 1e-4f, 0.0f, 10.0f, "Threshold", "", 1e-5f, 0.1f); @@ -5576,7 +5576,7 @@ void MESH_OT_symmetry_snap(struct wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ot->prop = RNA_def_enum(ot->srna, "direction", symmetrize_direction_items, + ot->prop = RNA_def_enum(ot->srna, "direction", rna_enum_symmetrize_direction_items, BMO_SYMMETRIZE_NEGATIVE_X, "Direction", "Which sides to copy from and to"); RNA_def_float(ot->srna, "threshold", 0.05f, 0.0f, 10.0f, "Threshold", "", 1e-4f, 1.0f); 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 *********************/ diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index 93daa15e608..950a0699904 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -202,7 +202,7 @@ void DPAINT_OT_type_toggle(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - prop = RNA_def_enum(ot->srna, "type", prop_dynamicpaint_type_items, MOD_DYNAMICPAINT_TYPE_CANVAS, "Type", ""); + prop = RNA_def_enum(ot->srna, "type", rna_enum_prop_dynamicpaint_type_items, MOD_DYNAMICPAINT_TYPE_CANVAS, "Type", ""); ot->prop = prop; } diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c index ef1e661c580..14b12497c4a 100644 --- a/source/blender/editors/physics/particle_boids.c +++ b/source/blender/editors/physics/particle_boids.c @@ -94,7 +94,7 @@ void BOID_OT_rule_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; - ot->prop = RNA_def_enum(ot->srna, "type", boidrule_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_boidrule_type_items, 0, "Type", ""); } static int rule_del_exec(bContext *C, wmOperator *UNUSED(op)) { diff --git a/source/blender/editors/physics/rigidbody_constraint.c b/source/blender/editors/physics/rigidbody_constraint.c index 85b059d5574..f95599592b2 100644 --- a/source/blender/editors/physics/rigidbody_constraint.c +++ b/source/blender/editors/physics/rigidbody_constraint.c @@ -153,7 +153,7 @@ void RIGIDBODY_OT_constraint_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", rigidbody_constraint_type_items, RBC_TYPE_FIXED, "Rigid Body Constraint Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_rigidbody_constraint_type_items, RBC_TYPE_FIXED, "Rigid Body Constraint Type", ""); } /* ************ Remove Rigid Body Constraint ************** */ diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c index 949084973cf..26d8af82b2d 100644 --- a/source/blender/editors/physics/rigidbody_object.c +++ b/source/blender/editors/physics/rigidbody_object.c @@ -179,7 +179,7 @@ void RIGIDBODY_OT_object_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", rigidbody_object_type_items, RBO_TYPE_ACTIVE, "Rigid Body Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_rigidbody_object_type_items, RBO_TYPE_ACTIVE, "Rigid Body Type", ""); } /* ************ Remove Rigid Body ************** */ @@ -270,7 +270,7 @@ void RIGIDBODY_OT_objects_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", rigidbody_object_type_items, RBO_TYPE_ACTIVE, "Rigid Body Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_rigidbody_object_type_items, RBO_TYPE_ACTIVE, "Rigid Body Type", ""); } /* ************ Remove Rigid Bodies ************** */ @@ -374,7 +374,7 @@ void RIGIDBODY_OT_shape_change(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", rigidbody_object_shape_items, RB_SHAPE_TRIMESH, "Rigid Body Shape", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_rigidbody_object_shape_items, RB_SHAPE_TRIMESH, "Rigid Body Shape", ""); } /* ************ Calculate Mass ************** */ diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index b540b9df16f..35344c6c351 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -1103,7 +1103,7 @@ void SCENE_OT_freestyle_color_modifier_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", linestyle_color_modifier_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_linestyle_color_modifier_type_items, 0, "Type", ""); } static int freestyle_alpha_modifier_add_exec(bContext *C, wmOperator *op) @@ -1143,7 +1143,7 @@ void SCENE_OT_freestyle_alpha_modifier_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", linestyle_alpha_modifier_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_linestyle_alpha_modifier_type_items, 0, "Type", ""); } static int freestyle_thickness_modifier_add_exec(bContext *C, wmOperator *op) @@ -1183,7 +1183,7 @@ void SCENE_OT_freestyle_thickness_modifier_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", linestyle_thickness_modifier_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_linestyle_thickness_modifier_type_items, 0, "Type", ""); } static int freestyle_geometry_modifier_add_exec(bContext *C, wmOperator *op) @@ -1223,7 +1223,7 @@ void SCENE_OT_freestyle_geometry_modifier_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", linestyle_geometry_modifier_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_linestyle_geometry_modifier_type_items, 0, "Type", ""); } static int freestyle_get_modifier_type(PointerRNA *ptr) diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 64fefa38341..2685581a81d 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -5769,7 +5769,7 @@ void PAINT_OT_add_texture_paint_slot(wmOperatorType *ot) RNA_def_property_subtype(prop, PROP_COLOR_GAMMA); RNA_def_property_float_array_default(prop, default_color); RNA_def_boolean(ot->srna, "alpha", 1, "Alpha", "Create an image with an alpha channel"); - RNA_def_enum(ot->srna, "generated_type", image_generated_type_items, IMA_GENTYPE_BLANK, + RNA_def_enum(ot->srna, "generated_type", rna_enum_image_generated_type_items, IMA_GENTYPE_BLANK, "Generated Type", "Fill the image with a grid for UV map testing"); RNA_def_boolean(ot->srna, "float", 0, "32 bit Float", "Create image with 32 bit floating point bit depth"); } diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index a77c7ba366f..4727153430b 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -476,26 +476,26 @@ static int brush_select_exec(bContext *C, wmOperator *op) paint = &toolsettings->sculpt->paint; tool_offset = offsetof(Brush, sculpt_tool); tool = RNA_enum_get(op->ptr, "sculpt_tool"); - RNA_enum_name_from_value(brush_sculpt_tool_items, tool, &tool_name); + RNA_enum_name_from_value(rna_enum_brush_sculpt_tool_items, tool, &tool_name); break; case OB_MODE_VERTEX_PAINT: paint = &toolsettings->vpaint->paint; tool_offset = offsetof(Brush, vertexpaint_tool); tool = RNA_enum_get(op->ptr, "vertex_paint_tool"); - RNA_enum_name_from_value(brush_vertex_tool_items, tool, &tool_name); + RNA_enum_name_from_value(rna_enum_brush_vertex_tool_items, tool, &tool_name); break; case OB_MODE_WEIGHT_PAINT: paint = &toolsettings->wpaint->paint; /* vertexpaint_tool is used for weight paint mode */ tool_offset = offsetof(Brush, vertexpaint_tool); tool = RNA_enum_get(op->ptr, "weight_paint_tool"); - RNA_enum_name_from_value(brush_vertex_tool_items, tool, &tool_name); + RNA_enum_name_from_value(rna_enum_brush_vertex_tool_items, tool, &tool_name); break; case OB_MODE_TEXTURE_PAINT: paint = &toolsettings->imapaint.paint; tool_offset = offsetof(Brush, imagepaint_tool); tool = RNA_enum_get(op->ptr, "texture_paint_tool"); - RNA_enum_name_from_value(brush_image_tool_items, tool, &tool_name); + RNA_enum_name_from_value(rna_enum_brush_image_tool_items, tool, &tool_name); break; default: /* invalid paint mode */ @@ -532,10 +532,10 @@ static void PAINT_OT_brush_select(wmOperatorType *ot) /* props */ RNA_def_enum(ot->srna, "paint_mode", paint_mode_items, OB_MODE_ACTIVE, "Paint Mode", ""); - RNA_def_enum(ot->srna, "sculpt_tool", brush_sculpt_tool_items, 0, "Sculpt Tool", ""); - RNA_def_enum(ot->srna, "vertex_paint_tool", brush_vertex_tool_items, 0, "Vertex Paint Tool", ""); - RNA_def_enum(ot->srna, "weight_paint_tool", brush_vertex_tool_items, 0, "Weight Paint Tool", ""); - RNA_def_enum(ot->srna, "texture_paint_tool", brush_image_tool_items, 0, "Texture Paint Tool", ""); + RNA_def_enum(ot->srna, "sculpt_tool", rna_enum_brush_sculpt_tool_items, 0, "Sculpt Tool", ""); + RNA_def_enum(ot->srna, "vertex_paint_tool", rna_enum_brush_vertex_tool_items, 0, "Vertex Paint Tool", ""); + RNA_def_enum(ot->srna, "weight_paint_tool", rna_enum_brush_vertex_tool_items, 0, "Weight Paint Tool", ""); + RNA_def_enum(ot->srna, "texture_paint_tool", rna_enum_brush_image_tool_items, 0, "Texture Paint Tool", ""); prop = RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "Toggle between two brushes rather than cycling"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index ffb1898d816..6102864e8c9 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -778,7 +778,7 @@ static void SOUND_OT_unpack(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack"); + RNA_def_enum(ot->srna, "method", rna_enum_unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack"); RNA_def_string(ot->srna, "id", NULL, MAX_ID_NAME - 2, "Sound Name", "Sound datablock name to unpack"); /* XXX, weark!, will fail with library, name collisions */ } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index e351fb57d9a..0dd5c7ca775 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -634,8 +634,8 @@ void ACTION_OT_paste(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys"); - RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merging pasted keys and existing"); + RNA_def_enum(ot->srna, "offset", rna_enum_keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys"); + RNA_def_enum(ot->srna, "merge", rna_enum_keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merging pasted keys and existing"); prop = RNA_def_boolean(ot->srna, "flipped", false, "Flipped", "Paste keyframes from mirrored bones if they exist"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } @@ -1223,7 +1223,7 @@ void ACTION_OT_interpolation_type(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* id-props */ - ot->prop = RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_beztriple_interpolation_mode_items, 0, "Type", ""); } /* ******************** Set Handle-Type Operator *********************** */ @@ -1305,7 +1305,7 @@ void ACTION_OT_handle_type(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* id-props */ - ot->prop = RNA_def_enum(ot->srna, "type", keyframe_handle_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_keyframe_handle_type_items, 0, "Type", ""); } /* ******************** Set Keyframe-Type Operator *********************** */ @@ -1407,7 +1407,7 @@ void ACTION_OT_keyframe_type(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* id-props */ - ot->prop = RNA_def_enum(ot->srna, "type", beztriple_keyframe_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_beztriple_keyframe_type_items, 0, "Type", ""); } /* ************************************************************************** */ diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index f66425e0a1a..c1db31a26db 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -1401,7 +1401,7 @@ void CLIP_OT_mode_set(wmOperatorType *ot) ot->poll = ED_space_clip_poll; /* properties */ - RNA_def_enum(ot->srna, "mode", clip_editor_mode_items, SC_MODE_TRACKING, "Mode", ""); + RNA_def_enum(ot->srna, "mode", rna_enum_clip_editor_mode_items, SC_MODE_TRACKING, "Mode", ""); } /********************** NDOF operator *********************/ diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 78eb173045c..ec0fdd62f71 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -835,8 +835,8 @@ void GRAPH_OT_paste(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys"); - RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merging pasted keys and existing"); + RNA_def_enum(ot->srna, "offset", rna_enum_keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys"); + RNA_def_enum(ot->srna, "merge", rna_enum_keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merging pasted keys and existing"); prop = RNA_def_boolean(ot->srna, "flipped", false, "Flipped", "Paste keyframes from mirrored bones if they exist"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } @@ -898,7 +898,7 @@ void GRAPH_OT_duplicate(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", rna_enum_transform_mode_types, TFM_TRANSLATION, "Mode", ""); } /* ******************** Delete Keyframes Operator ************************* */ @@ -1541,7 +1541,7 @@ void GRAPH_OT_interpolation_type(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* id-props */ - ot->prop = RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_beztriple_interpolation_mode_items, 0, "Type", ""); } /* ******************** Set Easing Operator *********************** */ @@ -1607,7 +1607,7 @@ void GRAPH_OT_easing_type(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* id-props */ - ot->prop = RNA_def_enum(ot->srna, "type", beztriple_interpolation_easing_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_beztriple_interpolation_easing_items, 0, "Type", ""); } /* ******************** Set Handle-Type Operator *********************** */ @@ -1683,7 +1683,7 @@ void GRAPH_OT_handle_type(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* id-props */ - ot->prop = RNA_def_enum(ot->srna, "type", keyframe_handle_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_keyframe_handle_type_items, 0, "Type", ""); } /* ************************************************************************** */ @@ -2299,7 +2299,7 @@ static EnumPropertyItem *graph_fmodifier_itemf(bContext *C, PointerRNA *UNUSED(p int i = 0; if (C == NULL) { - return fmodifier_type_items; + return rna_enum_fmodifier_type_items; } /* start from 1 to skip the 'Invalid' modifier type */ @@ -2311,8 +2311,8 @@ static EnumPropertyItem *graph_fmodifier_itemf(bContext *C, PointerRNA *UNUSED(p if (fmi == NULL) continue; - index = RNA_enum_from_value(fmodifier_type_items, fmi->type); - RNA_enum_item_add(&item, &totitem, &fmodifier_type_items[index]); + index = RNA_enum_from_value(rna_enum_fmodifier_type_items, fmi->type); + RNA_enum_item_add(&item, &totitem, &rna_enum_fmodifier_type_items[index]); } RNA_enum_item_end(&item, &totitem); @@ -2390,7 +2390,7 @@ void GRAPH_OT_fmodifier_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* id-props */ - prop = RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", ""); + prop = RNA_def_enum(ot->srna, "type", rna_enum_fmodifier_type_items, 0, "Type", ""); RNA_def_enum_funcs(prop, graph_fmodifier_itemf); ot->prop = prop; diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 380ccebba30..f860ad8aa04 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -2427,7 +2427,7 @@ void IMAGE_OT_new(wmOperatorType *ot) RNA_def_property_subtype(prop, PROP_COLOR_GAMMA); RNA_def_property_float_array_default(prop, default_color); RNA_def_boolean(ot->srna, "alpha", 1, "Alpha", "Create an image with an alpha channel"); - RNA_def_enum(ot->srna, "generated_type", image_generated_type_items, IMA_GENTYPE_BLANK, + RNA_def_enum(ot->srna, "generated_type", rna_enum_image_generated_type_items, IMA_GENTYPE_BLANK, "Generated Type", "Fill the image with a grid for UV map testing"); RNA_def_boolean(ot->srna, "float", 0, "32 bit Float", "Create image with 32 bit floating point bit depth"); prop = RNA_def_enum(ot->srna, "gen_context", gen_context_items, 0, "Gen Context", "Generation context"); @@ -2718,7 +2718,7 @@ void IMAGE_OT_unpack(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack"); + RNA_def_enum(ot->srna, "method", rna_enum_unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack"); RNA_def_string(ot->srna, "id", NULL, MAX_ID_NAME - 2, "Image Name", "Image datablock name to unpack"); /* XXX, weark!, will fail with library, name collisions */ } diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index abcb767958f..51f4a61047d 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -447,7 +447,7 @@ static void LOGIC_OT_controller_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add"); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add"); prop = RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the Controller to add"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_string(ot->srna, "object", NULL, MAX_NAME, "Object", "Name of the Object to add the Controller to"); diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 36a4800b59d..ff71cc47158 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -1102,7 +1102,7 @@ void NLA_OT_duplicate(wmOperatorType *ot) ot->prop = RNA_def_boolean(ot->srna, "linked", false, "Linked", "When duplicating strips, assign new copies of the actions they use"); /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", rna_enum_transform_mode_types, TFM_TRANSLATION, "Mode", ""); } /* ******************** Delete Strips Operator ***************************** */ @@ -2327,7 +2327,7 @@ void NLA_OT_fmodifier_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* id-props */ - ot->prop = RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_fmodifier_type_items, 0, "Type", ""); RNA_def_boolean(ot->srna, "only_active", 0, "Only Active", "Only add a F-Modifier of the specified type to the active strip"); } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 108f12f592f..e4861a713b7 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -791,7 +791,7 @@ static void edit_node_properties(wmOperatorType *ot) /* XXX could node be a context pointer? */ RNA_def_string(ot->srna, "node", NULL, MAX_NAME, "Node", ""); RNA_def_int(ot->srna, "socket", 0, 0, MAX_SOCKET, "Socket", "", 0, MAX_SOCKET); - RNA_def_enum(ot->srna, "in_out", node_socket_in_out_items, SOCK_IN, "Socket Side", ""); + RNA_def_enum(ot->srna, "in_out", rna_enum_node_socket_in_out_items, SOCK_IN, "Socket Side", ""); } static int edit_node_invoke_properties(bContext *C, wmOperator *op) @@ -2251,7 +2251,7 @@ void NODE_OT_tree_socket_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_enum(ot->srna, "in_out", node_socket_in_out_items, SOCK_IN, "Socket Type", ""); + RNA_def_enum(ot->srna, "in_out", rna_enum_node_socket_in_out_items, SOCK_IN, "Socket Type", ""); } /********************** Remove interface socket operator *********************/ diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 09560bfdd61..70adaa2f3a6 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -2219,7 +2219,7 @@ void SEQUENCER_OT_duplicate(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* to give to transform */ - RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); + RNA_def_enum(ot->srna, "mode", rna_enum_transform_mode_types, TFM_TRANSLATION, "Mode", ""); } /* delete operator */ diff --git a/source/blender/editors/space_sequencer/sequencer_modifier.c b/source/blender/editors/space_sequencer/sequencer_modifier.c index fad317fdd4e..5d4ea47452e 100644 --- a/source/blender/editors/space_sequencer/sequencer_modifier.c +++ b/source/blender/editors/space_sequencer/sequencer_modifier.c @@ -96,7 +96,7 @@ void SEQUENCER_OT_strip_modifier_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - prop = RNA_def_enum(ot->srna, "type", sequence_modifier_type_items, seqModifierType_ColorBalance, "Type", ""); + prop = RNA_def_enum(ot->srna, "type", rna_enum_sequence_modifier_type_items, seqModifierType_ColorBalance, "Type", ""); ot->prop = prop; } diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 42895a7530b..f5247fff4a7 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -313,7 +313,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) row = uiLayoutRow(layout, false); { - EnumPropertyItem *item = object_mode_items; + EnumPropertyItem *item = rna_enum_object_mode_items; const char *name = ""; int icon = ICON_OBJECT_DATAMODE; diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 45afeeb7da9..454fffd6926 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -122,7 +122,7 @@ static TransformModeItem transform_modes[] = {NULL, 0} }; -EnumPropertyItem transform_mode_types[] = +EnumPropertyItem rna_enum_transform_mode_types[] = { {TFM_INIT, "INIT", 0, "Init", ""}, {TFM_DUMMY, "DUMMY", 0, "Dummy", ""}, @@ -524,8 +524,8 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) if (flags & P_PROPORTIONAL) { - RNA_def_enum(ot->srna, "proportional", proportional_editing_items, 0, "Proportional Editing", ""); - prop = RNA_def_enum(ot->srna, "proportional_edit_falloff", proportional_falloff_items, 0, + RNA_def_enum(ot->srna, "proportional", rna_enum_proportional_editing_items, 0, "Proportional Editing", ""); + prop = RNA_def_enum(ot->srna, "proportional_edit_falloff", rna_enum_proportional_falloff_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode"); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_float(ot->srna, "proportional_size", 1, 0.00001f, FLT_MAX, "Proportional Size", "", 0.001, 100); @@ -536,7 +536,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) RNA_def_property_flag(prop, PROP_HIDDEN); if (flags & P_GEO_SNAP) { - prop = RNA_def_enum(ot->srna, "snap_target", snap_target_items, 0, "Target", ""); + prop = RNA_def_enum(ot->srna, "snap_target", rna_enum_snap_target_items, 0, "Target", ""); RNA_def_property_flag(prop, PROP_HIDDEN); prop = RNA_def_float_vector(ot->srna, "snap_point", 3, NULL, -FLT_MAX, FLT_MAX, "Point", "", -FLT_MAX, FLT_MAX); RNA_def_property_flag(prop, PROP_HIDDEN); @@ -985,7 +985,7 @@ static void TRANSFORM_OT_transform(struct wmOperatorType *ot) ot->cancel = transform_cancel; ot->poll = ED_operator_screenactive; - 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); RNA_def_float_vector(ot->srna, "value", 4, NULL, -FLT_MAX, FLT_MAX, "Values", "", -FLT_MAX, FLT_MAX); diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 51ed8bb6c0d..baaa2da5d30 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -62,7 +62,7 @@ struct Stereo3dFormat; #define OP_MAX_TYPENAME 64 #define KMAP_MAX_NAME 64 -/* keep in sync with 'wm_report_items' in wm_rna.c */ +/* keep in sync with 'rna_enum_wm_report_items' in wm_rna.c */ typedef enum ReportType { RPT_DEBUG = (1 << 0), RPT_INFO = (1 << 1), diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index b1a631cc610..0066236e3f0 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -35,127 +35,161 @@ struct bNodeSocketType; /* Types */ -extern EnumPropertyItem id_type_items[]; - /* use in cases where only dynamic types are used */ extern EnumPropertyItem DummyRNA_NULL_items[]; extern EnumPropertyItem DummyRNA_DEFAULT_items[]; -extern EnumPropertyItem object_mode_items[]; -extern EnumPropertyItem object_empty_drawtype_items[]; -extern EnumPropertyItem metaelem_type_items[]; +/* all others should follow 'rna_enum_*_items' naming */ +extern EnumPropertyItem rna_enum_id_type_items[]; + +extern EnumPropertyItem rna_enum_object_mode_items[]; +extern EnumPropertyItem rna_enum_object_empty_drawtype_items[]; +extern EnumPropertyItem rna_enum_metaelem_type_items[]; + +extern EnumPropertyItem rna_enum_proportional_falloff_items[]; +extern EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[]; +extern EnumPropertyItem rna_enum_proportional_editing_items[]; +extern EnumPropertyItem rna_enum_snap_target_items[]; +extern EnumPropertyItem rna_enum_snap_element_items[]; +extern EnumPropertyItem rna_enum_snap_node_element_items[]; +extern EnumPropertyItem rna_enum_mesh_select_mode_items[]; +extern EnumPropertyItem rna_enum_mesh_delimit_mode_items[]; +extern EnumPropertyItem rna_enum_space_type_items[]; +extern EnumPropertyItem rna_enum_region_type_items[]; +extern EnumPropertyItem rna_enum_object_modifier_type_items[]; +extern EnumPropertyItem rna_enum_constraint_type_items[]; +extern EnumPropertyItem rna_enum_boidrule_type_items[]; +extern EnumPropertyItem rna_enum_sequence_modifier_type_items[]; + +extern EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[]; +extern EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[]; + +extern EnumPropertyItem rna_enum_image_type_items[]; +extern EnumPropertyItem rna_enum_image_color_mode_items[]; +extern EnumPropertyItem rna_enum_image_color_depth_items[]; +extern EnumPropertyItem rna_enum_image_generated_type_items[]; + +extern EnumPropertyItem rna_enum_normal_space_items[]; +extern EnumPropertyItem rna_enum_normal_swizzle_items[]; +extern EnumPropertyItem rna_enum_bake_save_mode_items[]; + +extern EnumPropertyItem rna_enum_views_format_items[]; +extern EnumPropertyItem rna_enum_views_format_multilayer_items[]; +extern EnumPropertyItem rna_enum_views_format_multiview_items[]; +extern EnumPropertyItem rna_enum_stereo3d_display_items[]; +extern EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[]; +extern EnumPropertyItem rna_enum_stereo3d_interlace_type_items[]; + +extern EnumPropertyItem rna_enum_exr_codec_items[]; +extern EnumPropertyItem rna_enum_color_sets_items[]; + +extern EnumPropertyItem rna_enum_beztriple_keyframe_type_items[]; +extern EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[]; +extern EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[]; +extern EnumPropertyItem rna_enum_keyframe_handle_type_items[]; + +extern EnumPropertyItem rna_enum_keyblock_type_items[]; + +extern EnumPropertyItem rna_enum_keyingset_path_grouping_items[]; +extern EnumPropertyItem rna_enum_keying_flag_items[]; -extern EnumPropertyItem proportional_falloff_items[]; -extern EnumPropertyItem proportional_falloff_curve_only_items[]; -extern EnumPropertyItem proportional_editing_items[]; -extern EnumPropertyItem snap_target_items[]; -extern EnumPropertyItem snap_element_items[]; -extern EnumPropertyItem snap_node_element_items[]; -extern EnumPropertyItem mesh_select_mode_items[]; -extern EnumPropertyItem mesh_delimit_mode_items[]; -extern EnumPropertyItem space_type_items[]; -extern EnumPropertyItem region_type_items[]; -extern EnumPropertyItem modifier_type_items[]; -extern EnumPropertyItem constraint_type_items[]; -extern EnumPropertyItem boidrule_type_items[]; -extern EnumPropertyItem sequence_modifier_type_items[]; +extern EnumPropertyItem rna_enum_keyframe_paste_offset_items[]; +extern EnumPropertyItem rna_enum_keyframe_paste_merge_items[]; -extern EnumPropertyItem modifier_triangulate_quad_method_items[]; -extern EnumPropertyItem modifier_triangulate_ngon_method_items[]; +extern EnumPropertyItem rna_enum_fmodifier_type_items[]; -extern EnumPropertyItem image_type_items[]; -extern EnumPropertyItem image_color_mode_items[]; -extern EnumPropertyItem image_color_depth_items[]; -extern EnumPropertyItem image_generated_type_items[]; +extern EnumPropertyItem rna_enum_nla_mode_extend_items[]; +extern EnumPropertyItem rna_enum_nla_mode_blend_items[]; -extern EnumPropertyItem normal_space_items[]; -extern EnumPropertyItem normal_swizzle_items[]; -extern EnumPropertyItem bake_save_mode_items[]; +extern EnumPropertyItem rna_enum_motionpath_bake_location_items[]; -extern EnumPropertyItem views_format_items[]; -extern EnumPropertyItem views_format_multilayer_items[]; -extern EnumPropertyItem views_format_multiview_items[]; -extern EnumPropertyItem stereo3d_display_items[]; -extern EnumPropertyItem stereo3d_anaglyph_type_items[]; -extern EnumPropertyItem stereo3d_interlace_type_items[]; +extern EnumPropertyItem rna_enum_event_value_items[]; +extern EnumPropertyItem rna_enum_event_type_items[]; +extern EnumPropertyItem rna_enum_operator_return_items[]; -extern EnumPropertyItem exr_codec_items[]; -extern EnumPropertyItem color_sets_items[]; +extern EnumPropertyItem rna_enum_brush_sculpt_tool_items[]; +extern EnumPropertyItem rna_enum_brush_vertex_tool_items[]; +extern EnumPropertyItem rna_enum_brush_image_tool_items[]; -extern EnumPropertyItem beztriple_keyframe_type_items[]; -extern EnumPropertyItem beztriple_interpolation_mode_items[]; -extern EnumPropertyItem beztriple_interpolation_easing_items[]; -extern EnumPropertyItem keyframe_handle_type_items[]; +extern EnumPropertyItem rna_enum_symmetrize_direction_items[]; -extern EnumPropertyItem keyblock_type_items[]; +extern EnumPropertyItem rna_enum_texture_type_items[]; -extern EnumPropertyItem keyingset_path_grouping_items[]; -extern EnumPropertyItem keying_flag_items[]; +extern EnumPropertyItem rna_enum_lamp_type_items[]; -extern EnumPropertyItem keyframe_paste_offset_items[]; -extern EnumPropertyItem keyframe_paste_merge_items[]; +extern EnumPropertyItem rna_enum_unpack_method_items[]; -extern EnumPropertyItem fmodifier_type_items[]; +extern EnumPropertyItem rna_enum_object_type_items[]; -extern EnumPropertyItem nla_mode_extend_items[]; -extern EnumPropertyItem nla_mode_blend_items[]; +extern EnumPropertyItem rna_enum_object_type_curve_items[]; -extern EnumPropertyItem motionpath_bake_location_items[]; +extern EnumPropertyItem rna_enum_rigidbody_object_type_items[]; +extern EnumPropertyItem rna_enum_rigidbody_object_shape_items[]; +extern EnumPropertyItem rna_enum_rigidbody_constraint_type_items[]; -extern EnumPropertyItem event_value_items[]; -extern EnumPropertyItem event_type_items[]; -extern EnumPropertyItem operator_return_items[]; +extern EnumPropertyItem rna_enum_object_axis_items[]; +extern EnumPropertyItem rna_enum_object_axis_unsigned_items[]; -extern EnumPropertyItem brush_sculpt_tool_items[]; -extern EnumPropertyItem brush_vertex_tool_items[]; -extern EnumPropertyItem brush_image_tool_items[]; +extern EnumPropertyItem rna_enum_controller_type_items[]; -extern EnumPropertyItem symmetrize_direction_items[]; +extern EnumPropertyItem rna_enum_render_pass_type_items[]; +extern EnumPropertyItem rna_enum_render_pass_debug_type_items[]; -extern EnumPropertyItem texture_type_items[]; +extern EnumPropertyItem rna_enum_keymap_propvalue_items[]; -extern EnumPropertyItem lamp_type_items[]; +extern EnumPropertyItem rna_enum_operator_context_items[]; -extern EnumPropertyItem unpack_method_items[]; +extern EnumPropertyItem rna_enum_wm_report_items[]; -extern EnumPropertyItem object_type_items[]; +extern EnumPropertyItem rna_enum_transform_mode_types[]; -extern EnumPropertyItem object_type_curve_items[]; +extern EnumPropertyItem rna_enum_posebone_rotmode_items[]; -extern EnumPropertyItem rigidbody_object_type_items[]; -extern EnumPropertyItem rigidbody_object_shape_items[]; -extern EnumPropertyItem rigidbody_constraint_type_items[]; +extern EnumPropertyItem rna_enum_property_type_items[]; +extern EnumPropertyItem rna_enum_property_subtype_items[]; +extern EnumPropertyItem rna_enum_property_unit_items[]; -extern EnumPropertyItem object_axis_items[]; -extern EnumPropertyItem object_axis_unsigned_items[]; +extern EnumPropertyItem rna_enum_gameproperty_type_items[]; -extern EnumPropertyItem controller_type_items[]; +extern EnumPropertyItem rna_enum_viewport_shade_items[]; -extern EnumPropertyItem render_pass_type_items[]; -extern EnumPropertyItem render_pass_debug_type_items[]; +extern EnumPropertyItem rna_enum_navigation_mode_items[]; -extern EnumPropertyItem keymap_propvalue_items[]; +extern EnumPropertyItem rna_enum_file_sort_items[]; -extern EnumPropertyItem operator_context_items[]; +extern EnumPropertyItem rna_enum_node_socket_in_out_items[]; +extern EnumPropertyItem rna_enum_node_icon_items[]; -extern EnumPropertyItem wm_report_items[]; +extern EnumPropertyItem rna_enum_node_math_items[]; +extern EnumPropertyItem rna_enum_node_vec_math_items[]; +extern EnumPropertyItem rna_enum_node_filter_items[]; -extern EnumPropertyItem transform_mode_types[]; +extern EnumPropertyItem rna_enum_ramp_blend_items[]; -extern EnumPropertyItem posebone_rotmode_items[]; +extern EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[]; -extern EnumPropertyItem property_type_items[]; -extern EnumPropertyItem property_subtype_items[]; -extern EnumPropertyItem property_unit_items[]; +extern EnumPropertyItem rna_enum_clip_editor_mode_items[]; -extern EnumPropertyItem gameproperty_type_items[]; +extern EnumPropertyItem rna_enum_icon_items[]; +extern EnumPropertyItem rna_enum_uilist_layout_type_items[]; -extern EnumPropertyItem viewport_shade_items[]; +extern EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[]; +extern EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[]; +extern EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[]; +extern EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[]; -extern EnumPropertyItem navigation_mode_items[]; +extern EnumPropertyItem rna_enum_window_cursor_items[]; -extern EnumPropertyItem file_sort_items[]; +extern EnumPropertyItem rna_enum_dt_method_vertex_items[]; +extern EnumPropertyItem rna_enum_dt_method_edge_items[]; +extern EnumPropertyItem rna_enum_dt_method_loop_items[]; +extern EnumPropertyItem rna_enum_dt_method_poly_items[]; +extern EnumPropertyItem rna_enum_dt_mix_mode_items[]; +extern EnumPropertyItem rna_enum_dt_layers_select_src_items[]; +extern EnumPropertyItem rna_enum_dt_layers_select_dst_items[]; + +/* API calls */ int rna_node_tree_type_to_enum(struct bNodeTreeType *typeinfo); int rna_node_tree_idname_to_enum(const char *idname); struct bNodeTreeType *rna_node_tree_type_from_enum(int value); @@ -171,37 +205,6 @@ int rna_node_socket_idname_to_enum(const char *idname); struct bNodeSocketType *rna_node_socket_type_from_enum(int value); EnumPropertyItem *rna_node_socket_type_itemf(void *data, int (*poll)(void *data, struct bNodeSocketType *), bool *r_free); -extern EnumPropertyItem node_socket_in_out_items[]; -extern EnumPropertyItem node_icon_items[]; - -extern EnumPropertyItem node_math_items[]; -extern EnumPropertyItem node_vec_math_items[]; -extern EnumPropertyItem node_filter_items[]; - -extern EnumPropertyItem ramp_blend_items[]; - -extern EnumPropertyItem prop_dynamicpaint_type_items[]; - -extern EnumPropertyItem clip_editor_mode_items[]; - -extern EnumPropertyItem icon_items[]; -extern EnumPropertyItem uilist_layout_type_items[]; - -extern EnumPropertyItem linestyle_color_modifier_type_items[]; -extern EnumPropertyItem linestyle_alpha_modifier_type_items[]; -extern EnumPropertyItem linestyle_thickness_modifier_type_items[]; -extern EnumPropertyItem linestyle_geometry_modifier_type_items[]; - -extern EnumPropertyItem window_cursor_items[]; - -extern EnumPropertyItem DT_method_vertex_items[]; -extern EnumPropertyItem DT_method_edge_items[]; -extern EnumPropertyItem DT_method_loop_items[]; -extern EnumPropertyItem DT_method_poly_items[]; -extern EnumPropertyItem DT_mix_mode_items[]; -extern EnumPropertyItem DT_layers_select_src_items[]; -extern EnumPropertyItem DT_layers_select_dst_items[]; - struct bContext; struct PointerRNA; struct PropertyRNA; diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index e1e892a6b65..5d36a0a4d4e 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -47,7 +47,7 @@ /* enum of ID-block types * NOTE: need to keep this in line with the other defines for these */ -EnumPropertyItem id_type_items[] = { +EnumPropertyItem rna_enum_id_type_items[] = { {ID_AC, "ACTION", ICON_ACTION, "Action", ""}, {ID_AR, "ARMATURE", ICON_ARMATURE_DATA, "Armature", ""}, {ID_BR, "BRUSH", ICON_BRUSH_DATA, "Brush", ""}, diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 4a537f8da42..9ae9f11b462 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -704,7 +704,7 @@ static void rna_def_action(BlenderRNA *brna) * but is still available/editable in 'emergencies' */ prop = RNA_def_property(srna, "id_root", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "idroot"); - RNA_def_property_enum_items(prop, id_type_items); + RNA_def_property_enum_items(prop, rna_enum_id_type_items); RNA_def_property_ui_text(prop, "ID Root Type", "Type of ID block that action can be used on - " "DO NOT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING"); diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 1fba11b89b4..8502c1d0686 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -45,7 +45,7 @@ #include "ED_keyframing.h" /* exported for use in API */ -EnumPropertyItem keyingset_path_grouping_items[] = { +EnumPropertyItem rna_enum_keyingset_path_grouping_items[] = { {KSP_GROUP_NAMED, "NAMED", 0, "Named Group", ""}, {KSP_GROUP_NONE, "NONE", 0, "None", ""}, {KSP_GROUP_KSNAME, "KEYINGSET", 0, "Keying Set Name", ""}, @@ -55,7 +55,7 @@ EnumPropertyItem keyingset_path_grouping_items[] = { /* It would be cool to get rid of this 'INSERTKEY_' prefix in 'py strings' values, but it would break existing * exported keyingset... :/ */ -EnumPropertyItem keying_flag_items[] = { +EnumPropertyItem rna_enum_keying_flag_items[] = { {INSERTKEY_NEEDED, "INSERTKEY_NEEDED", 0, "Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves"}, {INSERTKEY_MATRIX, "INSERTKEY_VISUAL", 0, "Visual Keying", @@ -652,7 +652,7 @@ static void rna_def_keyingset_info(BlenderRNA *brna) */ prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "keyingflag"); - RNA_def_property_enum_items(prop, keying_flag_items); + RNA_def_property_enum_items(prop, rna_enum_keying_flag_items); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL | PROP_ENUM_FLAG); RNA_def_property_ui_text(prop, "Options", "Keying Set options to use when inserting keyframes"); @@ -710,7 +710,7 @@ static void rna_def_keyingset_path(BlenderRNA *brna) prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "idtype"); - RNA_def_property_enum_items(prop, id_type_items); + RNA_def_property_enum_items(prop, rna_enum_id_type_items); RNA_def_property_enum_default(prop, ID_OB); RNA_def_property_enum_funcs(prop, NULL, "rna_ksPath_id_type_set", NULL); RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used"); @@ -724,7 +724,7 @@ static void rna_def_keyingset_path(BlenderRNA *brna) /* Grouping */ prop = RNA_def_property(srna, "group_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "groupmode"); - RNA_def_property_enum_items(prop, keyingset_path_grouping_items); + RNA_def_property_enum_items(prop, rna_enum_keyingset_path_grouping_items); RNA_def_property_ui_text(prop, "Grouping Method", "Method used to define which Group-name to use"); RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_EDITED, NULL); /* XXX: maybe a bit too noisy */ @@ -789,7 +789,7 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop) "The index of the destination property (i.e. axis of Location/Rotation/etc.), " "or -1 for the entire array", 0, INT_MAX); /* grouping */ - RNA_def_enum(func, "group_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME, + RNA_def_enum(func, "group_method", rna_enum_keyingset_path_grouping_items, KSP_GROUP_KSNAME, "Grouping Method", "Method used to define which Group-name to use"); RNA_def_string(func, "group_name", NULL, 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name)"); @@ -984,14 +984,14 @@ static void rna_def_animdata(BlenderRNA *brna) /* Active Action Settings */ prop = RNA_def_property(srna, "action_extrapolation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "act_extendmode"); - RNA_def_property_enum_items(prop, nla_mode_extend_items); + RNA_def_property_enum_items(prop, rna_enum_nla_mode_extend_items); RNA_def_property_ui_text(prop, "Action Extrapolation", "Action to take for gaps past the Active Action's range (when evaluating with NLA)"); RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); prop = RNA_def_property(srna, "action_blend_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "act_blendmode"); - RNA_def_property_enum_items(prop, nla_mode_blend_items); + RNA_def_property_enum_items(prop, rna_enum_nla_mode_blend_items); RNA_def_property_ui_text(prop, "Action Blending", "Method used for combining Active Action's result with result of NLA stack"); RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); /* this will do? */ diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c index 2f9582506de..8e42e68ed1e 100644 --- a/source/blender/makesrna/intern/rna_animviz.c +++ b/source/blender/makesrna/intern/rna_animviz.c @@ -43,7 +43,7 @@ /* Which part of bone(s) get baked */ // TODO: icons? -EnumPropertyItem motionpath_bake_location_items[] = { +EnumPropertyItem rna_enum_motionpath_bake_location_items[] = { {MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"}, {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"}, //{MOTIONPATH_BAKE_CENTERS, "CENTROID", 0, "Centers", "Calculate bone paths from center of mass"}, @@ -269,7 +269,7 @@ static void rna_def_animviz_paths(BlenderRNA *brna) prop = RNA_def_property(srna, "bake_location", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "path_bakeflag"); - RNA_def_property_enum_items(prop, motionpath_bake_location_items); + RNA_def_property_enum_items(prop, rna_enum_motionpath_bake_location_items); RNA_def_property_ui_text(prop, "Bake Location", "When calculating Bone Paths, use Head or Tips"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */ diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c index 33048a7196b..72f67b86c23 100644 --- a/source/blender/makesrna/intern/rna_boid.c +++ b/source/blender/makesrna/intern/rna_boid.c @@ -48,7 +48,7 @@ #include "WM_api.h" #include "WM_types.h" -EnumPropertyItem boidrule_type_items[] = { +EnumPropertyItem rna_enum_boidrule_type_items[] = { {eBoidRuleType_Goal, "GOAL", 0, "Goal", "Go to assigned object or loudest assigned signal source"}, {eBoidRuleType_Avoid, "AVOID", 0, "Avoid", "Get away from assigned object or loudest assigned signal source"}, {eBoidRuleType_AvoidCollision, "AVOID_COLLISION", 0, "Avoid Collision", @@ -432,7 +432,7 @@ static void rna_def_boidrule(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, boidrule_type_items); + RNA_def_property_enum_items(prop, rna_enum_boidrule_type_items); RNA_def_property_ui_text(prop, "Type", ""); /* flags */ diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index a10b543f9b5..691fba273d3 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -62,7 +62,7 @@ static EnumPropertyItem sculpt_stroke_method_items[] = { }; -EnumPropertyItem brush_sculpt_tool_items[] = { +EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = { {SCULPT_TOOL_BLOB, "BLOB", ICON_BRUSH_BLOB, "Blob", ""}, {SCULPT_TOOL_CLAY, "CLAY", ICON_BRUSH_CLAY, "Clay", ""}, {SCULPT_TOOL_CLAY_STRIPS, "CLAY_STRIPS", ICON_BRUSH_CLAY_STRIPS, "Clay Strips", ""}, @@ -86,7 +86,7 @@ EnumPropertyItem brush_sculpt_tool_items[] = { }; -EnumPropertyItem brush_vertex_tool_items[] = { +EnumPropertyItem rna_enum_brush_vertex_tool_items[] = { {PAINT_BLEND_MIX, "MIX", ICON_BRUSH_MIX, "Mix", "Use mix blending mode while painting"}, {PAINT_BLEND_ADD, "ADD", ICON_BRUSH_ADD, "Add", "Use add blending mode while painting"}, {PAINT_BLEND_SUB, "SUB", ICON_BRUSH_SUBTRACT, "Subtract", "Use subtract blending mode while painting"}, @@ -97,7 +97,7 @@ EnumPropertyItem brush_vertex_tool_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem brush_image_tool_items[] = { +EnumPropertyItem rna_enum_brush_image_tool_items[] = { {PAINT_TOOL_DRAW, "DRAW", ICON_BRUSH_TEXDRAW, "Draw", ""}, {PAINT_TOOL_SOFTEN, "SOFTEN", ICON_BRUSH_SOFTEN, "Soften", ""}, {PAINT_TOOL_SMEAR, "SMEAR", ICON_BRUSH_SMEAR, "Smear", ""}, @@ -861,19 +861,19 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Brush_update"); prop = RNA_def_property(srna, "sculpt_tool", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, brush_sculpt_tool_items); + RNA_def_property_enum_items(prop, rna_enum_brush_sculpt_tool_items); RNA_def_property_ui_text(prop, "Sculpt Tool", ""); RNA_def_property_update(prop, 0, "rna_Brush_sculpt_tool_update"); prop = RNA_def_property(srna, "vertex_tool", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "vertexpaint_tool"); - RNA_def_property_enum_items(prop, brush_vertex_tool_items); + RNA_def_property_enum_items(prop, rna_enum_brush_vertex_tool_items); RNA_def_property_ui_text(prop, "Blending mode", "Brush blending mode"); RNA_def_property_update(prop, 0, "rna_Brush_vertex_tool_update"); prop = RNA_def_property(srna, "image_tool", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "imagepaint_tool"); - RNA_def_property_enum_items(prop, brush_image_tool_items); + RNA_def_property_enum_items(prop, rna_enum_brush_image_tool_items); RNA_def_property_ui_text(prop, "Image Paint Tool", ""); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_Brush_imagepaint_tool_update"); diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 6b1f4856f9c..4b4e1c929f2 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -46,7 +46,7 @@ #include "ED_object.h" /* please keep the names in sync with constraint.c */ -EnumPropertyItem constraint_type_items[] = { +EnumPropertyItem rna_enum_constraint_type_items[] = { {0, "", 0, N_("Motion Tracking"), ""}, {CONSTRAINT_TYPE_CAMERASOLVER, "CAMERA_SOLVER", ICON_CONSTRAINT_DATA, "Camera Solver", ""}, {CONSTRAINT_TYPE_FOLLOWTRACK, "FOLLOW_TRACK", ICON_CONSTRAINT_DATA, "Follow Track", ""}, @@ -1646,19 +1646,19 @@ static void rna_def_constraint_transform(BlenderRNA *brna) prop = RNA_def_property(srna, "map_to_x_from", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "map[0]"); - RNA_def_property_enum_items(prop, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Map To X From", "The source axis constrained object's X axis uses"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); prop = RNA_def_property(srna, "map_to_y_from", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "map[1]"); - RNA_def_property_enum_items(prop, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Map To Y From", "The source axis constrained object's Y axis uses"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); prop = RNA_def_property(srna, "map_to_z_from", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "map[2]"); - RNA_def_property_enum_items(prop, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Map To Z From", "The source axis constrained object's Z axis uses"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); @@ -2199,7 +2199,7 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna) prop = RNA_def_property(srna, "project_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "projAxis"); - RNA_def_property_enum_items(prop, object_axis_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_items); RNA_def_property_ui_text(prop, "Project Axis", "Axis constrain to"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); @@ -2603,7 +2603,7 @@ void RNA_def_constraint(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, constraint_type_items); + RNA_def_property_enum_items(prop, rna_enum_constraint_type_items); RNA_def_property_ui_text(prop, "Type", ""); prop = RNA_def_property(srna, "owner_space", PROP_ENUM, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c index a5922fd6c28..ed700916584 100644 --- a/source/blender/makesrna/intern/rna_controller.c +++ b/source/blender/makesrna/intern/rna_controller.c @@ -40,7 +40,7 @@ #include "WM_types.h" -EnumPropertyItem controller_type_items[] = { +EnumPropertyItem rna_enum_controller_type_items[] = { {CONT_LOGIC_AND, "LOGIC_AND", 0, "And", "Logic And"}, {CONT_LOGIC_OR, "LOGIC_OR", 0, "Or", "Logic Or"}, {CONT_LOGIC_NAND, "LOGIC_NAND", 0, "Nand", "Logic Nand"}, @@ -213,7 +213,7 @@ void RNA_def_controller(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_funcs(prop, NULL, "rna_Controller_type_set", NULL); - RNA_def_property_enum_items(prop, controller_type_items); + RNA_def_property_enum_items(prop, rna_enum_controller_type_items); RNA_def_property_ui_text(prop, "Type", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index c5e1914bd32..3fbc7899ed4 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -56,7 +56,7 @@ static EnumPropertyItem beztriple_handle_type_items[] = { }; #endif -EnumPropertyItem keyframe_handle_type_items[] = { +EnumPropertyItem rna_enum_keyframe_handle_type_items[] = { {HD_FREE, "FREE", 0, "Free", ""}, {HD_VECT, "VECTOR", 0, "Vector", ""}, {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, @@ -65,7 +65,7 @@ EnumPropertyItem keyframe_handle_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem beztriple_interpolation_mode_items[] = { +EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = { /* interpolation */ {0, "", 0, N_("Interpolation"), "Standard transitions between keyframes"}, {BEZT_IPO_CONST, "CONSTANT", ICON_IPO_CONSTANT, "Constant", "No interpolation, value of A gets held until B is encountered"}, diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index 229cdaa6005..fc2b028e829 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -45,7 +45,7 @@ #include "WM_types.h" -EnumPropertyItem prop_dynamicpaint_type_items[] = { +EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[] = { {MOD_DYNAMICPAINT_TYPE_CANVAS, "CANVAS", 0, "Canvas", ""}, {MOD_DYNAMICPAINT_TYPE_BRUSH, "BRUSH", 0, "Brush", ""}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 576af7b3a1c..398c9aa4582 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -48,7 +48,7 @@ #include "ED_keyframing.h" #include "ED_keyframes_edit.h" -EnumPropertyItem fmodifier_type_items[] = { +EnumPropertyItem rna_enum_fmodifier_type_items[] = { {FMODIFIER_TYPE_NULL, "NULL", 0, "Invalid", ""}, {FMODIFIER_TYPE_GENERATOR, "GENERATOR", 0, "Generator", "Generate a curve using a factorized or expanded polynomial"}, @@ -69,7 +69,7 @@ EnumPropertyItem fmodifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem beztriple_keyframe_type_items[] = { +EnumPropertyItem rna_enum_beztriple_keyframe_type_items[] = { {BEZT_KEYTYPE_KEYFRAME, "KEYFRAME", 0, "Keyframe", "Normal keyframe - e.g. for key poses"}, {BEZT_KEYTYPE_BREAKDOWN, "BREAKDOWN", 0, "Breakdown", "A breakdown pose - e.g. for transitions between key poses"}, {BEZT_KEYTYPE_EXTREME, "EXTREME", 0, "Extreme", "An 'extreme' pose, or some other purpose as needed"}, @@ -77,7 +77,7 @@ EnumPropertyItem beztriple_keyframe_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem beztriple_interpolation_easing_items[] = { +EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[] = { /* XXX: auto-easing is currently using a placeholder icon... */ {BEZT_IPO_EASE_AUTO, "AUTO", ICON_IPO_EASE_IN_OUT, "Automatic Easing", "Easing type is chosen automatically based on what the type of interpolation used " @@ -1293,7 +1293,7 @@ static void rna_def_fmodifier(BlenderRNA *brna) /* type */ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_enum_items(prop, fmodifier_type_items); + RNA_def_property_enum_items(prop, rna_enum_fmodifier_type_items); RNA_def_property_ui_text(prop, "Type", "F-Curve Modifier Type"); /* settings */ @@ -1420,7 +1420,7 @@ static void rna_def_drivertarget(BlenderRNA *brna) prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "idtype"); - RNA_def_property_enum_items(prop, id_type_items); + RNA_def_property_enum_items(prop, rna_enum_id_type_items); RNA_def_property_enum_default(prop, ID_OB); RNA_def_property_enum_funcs(prop, NULL, "rna_DriverTarget_id_type_set", NULL); RNA_def_property_editable_func(prop, "rna_DriverTarget_id_type_editable"); @@ -1638,19 +1638,19 @@ static void rna_def_fkeyframe(BlenderRNA *brna) /* Enums */ prop = RNA_def_property(srna, "handle_left_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "h1"); - RNA_def_property_enum_items(prop, keyframe_handle_type_items); + RNA_def_property_enum_items(prop, rna_enum_keyframe_handle_type_items); RNA_def_property_ui_text(prop, "Left Handle Type", "Handle types"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); prop = RNA_def_property(srna, "handle_right_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "h2"); - RNA_def_property_enum_items(prop, keyframe_handle_type_items); + RNA_def_property_enum_items(prop, rna_enum_keyframe_handle_type_items); RNA_def_property_ui_text(prop, "Right Handle Type", "Handle types"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ipo"); - RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items); + RNA_def_property_enum_items(prop, rna_enum_beztriple_interpolation_mode_items); RNA_def_property_ui_text(prop, "Interpolation", "Interpolation method to use for segment of the F-Curve from " "this Keyframe until the next Keyframe"); @@ -1658,14 +1658,14 @@ static void rna_def_fkeyframe(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "hide"); - RNA_def_property_enum_items(prop, beztriple_keyframe_type_items); + RNA_def_property_enum_items(prop, rna_enum_beztriple_keyframe_type_items); RNA_def_property_ui_text(prop, "Type", "Type of keyframe (for visual purposes only)"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); prop = RNA_def_property(srna, "easing", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "easing"); - RNA_def_property_enum_items(prop, beztriple_interpolation_easing_items); + RNA_def_property_enum_items(prop, rna_enum_beztriple_interpolation_easing_items); RNA_def_property_ui_text(prop, "Easing", "Which ends of the segment between this and the next keyframe easing " "interpolation is applied to"); @@ -1737,7 +1737,7 @@ static void rna_def_fcurve_modifiers(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_pointer(func, "fmodifier", "FModifier", "", "New fmodifier"); RNA_def_function_return(func, parm); /* object to add */ - parm = RNA_def_enum(func, "type", fmodifier_type_items, 1, "", "Constraint type to add"); + parm = RNA_def_enum(func, "type", rna_enum_fmodifier_type_items, 1, "", "Constraint type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "remove", "rna_FCurve_modifiers_remove"); diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 4c70dc648db..63fa59828ac 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -44,7 +44,7 @@ #include "WM_types.h" #include "WM_api.h" -EnumPropertyItem image_generated_type_items[] = { +EnumPropertyItem rna_enum_image_generated_type_items[] = { {IMA_GENTYPE_BLANK, "BLANK", 0, "Blank", "Generate a blank image"}, {IMA_GENTYPE_GRID, "UV_GRID", 0, "UV Grid", "Generated grid to test UV mappings"}, {IMA_GENTYPE_GRID_COLOR, "COLOR_GRID", 0, "Color Grid", "Generated improved UV grid to test UV mappings"}, @@ -663,7 +663,7 @@ static void rna_def_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name (without data refreshing)"); prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, image_type_items); + RNA_def_property_enum_items(prop, rna_enum_image_type_items); RNA_def_property_enum_funcs(prop, "rna_Image_file_format_get", "rna_Image_file_format_set", NULL); RNA_def_property_ui_text(prop, "File Format", "Format used for re-saving this file"); @@ -743,7 +743,7 @@ static void rna_def_image(BlenderRNA *brna) /* generated image (image_generated_change_cb) */ prop = RNA_def_property(srna, "generated_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "gen_type"); - RNA_def_property_enum_items(prop, image_generated_type_items); + RNA_def_property_enum_items(prop, rna_enum_image_generated_type_items); RNA_def_property_ui_text(prop, "Generated Type", "Generated image type"); RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_generated_update"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); @@ -918,7 +918,7 @@ static void rna_def_image(BlenderRNA *brna) /* multiview */ prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "views_format"); - RNA_def_property_enum_items(prop, views_format_items); + RNA_def_property_enum_items(prop, rna_enum_views_format_items); RNA_def_property_ui_text(prop, "Views Format", "Mode to load image views"); RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_views_format_update"); diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index 1efa41d1b00..18523f7c3e8 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -333,7 +333,7 @@ void RNA_api_image(StructRNA *srna) func = RNA_def_function(srna, "unpack", "rna_Image_unpack"); RNA_def_function_ui_description(func, "Save an image packed in the .blend file to disk"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - RNA_def_enum(func, "method", unpack_method_items, PF_USE_LOCAL, "method", "How to unpack"); + RNA_def_enum(func, "method", rna_enum_unpack_method_items, PF_USE_LOCAL, "method", "How to unpack"); func = RNA_def_function(srna, "reload", "rna_Image_reload"); RNA_def_function_ui_description(func, "Reload the image from its source path"); diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index feb302bb515..502e22e2c07 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -588,7 +588,7 @@ static char *rna_ShapeKeyPoint_path(PointerRNA *ptr) #else -EnumPropertyItem keyblock_type_items[] = { +EnumPropertyItem rna_enum_keyblock_type_items[] = { {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""}, {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""}, {KEY_CATMULL_ROM, "KEY_CATMULL_ROM", 0, "Catmull-Rom", ""}, @@ -698,7 +698,7 @@ static void rna_def_keyblock(BlenderRNA *brna) prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, keyblock_type_items); + RNA_def_property_enum_items(prop, rna_enum_keyblock_type_items); RNA_def_property_ui_text(prop, "Interpolation", "Interpolation type for absolute shape keys"); RNA_def_property_update(prop, 0, "rna_Key_update_data"); diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 5a941f8b3ad..85a2623dc35 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -166,7 +166,7 @@ static void rna_Lamp_use_nodes_update(bContext *C, PointerRNA *ptr) #else /* Don't define icons here, so they don't show up in the Lamp UI (properties Editor) - DingTo */ -EnumPropertyItem lamp_type_items[] = { +EnumPropertyItem rna_enum_lamp_type_items[] = { {LA_LOCAL, "POINT", 0, "Point", "Omnidirectional point light source"}, {LA_SUN, "SUN", 0, "Sun", "Constant direction parallel ray light source"}, {LA_SPOT, "SPOT", 0, "Spot", "Directional cone light source"}, @@ -250,7 +250,7 @@ static void rna_def_lamp_sky_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "skyblendtype"); - RNA_def_property_enum_items(prop, ramp_blend_items); + RNA_def_property_enum_items(prop, rna_enum_ramp_blend_items); RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); @@ -347,7 +347,7 @@ static void rna_def_lamp(BlenderRNA *brna) RNA_def_struct_ui_icon(srna, ICON_LAMP_DATA); prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, lamp_type_items); + RNA_def_property_enum_items(prop, rna_enum_lamp_type_items); RNA_def_property_ui_text(prop, "Type", "Type of Lamp"); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_LAMP); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c index ae77fb5e798..6bc9cc38a7d 100644 --- a/source/blender/makesrna/intern/rna_lattice.c +++ b/source/blender/makesrna/intern/rna_lattice.c @@ -323,19 +323,19 @@ static void rna_def_lattice(BlenderRNA *brna) prop = RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typeu"); - RNA_def_property_enum_items(prop, keyblock_type_items); + RNA_def_property_enum_items(prop, rna_enum_keyblock_type_items); RNA_def_property_ui_text(prop, "Interpolation Type U", ""); RNA_def_property_update(prop, 0, "rna_Lattice_update_data_editlatt"); prop = RNA_def_property(srna, "interpolation_type_v", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typev"); - RNA_def_property_enum_items(prop, keyblock_type_items); + RNA_def_property_enum_items(prop, rna_enum_keyblock_type_items); RNA_def_property_ui_text(prop, "Interpolation Type V", ""); RNA_def_property_update(prop, 0, "rna_Lattice_update_data_editlatt"); prop = RNA_def_property(srna, "interpolation_type_w", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typew"); - RNA_def_property_enum_items(prop, keyblock_type_items); + RNA_def_property_enum_items(prop, rna_enum_keyblock_type_items); RNA_def_property_ui_text(prop, "Interpolation Type W", ""); RNA_def_property_update(prop, 0, "rna_Lattice_update_data_editlatt"); diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index f64a9838e2a..147ac22ca80 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -39,7 +39,7 @@ #include "WM_types.h" #include "WM_api.h" -EnumPropertyItem linestyle_color_modifier_type_items[] = { +EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[] = { {LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""}, {LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""}, {LS_MODIFIER_CURVATURE_3D, "CURVATURE_3D", ICON_MODIFIER, "Curvature 3D", ""}, @@ -51,7 +51,7 @@ EnumPropertyItem linestyle_color_modifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem linestyle_alpha_modifier_type_items[] = { +EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[] = { {LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""}, {LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""}, {LS_MODIFIER_CURVATURE_3D, "CURVATURE_3D", ICON_MODIFIER, "Curvature 3D", ""}, @@ -63,7 +63,7 @@ EnumPropertyItem linestyle_alpha_modifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem linestyle_thickness_modifier_type_items[] = { +EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[] = { {LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""}, {LS_MODIFIER_CALLIGRAPHY, "CALLIGRAPHY", ICON_MODIFIER, "Calligraphy", ""}, {LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""}, @@ -76,7 +76,7 @@ EnumPropertyItem linestyle_thickness_modifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem linestyle_geometry_modifier_type_items[] = { +EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[] = { {LS_MODIFIER_2D_OFFSET, "2D_OFFSET", ICON_MODIFIER, "2D Offset", ""}, {LS_MODIFIER_2D_TRANSFORM, "2D_TRANSFORM", ICON_MODIFIER, "2D Transform", ""}, {LS_MODIFIER_BACKBONE_STRETCHER, "BACKBONE_STRETCHER", ICON_MODIFIER, "Backbone Stretcher", ""}, @@ -574,8 +574,9 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_LineStyle_update"); } -static void rna_def_modifier_type_common(StructRNA *srna, EnumPropertyItem *modifier_type_items, - const char *set_name_func, const bool blend, const bool color) +static void rna_def_modifier_type_common( + StructRNA *srna, EnumPropertyItem *modifier_type_items, + const char *set_name_func, const bool blend, const bool color) { PropertyRNA *prop; @@ -587,8 +588,8 @@ static void rna_def_modifier_type_common(StructRNA *srna, EnumPropertyItem *modi {LS_VALUE_MULT, "MULTIPLY", 0, "Multiply", ""}, {LS_VALUE_DIV, "DIVIDE", 0, "Divide", ""}, {LS_VALUE_DIFF, "DIFFERENCE", 0, "Difference", ""}, - {LS_VALUE_MIN, "MININUM", 0, "Minimum", ""}, - {LS_VALUE_MAX, "MAXIMUM", 0, "Maximum", ""}, + {LS_VALUE_MIN, "MININUM", 0, "Minimum", ""}, + {LS_VALUE_MAX, "MAXIMUM", 0, "Maximum", ""}, {0, NULL, 0, NULL, NULL} }; @@ -608,7 +609,7 @@ static void rna_def_modifier_type_common(StructRNA *srna, EnumPropertyItem *modi if (blend) { prop = RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "modifier.blend"); - RNA_def_property_enum_items(prop, (color) ? ramp_blend_items : value_blend_items); + RNA_def_property_enum_items(prop, (color) ? rna_enum_ramp_blend_items : value_blend_items); RNA_def_property_ui_text(prop, "Blend", "Specify how the modifier value is blended into the base value"); RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); @@ -631,25 +632,25 @@ static void rna_def_modifier_type_common(StructRNA *srna, EnumPropertyItem *modi static void rna_def_color_modifier(StructRNA *srna) { - rna_def_modifier_type_common(srna, linestyle_color_modifier_type_items, + rna_def_modifier_type_common(srna, rna_enum_linestyle_color_modifier_type_items, "rna_LineStyleColorModifier_name_set", true, true); } static void rna_def_alpha_modifier(StructRNA *srna) { - rna_def_modifier_type_common(srna, linestyle_alpha_modifier_type_items, + rna_def_modifier_type_common(srna, rna_enum_linestyle_alpha_modifier_type_items, "rna_LineStyleAlphaModifier_name_set", true, false); } static void rna_def_thickness_modifier(StructRNA *srna) { - rna_def_modifier_type_common(srna, linestyle_thickness_modifier_type_items, + rna_def_modifier_type_common(srna, rna_enum_linestyle_thickness_modifier_type_items, "rna_LineStyleThicknessModifier_name_set", true, false); } static void rna_def_geometry_modifier(StructRNA *srna) { - rna_def_modifier_type_common(srna, linestyle_geometry_modifier_type_items, + rna_def_modifier_type_common(srna, rna_enum_linestyle_geometry_modifier_type_items, "rna_LineStyleGeometryModifier_name_set", false, false); } @@ -1447,7 +1448,7 @@ static void rna_def_freestyle_color_modifiers(BlenderRNA *brna, PropertyRNA *cpr RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_string(func, "name", "ColorModifier", 0, "", "New name for the color modifier (not unique)"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", linestyle_color_modifier_type_items, 0, "", "Color modifier type to add"); + parm = RNA_def_enum(func, "type", rna_enum_linestyle_color_modifier_type_items, 0, "", "Color modifier type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "modifier", "LineStyleColorModifier", "", "Newly added color modifier"); RNA_def_function_return(func, parm); @@ -1476,7 +1477,7 @@ static void rna_def_freestyle_alpha_modifiers(BlenderRNA *brna, PropertyRNA *cpr RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_string(func, "name", "AlphaModifier", 0, "", "New name for the alpha modifier (not unique)"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", linestyle_alpha_modifier_type_items, 0, "", "Alpha modifier type to add"); + parm = RNA_def_enum(func, "type", rna_enum_linestyle_alpha_modifier_type_items, 0, "", "Alpha modifier type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "modifier", "LineStyleAlphaModifier", "", "Newly added alpha modifier"); RNA_def_function_return(func, parm); @@ -1505,7 +1506,7 @@ static void rna_def_freestyle_thickness_modifiers(BlenderRNA *brna, PropertyRNA RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_string(func, "name", "ThicknessModifier", 0, "", "New name for the thickness modifier (not unique)"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", linestyle_thickness_modifier_type_items, 0, "", "Thickness modifier type to add"); + parm = RNA_def_enum(func, "type", rna_enum_linestyle_thickness_modifier_type_items, 0, "", "Thickness modifier type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "modifier", "LineStyleThicknessModifier", "", "Newly added thickness modifier"); RNA_def_function_return(func, parm); @@ -1534,7 +1535,7 @@ static void rna_def_freestyle_geometry_modifiers(BlenderRNA *brna, PropertyRNA * RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_string(func, "name", "GeometryModifier", 0, "", "New name for the geometry modifier (not unique)"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", linestyle_geometry_modifier_type_items, 0, "", "Geometry modifier type to add"); + parm = RNA_def_enum(func, "type", rna_enum_linestyle_geometry_modifier_type_items, 0, "", "Geometry modifier type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "modifier", "LineStyleGeometryModifier", "", "Newly added geometry modifier"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index de12257421d..9aeaa66de98 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -202,7 +202,7 @@ static Object *rna_Main_objects_new(Main *bmain, ReportList *reports, const char default: { const char *idname; - if (RNA_enum_id_from_value(id_type_items, GS(data->name), &idname) == 0) + if (RNA_enum_id_from_value(rna_enum_id_type_items, GS(data->name), &idname) == 0) idname = "UNKNOWN"; BKE_reportf(reports, RPT_ERROR, "ID type '%s' is not valid for an object", idname); @@ -1117,7 +1117,7 @@ void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_ui_description(func, "Add a new lamp to the main database"); parm = RNA_def_string(func, "name", "Lamp", 0, "", "New name for the data-block"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", lamp_type_items, 0, "Type", "The type of texture to add"); + parm = RNA_def_enum(func, "type", rna_enum_lamp_type_items, 0, "Type", "The type of texture to add"); RNA_def_property_flag(parm, PROP_REQUIRED); /* return type */ parm = RNA_def_pointer(func, "lamp", "Lamp", "", "New lamp data-block"); @@ -1305,7 +1305,7 @@ void RNA_def_main_curves(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_ui_description(func, "Add a new curve to the main database"); parm = RNA_def_string(func, "name", "Curve", 0, "", "New name for the data-block"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", object_type_curve_items, 0, "Type", "The type of curve to add"); + parm = RNA_def_enum(func, "type", rna_enum_object_type_curve_items, 0, "Type", "The type of curve to add"); RNA_def_property_flag(parm, PROP_REQUIRED); /* return type */ parm = RNA_def_pointer(func, "curve", "Curve", "", "New curve data-block"); @@ -1414,7 +1414,7 @@ void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_ui_description(func, "Add a new texture to the main database"); parm = RNA_def_string(func, "name", "Texture", 0, "", "New name for the data-block"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", texture_type_items, 0, "Type", "The type of texture to add"); + parm = RNA_def_enum(func, "type", rna_enum_texture_type_items, 0, "Type", "The type of texture to add"); RNA_def_property_flag(parm, PROP_REQUIRED); /* return type */ parm = RNA_def_pointer(func, "texture", "Texture", "", "New texture data-block"); @@ -1451,7 +1451,7 @@ void RNA_def_main_brushes(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_ui_description(func, "Add a new brush to the main database"); parm = RNA_def_string(func, "name", "Brush", 0, "", "New name for the data-block"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "mode", object_mode_items, OB_MODE_TEXTURE_PAINT, "", "Paint Mode for the new brush"); + parm = RNA_def_enum(func, "mode", rna_enum_object_mode_items, OB_MODE_TEXTURE_PAINT, "", "Paint Mode for the new brush"); /* return type */ parm = RNA_def_pointer(func, "brush", "Brush", "", "New brush data-block"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index 39e8bbd0930..a23d4444861 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -974,7 +974,7 @@ static void rna_def_mask_layer(BlenderRNA *brna) prop = RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "falloff"); - RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); + RNA_def_property_enum_items(prop, rna_enum_proportional_falloff_curve_only_items); RNA_def_property_ui_text(prop, "Falloff", "Falloff type the feather"); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_property_update(prop, NC_MASK | NA_EDITED, NULL); diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index ef16febeca5..e4f9f856db7 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -54,7 +54,7 @@ static EnumPropertyItem prop_texture_coordinates_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem ramp_blend_items[] = { +EnumPropertyItem rna_enum_ramp_blend_items[] = { {MA_RAMP_BLEND, "MIX", 0, "Mix", ""}, {MA_RAMP_ADD, "ADD", 0, "Add", ""}, {MA_RAMP_MULT, "MULTIPLY", 0, "Multiply", ""}, @@ -953,13 +953,13 @@ static void rna_def_material_colors(StructRNA *srna) prop = RNA_def_property(srna, "diffuse_ramp_blend", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "rampblend_col"); - RNA_def_property_enum_items(prop, ramp_blend_items); + RNA_def_property_enum_items(prop, rna_enum_ramp_blend_items); RNA_def_property_ui_text(prop, "Diffuse Ramp Blend", "Blending method of the ramp and the diffuse color"); RNA_def_property_update(prop, 0, "rna_Material_update"); prop = RNA_def_property(srna, "specular_ramp_blend", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "rampblend_spec"); - RNA_def_property_enum_items(prop, ramp_blend_items); + RNA_def_property_enum_items(prop, rna_enum_ramp_blend_items); RNA_def_property_ui_text(prop, "Specular Ramp Blend", "Blending method of the ramp and the specular color"); RNA_def_property_update(prop, 0, "rna_Material_update"); diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 2a106363f91..686f8331ac4 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -51,7 +51,7 @@ #include "WM_types.h" -EnumPropertyItem mesh_delimit_mode_items[] = { +EnumPropertyItem rna_enum_mesh_delimit_mode_items[] = { {BMO_DELIM_NORMAL, "NORMAL", 0, "Normal", "Delimit by face directions"}, {BMO_DELIM_MATERIAL, "MATERIAL", 0, "Material", "Delimit by face material"}, {BMO_DELIM_SEAM, "SEAM", 0, "Seam", "Delimit by edge seams"}, diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 46ffe316883..d3b66e4c3b4 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -195,7 +195,7 @@ static void rna_def_metaelement(BlenderRNA *brna) /* enums */ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, metaelem_type_items); + RNA_def_property_enum_items(prop, rna_enum_metaelem_type_items); RNA_def_property_ui_text(prop, "Type", "Metaball types"); RNA_def_property_update(prop, 0, "rna_MetaBall_update_data"); @@ -272,7 +272,7 @@ static void rna_def_metaball_elements(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_MetaBall_elements_new"); RNA_def_function_ui_description(func, "Add a new element to the metaball"); - RNA_def_enum(func, "type", metaelem_type_items, MB_BALL, "", "type for the new meta-element"); + RNA_def_enum(func, "type", rna_enum_metaelem_type_items, MB_BALL, "", "type for the new meta-element"); parm = RNA_def_pointer(func, "element", "MetaElement", "", "The newly created meta-element"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 0e0267db029..4ca7493eb13 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -61,7 +61,7 @@ #include "WM_api.h" #include "WM_types.h" -EnumPropertyItem modifier_type_items[] = { +EnumPropertyItem rna_enum_object_modifier_type_items[] = { {0, "", 0, N_("Modify"), ""}, {eModifierType_DataTransfer, "DATA_TRANSFER", ICON_MOD_DATA_TRANSFER, "Data Transfer", ""}, {eModifierType_MeshCache, "MESH_CACHE", ICON_MOD_MESHDEFORM, "Mesh Cache", ""}, @@ -120,7 +120,7 @@ EnumPropertyItem modifier_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem modifier_triangulate_quad_method_items[] = { +EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[] = { {MOD_TRIANGULATE_QUAD_BEAUTY, "BEAUTY", 0, "Beauty ", "Split the quads in nice triangles, slower method"}, {MOD_TRIANGULATE_QUAD_FIXED, "FIXED", 0, "Fixed", "Split the quads on the first and third vertices"}, {MOD_TRIANGULATE_QUAD_ALTERNATE, "FIXED_ALTERNATE", 0, "Fixed Alternate", @@ -130,7 +130,7 @@ EnumPropertyItem modifier_triangulate_quad_method_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem modifier_triangulate_ngon_method_items[] = { +EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[] = { {MOD_TRIANGULATE_NGON_BEAUTY, "BEAUTY", 0, "Beauty", "Arrange the new triangles evenly (slow)"}, {MOD_TRIANGULATE_NGON_EARCLIP, "CLIP", 0, "Clip", "Split the polygons with an ear clipping algorithm"}, {0, NULL, 0, NULL, NULL} @@ -154,7 +154,7 @@ static EnumPropertyItem modifier_warp_falloff_items[] = { /* ***** Data Transfer ***** */ -EnumPropertyItem DT_method_vertex_items[] = { +EnumPropertyItem rna_enum_dt_method_vertex_items[] = { {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"}, {MREMAP_MODE_VERT_NEAREST, "NEAREST", 0, "Nearest vertex", @@ -172,7 +172,7 @@ EnumPropertyItem DT_method_vertex_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_method_edge_items[] = { +EnumPropertyItem rna_enum_dt_method_edge_items[] = { {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"}, {MREMAP_MODE_EDGE_VERT_NEAREST, "VERT_NEAREST", 0, "Nearest Vertices", @@ -186,7 +186,7 @@ EnumPropertyItem DT_method_edge_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_method_loop_items[] = { +EnumPropertyItem rna_enum_dt_method_loop_items[] = { {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"}, {MREMAP_MODE_LOOP_NEAREST_LOOPNOR, "NEAREST_NORMAL", 0, "Nearest Corner And Best Matching Normal", @@ -202,7 +202,7 @@ EnumPropertyItem DT_method_loop_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_method_poly_items[] = { +EnumPropertyItem rna_enum_dt_method_poly_items[] = { {MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology", "Copy from identical topology meshes"}, {MREMAP_MODE_POLY_NEAREST, "NEAREST", 0, "Nearest Face", @@ -214,7 +214,7 @@ EnumPropertyItem DT_method_poly_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_mix_mode_items[] = { +EnumPropertyItem rna_enum_dt_mix_mode_items[] = { {CDT_MIX_TRANSFER, "REPLACE", 0, "Replace", "Overwrite all elements' data"}, {CDT_MIX_REPLACE_ABOVE_THRESHOLD, "ABOVE_THRESHOLD", 0, "Above Threshold", @@ -233,7 +233,7 @@ EnumPropertyItem DT_mix_mode_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_layers_select_src_items[] = { +EnumPropertyItem rna_enum_dt_layers_select_src_items[] = { {DT_LAYERS_ACTIVE_SRC, "ACTIVE", 0, "Active Layer", "Only transfer active data layer"}, {DT_LAYERS_ALL_SRC, "ALL", 0, "All Layers", @@ -245,7 +245,7 @@ EnumPropertyItem DT_layers_select_src_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem DT_layers_select_dst_items[] = { +EnumPropertyItem rna_enum_dt_layers_select_dst_items[] = { {DT_LAYERS_ACTIVE_DST, "ACTIVE", 0, "Active Layer", "Affect active data layer of all targets"}, {DT_LAYERS_NAME_DST, "NAME", 0, "By Name", @@ -864,19 +864,19 @@ static EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf(bConte int totitem = 0; if (!C) { /* needed for docs and i18n tools */ - return DT_layers_select_src_items; + return rna_enum_dt_layers_select_src_items; } /* No active here! */ - 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_ALL_SRC); if (STREQ(RNA_property_identifier(prop), "layers_vgroup_select_src")) { Object *ob_src = dtmd->ob_source; #if 0 /* XXX Don't think we want this in modifier version... */ 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); } #endif @@ -954,12 +954,12 @@ static EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf(bConte int totitem = 0; if (!C) { /* needed for docs and i18n tools */ - return DT_layers_select_dst_items; + return rna_enum_dt_layers_select_dst_items; } /* No active here! */ - 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); if (STREQ(RNA_property_identifier(prop), "layers_vgroup_select_dst")) { /* Only list destination layers if we have a single source! */ @@ -1048,24 +1048,24 @@ static EnumPropertyItem *rna_DataTransferModifier_mix_mode_itemf(bContext *C, Po 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(dtmd->data_types, &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); @@ -1557,7 +1557,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna) prop = RNA_def_property(srna, "symmetry_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "symmetry_axis"); - RNA_def_property_enum_items(prop, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Axis", "Axis of symmetry"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -1577,7 +1577,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna) prop = RNA_def_property(srna, "delimit", PROP_ENUM, PROP_NONE); RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */ - RNA_def_property_enum_items(prop, mesh_delimit_mode_items); + RNA_def_property_enum_items(prop, rna_enum_mesh_delimit_mode_items); RNA_def_property_ui_text(prop, "Delimit", "Limit merging geometry"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2756,7 +2756,7 @@ static void rna_def_modifier_dynamic_paint(BlenderRNA *brna) prop = RNA_def_property(srna, "ui_type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, prop_dynamicpaint_type_items); + RNA_def_property_enum_items(prop, rna_enum_prop_dynamicpaint_type_items); RNA_def_property_ui_text(prop, "Type", ""); } @@ -3362,13 +3362,13 @@ static void rna_def_modifier_uvwarp(BlenderRNA *brna) prop = RNA_def_property(srna, "axis_u", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "axis_u"); - RNA_def_property_enum_items(prop, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_unsigned_items); RNA_def_property_ui_text(prop, "U-Axis", "Pole axis for rotation"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "axis_v", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "axis_v"); - RNA_def_property_enum_items(prop, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_unsigned_items); RNA_def_property_ui_text(prop, "V-Axis", "Pole axis for rotation"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -4019,13 +4019,13 @@ static void rna_def_modifier_triangulate(BlenderRNA *brna) prop = RNA_def_property(srna, "quad_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "quad_method"); - RNA_def_property_enum_items(prop, modifier_triangulate_quad_method_items); + RNA_def_property_enum_items(prop, rna_enum_modifier_triangulate_quad_method_items); RNA_def_property_ui_text(prop, "Quad Method", "Method for splitting the quads into triangles"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "ngon_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ngon_method"); - RNA_def_property_enum_items(prop, modifier_triangulate_ngon_method_items); + RNA_def_property_enum_items(prop, rna_enum_modifier_triangulate_ngon_method_items); RNA_def_property_ui_text(prop, "Polygon Method", "Method for splitting the polygons into triangles"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); } @@ -4130,13 +4130,13 @@ static void rna_def_modifier_meshcache(BlenderRNA *brna) /* Axis Conversion */ prop = RNA_def_property(srna, "forward_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "forward_axis"); - RNA_def_property_enum_items(prop, object_axis_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_items); RNA_def_property_ui_text(prop, "Forward", ""); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "up_axis"); - RNA_def_property_enum_items(prop, object_axis_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_items); RNA_def_property_ui_text(prop, "Up", ""); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -4399,22 +4399,22 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_DataTransferModifier_data_types_update"); /* Mapping methods. */ - prop = RNA_def_enum(srna, "vert_mapping", DT_method_vertex_items, MREMAP_MODE_VERT_NEAREST, "Vertex Mapping", + prop = RNA_def_enum(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_property_enum_sdna(prop, NULL, "vmap_mode"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "edge_mapping", DT_method_edge_items, MREMAP_MODE_EDGE_NEAREST, "Edge Mapping", + prop = RNA_def_enum(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_property_enum_sdna(prop, NULL, "emap_mode"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "loop_mapping", DT_method_loop_items, MREMAP_MODE_LOOP_NEAREST_POLYNOR, + prop = RNA_def_enum(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_property_enum_sdna(prop, NULL, "lmap_mode"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "poly_mapping", DT_method_poly_items, MREMAP_MODE_POLY_NEAREST, "Face Mapping", + prop = RNA_def_enum(srna, "poly_mapping", rna_enum_dt_method_poly_items, MREMAP_MODE_POLY_NEAREST, "Face Mapping", "Method used to map source faces to destination ones"); RNA_def_property_enum_sdna(prop, NULL, "pmap_mode"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -4445,60 +4445,60 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Modifier_update"); /* How to handle multi-layers types of data. */ - prop = RNA_def_enum(srna, "layers_vgroup_select_src", DT_layers_select_src_items, DT_LAYERS_ALL_SRC, + prop = RNA_def_enum(srna, "layers_vgroup_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_MDEFORMVERT]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); #if 0 - prop = RNA_def_enum(srna, "layers_shapekey_select_src", DT_layers_select_src_items, DT_LAYERS_ALL_SRC, + prop = RNA_def_enum(srna, "layers_shapekey_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_SHAPEKEY]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); #endif - prop = RNA_def_enum(srna, "layers_vcol_select_src", DT_layers_select_src_items, DT_LAYERS_ALL_SRC, + prop = RNA_def_enum(srna, "layers_vcol_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_VCOL]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "layers_uv_select_src", DT_layers_select_src_items, DT_LAYERS_ALL_SRC, + prop = RNA_def_enum(srna, "layers_uv_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_UV]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "layers_vgroup_select_dst", DT_layers_select_dst_items, DT_LAYERS_NAME_DST, + prop = RNA_def_enum(srna, "layers_vgroup_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST, "Destination Layers Matching", "How to match source and destination layers"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_MDEFORMVERT]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); #if 0 - prop = RNA_def_enum(srna, "layers_shapekey_select_dst", DT_layers_select_dst_items, DT_LAYERS_NAME_DST, + prop = RNA_def_enum(srna, "layers_shapekey_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST, "Destination Layers Matching", "How to match source and destination layers"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_SHAPEKEY]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); #endif - prop = RNA_def_enum(srna, "layers_vcol_select_dst", DT_layers_select_dst_items, DT_LAYERS_NAME_DST, + prop = RNA_def_enum(srna, "layers_vcol_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST, "Destination Layers Matching", "How to match source and destination layers"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_VCOL]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_enum(srna, "layers_uv_select_dst", DT_layers_select_dst_items, DT_LAYERS_NAME_DST, + prop = RNA_def_enum(srna, "layers_uv_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST, "Destination Layers Matching", "How to match source and destination layers"); RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_UV]"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); /* Mix stuff */ - prop = RNA_def_enum(srna, "mix_mode", DT_mix_mode_items, CDT_MIX_TRANSFER, "Mix Mode", + prop = RNA_def_enum(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(prop, NULL, NULL, "rna_DataTransferModifier_mix_mode_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -4613,7 +4613,7 @@ void RNA_def_modifier(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, modifier_type_items); + RNA_def_property_enum_items(prop, rna_enum_object_modifier_type_items); RNA_def_property_ui_text(prop, "Type", ""); /* flags */ diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index 0e8ed5eea8d..d09cac2a383 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -459,7 +459,7 @@ static void rna_NlaTrack_solo_set(PointerRNA *ptr, int value) #else /* enum defines exported for rna_animation.c */ -EnumPropertyItem nla_mode_blend_items[] = { +EnumPropertyItem rna_enum_nla_mode_blend_items[] = { {NLASTRIP_MODE_REPLACE, "REPLACE", 0, "Replace", "Result strip replaces the accumulated results by amount specified by influence"}, {NLASTRIP_MODE_ADD, "ADD", 0, "Add", "Weighted result of strip is added to the accumulated results"}, @@ -470,7 +470,7 @@ EnumPropertyItem nla_mode_blend_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem nla_mode_extend_items[] = { +EnumPropertyItem rna_enum_nla_mode_extend_items[] = { {NLASTRIP_EXTEND_NOTHING, "NOTHING", 0, "Nothing", "Strip has no influence past its extents"}, {NLASTRIP_EXTEND_HOLD, "HOLD", 0, "Hold", "Hold the first frame if no previous strips in track, and always hold last frame"}, @@ -540,13 +540,13 @@ static void rna_def_nlastrip(BlenderRNA *brna) prop = RNA_def_property(srna, "extrapolation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "extendmode"); - RNA_def_property_enum_items(prop, nla_mode_extend_items); + RNA_def_property_enum_items(prop, rna_enum_nla_mode_extend_items); RNA_def_property_ui_text(prop, "Extrapolation", "Action to take for gaps past the strip extents"); RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); /* this will do? */ prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "blendmode"); - RNA_def_property_enum_items(prop, nla_mode_blend_items); + RNA_def_property_enum_items(prop, rna_enum_nla_mode_blend_items); RNA_def_property_ui_text(prop, "Blending", "Method used for combining strip's result with accumulated result"); RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); /* this will do? */ diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 514a869680e..2d412bf778b 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -64,7 +64,7 @@ #include "RE_render_ext.h" -EnumPropertyItem node_socket_in_out_items[] = { +EnumPropertyItem rna_enum_node_socket_in_out_items[] = { { SOCK_IN, "IN", 0, "Input", "" }, { SOCK_OUT, "OUT", 0, "Output", "" }, { 0, NULL, 0, NULL, NULL } @@ -104,14 +104,14 @@ static EnumPropertyItem node_chunksize_items[] = { #define DEF_ICON_BLANK_SKIP #define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""}, #define DEF_VICO(name) -EnumPropertyItem node_icon_items[] = { +EnumPropertyItem rna_enum_node_icon_items[] = { #include "UI_icons.h" {0, NULL, 0, NULL, NULL}}; #undef DEF_ICON_BLANK_SKIP #undef DEF_ICON #undef DEF_VICO -EnumPropertyItem node_math_items[] = { +EnumPropertyItem rna_enum_node_math_items[] = { {NODE_MATH_ADD, "ADD", 0, "Add", ""}, {NODE_MATH_SUB, "SUBTRACT", 0, "Subtract", ""}, {NODE_MATH_MUL, "MULTIPLY", 0, "Multiply", ""}, @@ -134,7 +134,7 @@ EnumPropertyItem node_math_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem node_vec_math_items[] = { +EnumPropertyItem rna_enum_node_vec_math_items[] = { {0, "ADD", 0, "Add", ""}, {1, "SUBTRACT", 0, "Subtract", ""}, {2, "AVERAGE", 0, "Average", ""}, @@ -144,7 +144,7 @@ EnumPropertyItem node_vec_math_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem node_filter_items[] = { +EnumPropertyItem rna_enum_node_filter_items[] = { {0, "SOFTEN", 0, "Soften", ""}, {1, "SHARPEN", 0, "Sharpen", ""}, {2, "LAPLACE", 0, "Laplace", ""}, @@ -3234,7 +3234,7 @@ static void def_math(StructRNA *srna) prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom1"); - RNA_def_property_enum_items(prop, node_math_items); + RNA_def_property_enum_items(prop, rna_enum_node_math_items); RNA_def_property_ui_text(prop, "Operation", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -3250,7 +3250,7 @@ static void def_vector_math(StructRNA *srna) prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom1"); - RNA_def_property_enum_items(prop, node_vec_math_items); + RNA_def_property_enum_items(prop, rna_enum_node_vec_math_items); RNA_def_property_ui_text(prop, "Operation", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } @@ -3315,7 +3315,7 @@ static void def_mix_rgb(StructRNA *srna) prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom1"); - RNA_def_property_enum_items(prop, ramp_blend_items); + RNA_def_property_enum_items(prop, rna_enum_ramp_blend_items); RNA_def_property_ui_text(prop, "Blend Type", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -4389,7 +4389,7 @@ static void def_cmp_filter(StructRNA *srna) prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom1"); - RNA_def_property_enum_items(prop, node_filter_items); + RNA_def_property_enum_items(prop, rna_enum_node_filter_items); RNA_def_property_ui_text(prop, "Filter Type", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } @@ -4783,7 +4783,7 @@ static void def_cmp_dilate_erode(StructRNA *srna) /* CMP_NODE_DILATEERODE_DISTANCE_FEATHER only */ prop = RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "falloff"); - RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); + RNA_def_property_enum_items(prop, rna_enum_proportional_falloff_curve_only_items); RNA_def_property_ui_text(prop, "Falloff", "Falloff type the feather"); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -6445,7 +6445,7 @@ static void def_cmp_keying(StructRNA *srna) prop = RNA_def_property(srna, "feather_falloff", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "feather_falloff"); - RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); + RNA_def_property_enum_items(prop, rna_enum_proportional_falloff_curve_only_items); RNA_def_property_ui_text(prop, "Feather Falloff", "Falloff type the feather"); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -7626,7 +7626,7 @@ static void rna_def_node(BlenderRNA *brna) prop = RNA_def_property(srna, "bl_icon", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typeinfo->ui_icon"); - RNA_def_property_enum_items(prop, node_icon_items); + RNA_def_property_enum_items(prop, rna_enum_node_icon_items); RNA_def_property_enum_default(prop, ICON_NODE); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); RNA_def_property_ui_text(prop, "Icon", "The node icon"); @@ -8005,7 +8005,7 @@ static void rna_def_nodetree(BlenderRNA *brna) prop = RNA_def_property(srna, "bl_icon", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typeinfo->ui_icon"); - RNA_def_property_enum_items(prop, node_icon_items); + RNA_def_property_enum_items(prop, rna_enum_node_icon_items); RNA_def_property_enum_default(prop, ICON_NODETREE); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "Icon", "The node tree icon"); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index bb487d1cf32..42d8c8e0cb4 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -60,7 +60,7 @@ #include "WM_api.h" #include "WM_types.h" -EnumPropertyItem object_mode_items[] = { +EnumPropertyItem rna_enum_object_mode_items[] = { {OB_MODE_OBJECT, "OBJECT", ICON_OBJECT_DATAMODE, "Object Mode", ""}, {OB_MODE_EDIT, "EDIT", ICON_EDITMODE_HLT, "Edit Mode", ""}, {OB_MODE_POSE, "POSE", ICON_POSE_HLT, "Pose Mode", ""}, @@ -72,7 +72,7 @@ EnumPropertyItem object_mode_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem object_empty_drawtype_items[] = { +EnumPropertyItem rna_enum_object_empty_drawtype_items[] = { {OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""}, {OB_ARROWS, "ARROWS", 0, "Arrows", ""}, {OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""}, @@ -118,7 +118,7 @@ static EnumPropertyItem collision_bounds_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem metaelem_type_items[] = { +EnumPropertyItem rna_enum_metaelem_type_items[] = { {MB_BALL, "BALL", ICON_META_BALL, "Ball", ""}, {MB_TUBE, "CAPSULE", ICON_META_CAPSULE, "Capsule", ""}, {MB_PLANE, "PLANE", ICON_META_PLANE, "Plane", ""}, @@ -132,7 +132,7 @@ EnumPropertyItem metaelem_type_items[] = { #define OBTYPE_CU_SURF {OB_SURF, "SURFACE", 0, "Surface", ""} #define OBTYPE_CU_FONT {OB_FONT, "FONT", 0, "Font", ""} -EnumPropertyItem object_type_items[] = { +EnumPropertyItem rna_enum_object_type_items[] = { {OB_MESH, "MESH", 0, "Mesh", ""}, OBTYPE_CU_CURVE, OBTYPE_CU_SURF, @@ -149,14 +149,14 @@ EnumPropertyItem object_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem object_type_curve_items[] = { +EnumPropertyItem rna_enum_object_type_curve_items[] = { OBTYPE_CU_CURVE, OBTYPE_CU_SURF, OBTYPE_CU_FONT, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem object_axis_items[] = { +EnumPropertyItem rna_enum_object_axis_items[] = { {OB_POSX, "POS_X", 0, "+X", ""}, {OB_POSY, "POS_Y", 0, "+Y", ""}, {OB_POSZ, "POS_Z", 0, "+Z", ""}, @@ -167,7 +167,7 @@ EnumPropertyItem object_axis_items[] = { }; /* for general use (not just object) */ -EnumPropertyItem object_axis_unsigned_items[] = { +EnumPropertyItem rna_enum_object_axis_unsigned_items[] = { {0, "X", 0, "X", ""}, {1, "Y", 0, "Y", ""}, {2, "Z", 0, "Z", ""}, @@ -1958,7 +1958,7 @@ static void rna_def_object_constraints(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_Object_constraints_new"); RNA_def_function_ui_description(func, "Add a new constraint to this object"); /* object to add */ - parm = RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add"); + parm = RNA_def_enum(func, "type", rna_enum_constraint_type_items, 1, "", "Constraint type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); /* return type */ parm = RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint"); @@ -2009,7 +2009,7 @@ static void rna_def_object_modifiers(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the modifier"); RNA_def_property_flag(parm, PROP_REQUIRED); /* modifier to add */ - parm = RNA_def_enum(func, "type", modifier_type_items, 1, "", "Modifier type to add"); + parm = RNA_def_enum(func, "type", rna_enum_object_modifier_type_items, 1, "", "Modifier type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); /* return type */ parm = RNA_def_pointer(func, "modifier", "Modifier", "", "Newly created modifier"); @@ -2224,13 +2224,13 @@ static void rna_def_object(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, object_type_items); + RNA_def_property_enum_items(prop, rna_enum_object_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Type", "Type of Object"); prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); - RNA_def_property_enum_items(prop, object_mode_items); + RNA_def_property_enum_items(prop, rna_enum_object_mode_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Mode", "Object interaction mode"); @@ -2294,7 +2294,7 @@ static void rna_def_object(BlenderRNA *brna) * since some other tools still refer to this */ prop = RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "trackflag"); - RNA_def_property_enum_items(prop, object_axis_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_items); RNA_def_property_ui_text(prop, "Track Axis", "Axis that points in 'forward' direction (applies to DupliFrame when " "parent 'Follow' is enabled)"); @@ -2533,7 +2533,7 @@ static void rna_def_object(BlenderRNA *brna) /* empty */ prop = RNA_def_property(srna, "empty_draw_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "empty_drawtype"); - RNA_def_property_enum_items(prop, object_empty_drawtype_items); + RNA_def_property_enum_items(prop, rna_enum_object_empty_drawtype_items); RNA_def_property_enum_funcs(prop, NULL, "rna_Object_empty_draw_type_set", NULL); RNA_def_property_ui_text(prop, "Empty Display Type", "Viewport display style for empties"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 0841a19dcee..6ace0966b36 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -1450,7 +1450,7 @@ static void rna_def_field(BlenderRNA *brna) prop = RNA_def_property(srna, "guide_kink_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "kink_axis"); - RNA_def_property_enum_items(prop, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset"); RNA_def_property_update(prop, 0, "rna_FieldSettings_update"); diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c index 34810e8a91b..f3da03714a1 100644 --- a/source/blender/makesrna/intern/rna_packedfile.c +++ b/source/blender/makesrna/intern/rna_packedfile.c @@ -35,7 +35,7 @@ #include "rna_internal.h" -EnumPropertyItem unpack_method_items[] = { +EnumPropertyItem rna_enum_unpack_method_items[] = { {PF_USE_LOCAL, "USE_LOCAL", 0, "Use Local File", ""}, {PF_WRITE_LOCAL, "WRITE_LOCAL", 0, "Write Local File (overwrite existing)", ""}, {PF_USE_ORIGINAL, "USE_ORIGINAL", 0, "Use Original File", ""}, diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 11750c683af..8d4be2af533 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -2414,7 +2414,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); prop = RNA_def_property(srna, "kink_axis", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, object_axis_unsigned_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_unsigned_items); RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset"); RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 27ff0a63e75..d8f1f944933 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -49,7 +49,7 @@ /* XXX: this RNA enum define is currently duplicated for objects, * since there is some text here which is not applicable */ -EnumPropertyItem posebone_rotmode_items[] = { +EnumPropertyItem rna_enum_posebone_rotmode_items[] = { {ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock (default)"}, {ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order (prone to Gimbal Lock)"}, {ROT_MODE_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order (prone to Gimbal Lock)"}, @@ -63,7 +63,7 @@ EnumPropertyItem posebone_rotmode_items[] = { }; /* Bone and Group Color Sets */ -EnumPropertyItem color_sets_items[] = { +EnumPropertyItem rna_enum_color_sets_items[] = { {0, "DEFAULT", 0, "Default Colors", ""}, {1, "THEME01", 0, "01 - Theme Color Set", ""}, {2, "THEME02", 0, "02 - Theme Color Set", ""}, @@ -675,7 +675,7 @@ void rna_def_actionbone_group_common(StructRNA *srna, int update_flag, const cha /* color set + colors */ prop = RNA_def_property(srna, "color_set", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "customCol"); - RNA_def_property_enum_items(prop, color_sets_items); + RNA_def_property_enum_items(prop, rna_enum_color_sets_items); RNA_def_property_enum_funcs(prop, NULL, "rna_ActionGroup_colorset_set", NULL); RNA_def_property_ui_text(prop, "Color Set", "Custom color set to use"); RNA_def_property_update(prop, update_flag, update_cb); @@ -760,7 +760,7 @@ static void rna_def_pose_channel_constraints(BlenderRNA *brna, PropertyRNA *cpro parm = RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint"); RNA_def_function_return(func, parm); /* constraint to add */ - parm = RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add"); + parm = RNA_def_enum(func, "type", rna_enum_constraint_type_items, 1, "", "Constraint type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "remove", "rna_PoseChannel_constraints_remove"); @@ -865,7 +865,7 @@ static void rna_def_pose_channel(BlenderRNA *brna) prop = RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "rotmode"); - RNA_def_property_enum_items(prop, posebone_rotmode_items); /* XXX move to using a single define of this someday */ + RNA_def_property_enum_items(prop, rna_enum_posebone_rotmode_items); /* XXX move to using a single define of this someday */ RNA_def_property_enum_funcs(prop, NULL, "rna_PoseChannel_rotation_mode_set", NULL); /* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c index 454816d4e0a..07bdbb03357 100644 --- a/source/blender/makesrna/intern/rna_property.c +++ b/source/blender/makesrna/intern/rna_property.c @@ -42,7 +42,7 @@ #include "WM_types.h" -EnumPropertyItem gameproperty_type_items[] = { +EnumPropertyItem rna_enum_gameproperty_type_items[] = { {GPROP_BOOL, "BOOL", 0, "Boolean", "Boolean Property"}, {GPROP_INT, "INT", 0, "Integer", "Integer Property"}, {GPROP_FLOAT, "FLOAT", 0, "Float", "Floating-Point Property"}, @@ -130,7 +130,7 @@ void RNA_def_gameproperty(BlenderRNA *brna) RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, gameproperty_type_items); + RNA_def_property_enum_items(prop, rna_enum_gameproperty_type_items); RNA_def_property_ui_text(prop, "Type", ""); RNA_def_property_enum_funcs(prop, NULL, "rna_GameProperty_type_set", NULL); RNA_def_property_update(prop, NC_LOGIC, NULL); diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 61eb2c69bfe..dd07f3cb038 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -41,7 +41,7 @@ #include "RE_pipeline.h" -EnumPropertyItem render_pass_type_items[] = { +EnumPropertyItem rna_enum_render_pass_type_items[] = { {SCE_PASS_COMBINED, "COMBINED", 0, "Combined", ""}, {SCE_PASS_Z, "Z", 0, "Z", ""}, {SCE_PASS_RGBA, "COLOR", 0, "Color", ""}, @@ -77,7 +77,7 @@ EnumPropertyItem render_pass_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem render_pass_debug_type_items[] = { +EnumPropertyItem rna_enum_render_pass_debug_type_items[] = { {RENDER_PASS_DEBUG_BVH_TRAVERSAL_STEPS, "BVH_TRAVERSAL_STEPS", 0, "BVH Traversal Steps", ""}, {RENDER_PASS_DEBUG_BVH_TRAVERSED_INSTANCES, "BVH_TRAVERSED_INSTANCES", 0, "BVH Traversed Instances", ""}, {RENDER_PASS_DEBUG_RAY_BOUNCES, "RAY_BOUNCES", 0, "Ray Steps", ""}, @@ -432,7 +432,7 @@ static void rna_def_render_engine(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_REQUIRED); prop = RNA_def_pointer(func, "object", "Object", "", ""); RNA_def_property_flag(prop, PROP_REQUIRED); - prop = RNA_def_enum(func, "pass_type", render_pass_type_items, 0, "Pass", "Pass to bake"); + prop = RNA_def_enum(func, "pass_type", rna_enum_render_pass_type_items, 0, "Pass", "Pass to bake"); RNA_def_property_flag(prop, PROP_REQUIRED); prop = RNA_def_int(func, "object_id", 0, 0, INT_MAX, "Object Id", "Id of the current object being baked in relation to the others", 0, INT_MAX); RNA_def_property_flag(prop, PROP_REQUIRED); @@ -547,7 +547,7 @@ static void rna_def_render_engine(BlenderRNA *brna) func = RNA_def_function(srna, "report", "RE_engine_report"); RNA_def_function_ui_description(func, "Report info, warning or error messages"); - prop = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", ""); + prop = RNA_def_enum_flag(func, "type", rna_enum_wm_report_items, 0, "Type", ""); RNA_def_property_flag(prop, PROP_REQUIRED); prop = RNA_def_string(func, "message", NULL, 0, "Report Message", ""); RNA_def_property_flag(prop, PROP_REQUIRED); @@ -726,7 +726,7 @@ static void rna_def_render_passes(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "find_by_type", "rna_RenderPass_find_by_type"); RNA_def_function_ui_description(func, "Get the render pass for a given type and view"); - parm = RNA_def_enum(func, "pass_type", render_pass_type_items, SCE_PASS_COMBINED, "Pass", ""); + parm = RNA_def_enum(func, "pass_type", rna_enum_render_pass_type_items, SCE_PASS_COMBINED, "Pass", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_string(func, "view", NULL, 0, "View", "Render view to get pass from"); /* NULL ok here */ RNA_def_property_flag(parm, PROP_REQUIRED); @@ -794,7 +794,7 @@ static void rna_def_render_pass(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "passtype"); - RNA_def_property_enum_items(prop, render_pass_type_items); + RNA_def_property_enum_items(prop, rna_enum_render_pass_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE); @@ -809,7 +809,7 @@ static void rna_def_render_pass(BlenderRNA *brna) prop = RNA_def_property(srna, "debug_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "debug_type"); - RNA_def_property_enum_items(prop, render_pass_debug_type_items); + RNA_def_property_enum_items(prop, rna_enum_render_pass_debug_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_define_verify_sdna(1); diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index 395cb7c443d..bdf001ed0e1 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -44,13 +44,13 @@ #include "WM_types.h" /* roles of objects in RigidBody Sims */ -EnumPropertyItem rigidbody_object_type_items[] = { +EnumPropertyItem rna_enum_rigidbody_object_type_items[] = { {RBO_TYPE_ACTIVE, "ACTIVE", 0, "Active", "Object is directly controlled by simulation results"}, {RBO_TYPE_PASSIVE, "PASSIVE", 0, "Passive", "Object is directly controlled by animation system"}, {0, NULL, 0, NULL, NULL}}; /* collision shapes of objects in rigid body sim */ -EnumPropertyItem rigidbody_object_shape_items[] = { +EnumPropertyItem rna_enum_rigidbody_object_shape_items[] = { {RB_SHAPE_BOX, "BOX", ICON_MESH_CUBE, "Box", "Box-like shapes (i.e. cubes), including planes (i.e. ground planes)"}, {RB_SHAPE_SPHERE, "SPHERE", ICON_MESH_UVSPHERE, "Sphere", ""}, {RB_SHAPE_CAPSULE, "CAPSULE", ICON_MESH_CAPSULE, "Capsule", ""}, @@ -64,7 +64,7 @@ EnumPropertyItem rigidbody_object_shape_items[] = { {0, NULL, 0, NULL, NULL}}; /* collision shapes of constraints in rigid body sim */ -EnumPropertyItem rigidbody_constraint_type_items[] = { +EnumPropertyItem rna_enum_rigidbody_constraint_type_items[] = { {RBC_TYPE_FIXED, "FIXED", ICON_NONE, "Fixed", "Glue rigid bodies together"}, {RBC_TYPE_POINT, "POINT", ICON_NONE, "Point", "Constrain rigid bodies to move around common pivot point"}, {RBC_TYPE_HINGE, "HINGE", ICON_NONE, "Hinge", "Restrict rigid body rotation to one axis"}, @@ -781,7 +781,7 @@ static void rna_def_rigidbody_object(BlenderRNA *brna) /* Enums */ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, rigidbody_object_type_items); + RNA_def_property_enum_items(prop, rna_enum_rigidbody_object_type_items); RNA_def_property_enum_funcs(prop, NULL, "rna_RigidBodyOb_type_set", NULL); RNA_def_property_ui_text(prop, "Type", "Role of object in Rigid Body Simulations"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); @@ -803,7 +803,7 @@ static void rna_def_rigidbody_object(BlenderRNA *brna) prop = RNA_def_property(srna, "collision_shape", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "shape"); - RNA_def_property_enum_items(prop, rigidbody_object_shape_items); + RNA_def_property_enum_items(prop, rna_enum_rigidbody_object_shape_items); RNA_def_property_enum_funcs(prop, NULL, "rna_RigidBodyOb_shape_set", NULL); RNA_def_property_ui_text(prop, "Collision Shape", "Collision Shape of object in Rigid Body Simulations"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); @@ -946,7 +946,7 @@ static void rna_def_rigidbody_constraint(BlenderRNA *brna) /* Enums */ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, rigidbody_constraint_type_items); + RNA_def_property_enum_items(prop, rna_enum_rigidbody_constraint_type_items); RNA_def_property_enum_funcs(prop, NULL, "rna_RigidBodyCon_type_set", NULL); RNA_def_property_ui_text(prop, "Type", "Type of Rigid Body Constraint"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 4650e27f63e..978738b36ac 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -36,7 +36,7 @@ #include "rna_internal.h" -EnumPropertyItem property_type_items[] = { +EnumPropertyItem rna_enum_property_type_items[] = { {PROP_BOOLEAN, "BOOLEAN", 0, "Boolean", ""}, {PROP_INT, "INT", 0, "Integer", ""}, {PROP_FLOAT, "FLOAT", 0, "Float", ""}, @@ -50,7 +50,7 @@ EnumPropertyItem property_type_items[] = { /* XXX Keep in sync with bpy_props.c's property_subtype_xxx_items ??? * Currently it is not... */ -EnumPropertyItem property_subtype_items[] = { +EnumPropertyItem rna_enum_property_subtype_items[] = { {PROP_NONE, "NONE", 0, "None", ""}, /* strings */ @@ -90,7 +90,7 @@ EnumPropertyItem property_subtype_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem property_unit_items[] = { +EnumPropertyItem rna_enum_property_unit_items[] = { {PROP_UNIT_NONE, "NONE", 0, "None", ""}, {PROP_UNIT_LENGTH, "LENGTH", 0, "Length", ""}, {PROP_UNIT_AREA, "AREA", 0, "Area", ""}, @@ -1138,7 +1138,7 @@ static void rna_def_property(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_enum_items(prop, property_type_items); + RNA_def_property_enum_items(prop, rna_enum_property_type_items); RNA_def_property_enum_funcs(prop, "rna_Property_type_get", NULL, NULL); RNA_def_property_ui_text(prop, "Type", "Data type of the property"); @@ -1156,13 +1156,13 @@ static void rna_def_property(BlenderRNA *brna) prop = RNA_def_property(srna, "unit", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_enum_items(prop, property_unit_items); + RNA_def_property_enum_items(prop, rna_enum_property_unit_items); RNA_def_property_enum_funcs(prop, "rna_Property_unit_get", NULL, NULL); RNA_def_property_ui_text(prop, "Unit", "Type of units for this property"); prop = RNA_def_property(srna, "icon", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_enum_items(prop, icon_items); + RNA_def_property_enum_items(prop, rna_enum_icon_items); RNA_def_property_enum_funcs(prop, "rna_Property_icon_get", NULL, NULL); RNA_def_property_ui_text(prop, "Icon", "Icon of the item"); @@ -1452,7 +1452,7 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna) prop = RNA_def_property(srna, "icon", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_enum_items(prop, icon_items); + RNA_def_property_enum_items(prop, rna_enum_icon_items); RNA_def_property_enum_funcs(prop, "rna_EnumPropertyItem_icon_get", NULL, NULL); RNA_def_property_ui_text(prop, "Icon", "Icon of the item"); } diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 984e5d203a7..d959fd08009 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -76,7 +76,7 @@ #include "BLI_threads.h" #ifdef WITH_OPENEXR -EnumPropertyItem exr_codec_items[] = { +EnumPropertyItem rna_enum_exr_codec_items[] = { {R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""}, {R_IMF_EXR_CODEC_PXR24, "PXR24", 0, "Pxr24 (lossy)", ""}, {R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""}, @@ -105,7 +105,7 @@ EnumPropertyItem uv_sculpt_tool_items[] = { }; -EnumPropertyItem snap_target_items[] = { +EnumPropertyItem rna_enum_snap_target_items[] = { {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target"}, {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target"}, {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target"}, @@ -113,7 +113,7 @@ EnumPropertyItem snap_target_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem proportional_falloff_items[] = { +EnumPropertyItem rna_enum_proportional_falloff_items[] = { {PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"}, {PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"}, {PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"}, @@ -126,7 +126,7 @@ EnumPropertyItem proportional_falloff_items[] = { }; /* subset of the enum - only curves, missing random and const */ -EnumPropertyItem proportional_falloff_curve_only_items[] = { +EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[] = { {PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"}, {PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"}, {PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"}, @@ -137,7 +137,7 @@ EnumPropertyItem proportional_falloff_curve_only_items[] = { }; -EnumPropertyItem proportional_editing_items[] = { +EnumPropertyItem rna_enum_proportional_editing_items[] = { {PROP_EDIT_OFF, "DISABLED", ICON_PROP_OFF, "Disable", "Proportional Editing disabled"}, {PROP_EDIT_ON, "ENABLED", ICON_PROP_ON, "Enable", "Proportional Editing enabled"}, {PROP_EDIT_PROJECTED, "PROJECTED", ICON_PROP_ON, "Projected (2D)", @@ -148,14 +148,14 @@ EnumPropertyItem proportional_editing_items[] = { }; /* keep for operators, not used here */ -EnumPropertyItem mesh_select_mode_items[] = { +EnumPropertyItem rna_enum_mesh_select_mode_items[] = { {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode"}, {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode"}, {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode"}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem snap_element_items[] = { +EnumPropertyItem rna_enum_snap_element_items[] = { {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"}, {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"}, {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges"}, @@ -164,7 +164,7 @@ EnumPropertyItem snap_element_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem snap_node_element_items[] = { +EnumPropertyItem rna_enum_snap_node_element_items[] = { {SCE_SNAP_MODE_GRID, "GRID", ICON_SNAP_GRID, "Grid", "Snap to grid"}, {SCE_SNAP_MODE_NODE_X, "NODE_X", ICON_SNAP_EDGE, "Node X", "Snap to left/right node border"}, {SCE_SNAP_MODE_NODE_Y, "NODE_Y", ICON_SNAP_EDGE, "Node Y", "Snap to top/bottom node border"}, @@ -264,7 +264,7 @@ EnumPropertyItem image_only_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem image_type_items[] = { +EnumPropertyItem rna_enum_image_type_items[] = { {0, "", 0, N_("Image"), NULL}, IMAGE_TYPE_ITEMS_IMAGE_ONLY @@ -289,7 +289,7 @@ EnumPropertyItem image_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem image_color_mode_items[] = { +EnumPropertyItem rna_enum_image_color_mode_items[] = { {R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"}, {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"}, {R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"}, @@ -297,12 +297,12 @@ EnumPropertyItem image_color_mode_items[] = { }; #ifdef RNA_RUNTIME -#define IMAGE_COLOR_MODE_BW image_color_mode_items[0] -#define IMAGE_COLOR_MODE_RGB image_color_mode_items[1] -#define IMAGE_COLOR_MODE_RGBA image_color_mode_items[2] +#define IMAGE_COLOR_MODE_BW rna_enum_image_color_mode_items[0] +#define IMAGE_COLOR_MODE_RGB rna_enum_image_color_mode_items[1] +#define IMAGE_COLOR_MODE_RGBA rna_enum_image_color_mode_items[2] #endif -EnumPropertyItem image_color_depth_items[] = { +EnumPropertyItem rna_enum_image_color_depth_items[] = { /* 1 (monochrome) not used */ {R_IMF_CHAN_DEPTH_8, "8", 0, "8", "8 bit color channels"}, {R_IMF_CHAN_DEPTH_10, "10", 0, "10", "10 bit color channels"}, @@ -313,13 +313,13 @@ EnumPropertyItem image_color_depth_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem normal_space_items[] = { +EnumPropertyItem rna_enum_normal_space_items[] = { {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"}, {R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normals in tangent space"}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem normal_swizzle_items[] = { +EnumPropertyItem rna_enum_normal_swizzle_items[] = { {R_BAKE_POSX, "POS_X", 0, "+X", ""}, {R_BAKE_POSY, "POS_Y", 0, "+Y", ""}, {R_BAKE_POSZ, "POS_Z", 0, "+Z", ""}, @@ -329,7 +329,7 @@ EnumPropertyItem normal_swizzle_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem bake_save_mode_items[] = { +EnumPropertyItem rna_enum_bake_save_mode_items[] = { {R_BAKE_SAVE_INTERNAL, "INTERNAL", 0, "Internal", "Save the baking map in an internal image data-block"}, {R_BAKE_SAVE_EXTERNAL, "EXTERNAL", 0, "External", "Save the baking map in an external file"}, {0, NULL, 0, NULL, NULL} @@ -341,19 +341,19 @@ EnumPropertyItem bake_save_mode_items[] = { "Single file with an encoded stereo pair"}, #define R_IMF_VIEWS_ENUM_MV {R_IMF_VIEWS_MULTIVIEW, "MULTIVIEW", 0, "Multi-View", "Single file with all the views"}, -EnumPropertyItem views_format_items[] = { +EnumPropertyItem rna_enum_views_format_items[] = { R_IMF_VIEWS_ENUM_IND R_IMF_VIEWS_ENUM_S3D {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem views_format_multilayer_items[] = { +EnumPropertyItem rna_enum_views_format_multilayer_items[] = { R_IMF_VIEWS_ENUM_IND R_IMF_VIEWS_ENUM_MV {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem views_format_multiview_items[] = { +EnumPropertyItem rna_enum_views_format_multiview_items[] = { R_IMF_VIEWS_ENUM_IND R_IMF_VIEWS_ENUM_S3D R_IMF_VIEWS_ENUM_MV @@ -364,7 +364,7 @@ EnumPropertyItem views_format_multiview_items[] = { #undef R_IMF_VIEWS_ENUM_S3D #undef R_IMF_VIEWS_ENUM_MV -EnumPropertyItem stereo3d_display_items[] = { +EnumPropertyItem rna_enum_stereo3d_display_items[] = { {S3D_DISPLAY_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", "Render views for left and right eyes as two differently filtered colors in a single image " "(anaglyph glasses are required)"}, @@ -377,14 +377,14 @@ EnumPropertyItem stereo3d_display_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem stereo3d_anaglyph_type_items[] = { +EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[] = { {S3D_ANAGLYPH_REDCYAN, "RED_CYAN", 0, "Red-Cyan", ""}, {S3D_ANAGLYPH_GREENMAGENTA, "GREEN_MAGENTA", 0, "Green-Magenta", ""}, {S3D_ANAGLYPH_YELLOWBLUE, "YELLOW_BLUE", 0, "Yellow-Blue", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem stereo3d_interlace_type_items[] = { +EnumPropertyItem rna_enum_stereo3d_interlace_type_items[] = { {S3D_INTERLACE_ROW, "ROW_INTERLEAVED", 0, "Row Interleaved", ""}, {S3D_INTERLACE_COLUMN, "COLUMN_INTERLEAVED", 0, "Column Interleaved", ""}, {S3D_INTERLACE_CHECKERBOARD, "CHECKERBOARD_INTERLEAVED", 0, "Checkerboard Interleaved", ""}, @@ -901,7 +901,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf( { ID *id = ptr->id.data; if (id && GS(id->name) == ID_SCE) { - return image_type_items; + return rna_enum_image_type_items; } else { return image_only_type_items; @@ -936,7 +936,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf( #endif if (chan_flag == (IMA_CHAN_FLAG_BW | IMA_CHAN_FLAG_RGB | IMA_CHAN_FLAG_ALPHA)) { - return image_color_mode_items; + return rna_enum_image_color_mode_items; } else { int totitem = 0; @@ -959,17 +959,17 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf( ImageFormatData *imf = (ImageFormatData *)ptr->data; if (imf == NULL) { - return image_color_depth_items; + return rna_enum_image_color_depth_items; } else { const int depth_ok = BKE_imtype_valid_depths(imf->imtype); const int is_float = ELEM(imf->imtype, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER); - EnumPropertyItem *item_8bit = &image_color_depth_items[0]; - EnumPropertyItem *item_10bit = &image_color_depth_items[1]; - EnumPropertyItem *item_12bit = &image_color_depth_items[2]; - EnumPropertyItem *item_16bit = &image_color_depth_items[3]; - EnumPropertyItem *item_32bit = &image_color_depth_items[4]; + EnumPropertyItem *item_8bit = &rna_enum_image_color_depth_items[0]; + EnumPropertyItem *item_10bit = &rna_enum_image_color_depth_items[1]; + EnumPropertyItem *item_12bit = &rna_enum_image_color_depth_items[2]; + EnumPropertyItem *item_16bit = &rna_enum_image_color_depth_items[3]; + EnumPropertyItem *item_32bit = &rna_enum_image_color_depth_items[4]; int totitem = 0; EnumPropertyItem *item = NULL; @@ -1022,16 +1022,16 @@ static EnumPropertyItem *rna_ImageFormatSettings_views_format_itemf( ImageFormatData *imf = (ImageFormatData *)ptr->data; if (imf == NULL) { - return views_format_items; + return rna_enum_views_format_items; } else if (imf->imtype == R_IMF_IMTYPE_OPENEXR) { - return views_format_multiview_items; + return rna_enum_views_format_multiview_items; } else if (imf->imtype == R_IMF_IMTYPE_MULTILAYER) { - return views_format_multilayer_items; + return rna_enum_views_format_multilayer_items; } else { - return views_format_items; + return rna_enum_views_format_items; } } @@ -1047,14 +1047,14 @@ static EnumPropertyItem *rna_ImageFormatSettings_exr_codec_itemf( int i = 1, totitem = 0; if (imf->depth == 16) - return exr_codec_items; /* All compression types are defined for halfs */ + return rna_enum_exr_codec_items; /* All compression types are defined for halfs */ for (i = 0; i < R_IMF_EXR_CODEC_MAX; i++) { if ((i == R_IMF_EXR_CODEC_B44 || i == R_IMF_EXR_CODEC_B44A)) { continue; /* B44 and B44A are not defined for 32 bit floats */ } - RNA_enum_item_add(&item, &totitem, &exr_codec_items[i]); + RNA_enum_item_add(&item, &totitem, &rna_enum_exr_codec_items[i]); } RNA_enum_item_end(&item, &totitem); @@ -2142,7 +2142,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) /* Transform */ prop = RNA_def_property(srna, "proportional_edit", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "proportional"); - RNA_def_property_enum_items(prop, proportional_editing_items); + RNA_def_property_enum_items(prop, rna_enum_proportional_editing_items); RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional Editing mode, allows transforms with distance fall-off"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */ @@ -2177,7 +2177,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "proportional_edit_falloff", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "prop_mode"); - RNA_def_property_enum_items(prop, proportional_falloff_items); + RNA_def_property_enum_items(prop, rna_enum_proportional_falloff_items); RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */ @@ -2225,14 +2225,14 @@ static void rna_def_tool_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "snap_mode"); - RNA_def_property_enum_items(prop, snap_element_items); + RNA_def_property_enum_items(prop, rna_enum_snap_element_items); RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */ /* node editor uses own set of snap modes */ prop = RNA_def_property(srna, "snap_node_element", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "snap_node_mode"); - RNA_def_property_enum_items(prop, snap_node_element_items); + RNA_def_property_enum_items(prop, rna_enum_snap_node_element_items); RNA_def_property_ui_text(prop, "Snap Node Element", "Type of element to snap to"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */ @@ -2245,7 +2245,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "snap_target", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "snap_target"); - RNA_def_property_enum_items(prop, snap_target_items); + RNA_def_property_enum_items(prop, rna_enum_snap_target_items); RNA_def_property_ui_text(prop, "Snap Target", "Which part to snap onto the target"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */ @@ -2557,7 +2557,7 @@ static void rna_def_statvis(BlenderRNA *brna) prop = RNA_def_property(srna, "overhang_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "overhang_axis"); - RNA_def_property_enum_items(prop, object_axis_items); + RNA_def_property_enum_items(prop, rna_enum_object_axis_items); RNA_def_property_ui_text(prop, "Axis", ""); RNA_def_property_update(prop, 0, "rna_EditMesh_update"); @@ -3623,25 +3623,25 @@ static void rna_def_bake_data(BlenderRNA *brna) prop = RNA_def_property(srna, "normal_space", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_space"); - RNA_def_property_enum_items(prop, normal_space_items); + RNA_def_property_enum_items(prop, rna_enum_normal_space_items); RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "normal_r", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_swizzle[0]"); - RNA_def_property_enum_items(prop, normal_swizzle_items); + RNA_def_property_enum_items(prop, rna_enum_normal_swizzle_items); RNA_def_property_ui_text(prop, "Normal Space", "Axis to bake in red channel"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "normal_g", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_swizzle[1]"); - RNA_def_property_enum_items(prop, normal_swizzle_items); + RNA_def_property_enum_items(prop, rna_enum_normal_swizzle_items); RNA_def_property_ui_text(prop, "Normal Space", "Axis to bake in green channel"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "normal_b", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_swizzle[2]"); - RNA_def_property_enum_items(prop, normal_swizzle_items); + RNA_def_property_enum_items(prop, rna_enum_normal_swizzle_items); RNA_def_property_ui_text(prop, "Normal Space", "Axis to bake in blue channel"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3653,7 +3653,7 @@ static void rna_def_bake_data(BlenderRNA *brna) prop = RNA_def_property(srna, "save_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "save_mode"); - RNA_def_property_enum_items(prop, bake_save_mode_items); + RNA_def_property_enum_items(prop, rna_enum_bake_save_mode_items); RNA_def_property_ui_text(prop, "Save Mode", "Choose how to save the baking map"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3814,7 +3814,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna) prop = RNA_def_property(srna, "exit_key", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "exitkey"); - RNA_def_property_enum_items(prop, event_type_items); + RNA_def_property_enum_items(prop, rna_enum_event_type_items); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS); RNA_def_property_enum_default(prop, ESCKEY); RNA_def_property_enum_funcs(prop, NULL, "rna_GameSettings_exit_key_set", NULL); @@ -4458,12 +4458,13 @@ static void rna_def_image_format_stereo3d_format(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; + /* rna_enum_stereo3d_display_items, without (S3D_DISPLAY_PAGEFLIP) */ static EnumPropertyItem stereo3d_display_items[] = { {S3D_DISPLAY_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", - "Render views for left and right eyes as two differently filtered colors in a single image " - "(anaglyph glasses are required)"}, + "Render views for left and right eyes as two differently filtered colors in a single image " + "(anaglyph glasses are required)"}, {S3D_DISPLAY_INTERLACE, "INTERLACE", 0, "Interlace", - "Render views for left and right eyes interlaced in a single image (3D-ready monitor is required)"}, + "Render views for left and right eyes interlaced in a single image (3D-ready monitor is required)"}, {S3D_DISPLAY_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-Side", "Render views for left and right eyes side-by-side"}, {S3D_DISPLAY_TOPBOTTOM, "TOPBOTTOM", 0, "Top-Bottom", "Render views for left and right eyes one above another"}, {0, NULL, 0, NULL, NULL} @@ -4481,12 +4482,12 @@ static void rna_def_image_format_stereo3d_format(BlenderRNA *brna) RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update"); prop = RNA_def_property(srna, "anaglyph_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, stereo3d_anaglyph_type_items); + RNA_def_property_enum_items(prop, rna_enum_stereo3d_anaglyph_type_items); RNA_def_property_ui_text(prop, "Anaglyph Type", ""); RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update"); prop = RNA_def_property(srna, "interlace_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, stereo3d_interlace_type_items); + RNA_def_property_enum_items(prop, rna_enum_stereo3d_interlace_type_items); RNA_def_property_ui_text(prop, "Interlace Type", ""); RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update"); @@ -4535,7 +4536,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "imtype"); - RNA_def_property_enum_items(prop, image_type_items); + RNA_def_property_enum_items(prop, rna_enum_image_type_items); RNA_def_property_enum_funcs(prop, NULL, "rna_ImageFormatSettings_file_format_set", "rna_ImageFormatSettings_file_format_itemf"); RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as"); @@ -4543,7 +4544,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes"); - RNA_def_property_enum_items(prop, image_color_mode_items); + RNA_def_property_enum_items(prop, rna_enum_image_color_mode_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_mode_itemf"); RNA_def_property_ui_text(prop, "Color Mode", "Choose BW for saving grayscale images, RGB for saving red, green and blue channels, " @@ -4552,7 +4553,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) prop = RNA_def_property(srna, "color_depth", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "depth"); - RNA_def_property_enum_items(prop, image_color_depth_items); + RNA_def_property_enum_items(prop, rna_enum_image_color_depth_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_depth_itemf"); RNA_def_property_ui_text(prop, "Color Depth", "Bit depth per channel"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -4591,7 +4592,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) prop = RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "exr_codec"); - RNA_def_property_enum_items(prop, exr_codec_items); + RNA_def_property_enum_items(prop, rna_enum_exr_codec_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_exr_codec_itemf"); RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -4649,7 +4650,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) /* multiview */ prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "views_format"); - RNA_def_property_enum_items(prop, views_format_items); + RNA_def_property_enum_items(prop, rna_enum_views_format_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_views_format_itemf"); RNA_def_property_ui_text(prop, "Views Format", "Format of multiview media"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -5453,7 +5454,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) #if 0 /* moved */ prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "imtype"); - RNA_def_property_enum_items(prop, image_type_items); + RNA_def_property_enum_items(prop, rna_enum_image_type_items); RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_file_format_set", NULL); RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -5736,13 +5737,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop = RNA_def_property(srna, "sequencer_gl_preview", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "seq_prev_type"); - RNA_def_property_enum_items(prop, viewport_shade_items); + RNA_def_property_enum_items(prop, rna_enum_viewport_shade_items); RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view"); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequencer_update"); prop = RNA_def_property(srna, "sequencer_gl_render", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "seq_rend_type"); - RNA_def_property_enum_items(prop, viewport_shade_items); + RNA_def_property_enum_items(prop, rna_enum_viewport_shade_items); RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view"); prop = RNA_def_property(srna, "use_sequencer_gl_textured_solid", PROP_BOOLEAN, PROP_NONE); @@ -5886,7 +5887,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) /* Debugging settings. */ #ifdef WITH_CYCLES_DEBUG prop = RNA_def_property(srna, "debug_pass_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, render_pass_debug_type_items); + RNA_def_property_enum_items(prop, rna_enum_render_pass_debug_type_items); RNA_def_property_ui_text(prop, "Debug Pass Type", "Type of the debug pass to use"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); #endif diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index d21aafc7b94..7487d840636 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -36,7 +36,7 @@ #include "DNA_screen_types.h" #include "DNA_scene_types.h" -EnumPropertyItem region_type_items[] = { +EnumPropertyItem rna_enum_region_type_items[] = { {RGN_TYPE_WINDOW, "WINDOW", 0, "Window", ""}, {RGN_TYPE_HEADER, "HEADER", 0, "Header", ""}, {RGN_TYPE_CHANNELS, "CHANNELS", 0, "Channels", ""}, @@ -127,7 +127,7 @@ static EnumPropertyItem *rna_Area_type_itemf(bContext *UNUSED(C), PointerRNA *UN PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { /* +1 to skip SPACE_EMPTY */ - return space_type_items + 1; + return rna_enum_space_type_items + 1; } static int rna_Area_type_get(PointerRNA *ptr) @@ -239,7 +239,7 @@ static void rna_def_area(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "spacetype"); - RNA_def_property_enum_items(prop, space_type_items); + RNA_def_property_enum_items(prop, rna_enum_space_type_items); RNA_def_property_enum_default(prop, SPACE_VIEW3D); RNA_def_property_enum_funcs(prop, "rna_Area_type_get", "rna_Area_type_set", "rna_Area_type_itemf"); RNA_def_property_ui_text(prop, "Editor Type", "Current editor type for this area"); @@ -334,7 +334,7 @@ static void rna_def_region(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "regiontype"); - RNA_def_property_enum_items(prop, region_type_items); + RNA_def_property_enum_items(prop, rna_enum_region_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Region Type", "Type of this region"); diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 3ec9944900a..9e70d6ce3d6 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -60,7 +60,7 @@ static EnumPropertyItem particle_edit_hair_brush_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem symmetrize_direction_items[] = { +EnumPropertyItem rna_enum_symmetrize_direction_items[] = { {BMO_SYMMETRIZE_NEGATIVE_X, "NEGATIVE_X", 0, "-X to +X", ""}, {BMO_SYMMETRIZE_POSITIVE_X, "POSITIVE_X", 0, "+X to -X", ""}, @@ -562,7 +562,7 @@ static void rna_def_sculpt(BlenderRNA *brna) RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Sculpt_update"); prop = RNA_def_property(srna, "symmetrize_direction", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, symmetrize_direction_items); + RNA_def_property_enum_items(prop, rna_enum_symmetrize_direction_items); RNA_def_property_ui_text(prop, "Direction", "Source and destination for symmetrize operator"); prop = RNA_def_property(srna, "detail_refine_method", PROP_ENUM, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index 2e2c4d459b4..ee24a434486 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -457,7 +457,7 @@ static void rna_def_keyboard_sensor(BlenderRNA *brna) prop = RNA_def_property(srna, "key", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "key"); - RNA_def_property_enum_items(prop, event_type_items); + RNA_def_property_enum_items(prop, rna_enum_event_type_items); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS); RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_keyboard_key_set", NULL); RNA_def_property_ui_text(prop, "Key", ""); @@ -466,7 +466,7 @@ static void rna_def_keyboard_sensor(BlenderRNA *brna) prop = RNA_def_property(srna, "modifier_key_1", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "qual"); - RNA_def_property_enum_items(prop, event_type_items); + RNA_def_property_enum_items(prop, rna_enum_event_type_items); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS); RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_keyboard_modifier_set", NULL); RNA_def_property_ui_text(prop, "Modifier Key", "Modifier key code"); @@ -474,7 +474,7 @@ static void rna_def_keyboard_sensor(BlenderRNA *brna) prop = RNA_def_property(srna, "modifier_key_2", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "qual2"); - RNA_def_property_enum_items(prop, event_type_items); + RNA_def_property_enum_items(prop, rna_enum_event_type_items); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS); RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_keyboard_modifier2_set", NULL); RNA_def_property_ui_text(prop, "Second Modifier Key", "Modifier key code"); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index e6c71acd4aa..de138699e3a 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -60,7 +60,7 @@ typedef struct EffectInfo { int inputs; } EffectInfo; -EnumPropertyItem sequence_modifier_type_items[] = { +EnumPropertyItem rna_enum_sequence_modifier_type_items[] = { {seqModifierType_ColorBalance, "COLOR_BALANCE", ICON_NONE, "Color Balance", ""}, {seqModifierType_Curves, "CURVES", ICON_NONE, "Curves", ""}, {seqModifierType_HueCorrect, "HUE_CORRECT", ICON_NONE, "Hue Correct", ""}, @@ -1357,7 +1357,7 @@ static void rna_def_sequence_modifiers(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the modifier"); RNA_def_property_flag(parm, PROP_REQUIRED); /* modifier to add */ - parm = RNA_def_enum(func, "type", sequence_modifier_type_items, seqModifierType_ColorBalance, "", "Modifier type to add"); + parm = RNA_def_enum(func, "type", rna_enum_sequence_modifier_type_items, seqModifierType_ColorBalance, "", "Modifier type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); /* return type */ parm = RNA_def_pointer(func, "modifier", "SequenceModifier", "", "Newly created modifier"); @@ -1847,7 +1847,7 @@ static void rna_def_image(BlenderRNA *brna) prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "views_format"); - RNA_def_property_enum_items(prop, views_format_items); + RNA_def_property_enum_items(prop, rna_enum_views_format_items); RNA_def_property_ui_text(prop, "Views Format", "Mode to load image views"); RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Sequence_views_format_update"); @@ -1956,7 +1956,7 @@ static void rna_def_movie(BlenderRNA *brna) prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "views_format"); - RNA_def_property_enum_items(prop, views_format_items); + RNA_def_property_enum_items(prop, rna_enum_views_format_items); RNA_def_property_ui_text(prop, "Views Format", "Mode to load movie views"); RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Sequence_views_format_update"); @@ -2435,7 +2435,7 @@ static void rna_def_modifier(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_enum_items(prop, sequence_modifier_type_items); + RNA_def_property_enum_items(prop, rna_enum_sequence_modifier_type_items); RNA_def_property_ui_text(prop, "Type", ""); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL); diff --git a/source/blender/makesrna/intern/rna_sound_api.c b/source/blender/makesrna/intern/rna_sound_api.c index 0164daa98d0..293a5135acb 100644 --- a/source/blender/makesrna/intern/rna_sound_api.c +++ b/source/blender/makesrna/intern/rna_sound_api.c @@ -67,7 +67,7 @@ void RNA_api_sound(StructRNA *srna) func = RNA_def_function(srna, "unpack", "rna_Sound_unpack"); RNA_def_function_ui_description(func, "Unpack the sound to the samples filename"); RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_MAIN); - RNA_def_enum(func, "method", unpack_method_items, PF_USE_LOCAL, "method", "How to unpack"); + RNA_def_enum(func, "method", rna_enum_unpack_method_items, PF_USE_LOCAL, "method", "How to unpack"); } #endif diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 65de2195c51..f3f4f3c1c3d 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -60,7 +60,7 @@ #include "RNA_enum_types.h" -EnumPropertyItem space_type_items[] = { +EnumPropertyItem rna_enum_space_type_items[] = { /* empty must be here for python, is skipped for UI */ {SPACE_EMPTY, "EMPTY", ICON_NONE, "Empty", ""}, {SPACE_VIEW3D, "VIEW_3D", ICON_VIEW3D, "3D View", "3D viewport"}, @@ -175,7 +175,7 @@ static EnumPropertyItem autosnap_items[] = { }; #endif -EnumPropertyItem viewport_shade_items[] = { +EnumPropertyItem rna_enum_viewport_shade_items[] = { {OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, "Bounding Box", "Display the object's local bounding boxes only"}, {OB_WIRE, "WIREFRAME", ICON_WIRE, "Wireframe", "Display the object as wire edges"}, {OB_SOLID, "SOLID", ICON_SOLID, "Solid", "Display the object solid, lit with default OpenGL lights"}, @@ -186,7 +186,7 @@ EnumPropertyItem viewport_shade_items[] = { }; -EnumPropertyItem clip_editor_mode_items[] = { +EnumPropertyItem rna_enum_clip_editor_mode_items[] = { {SC_MODE_TRACKING, "TRACKING", ICON_ANIM_DATA, "Tracking", "Show tracking and solving tools"}, {SC_MODE_MASKEDIT, "MASK", ICON_MOD_MASK, "Mask", "Show mask editing tools"}, {0, NULL, 0, NULL, NULL} @@ -232,7 +232,7 @@ static EnumPropertyItem fileselectparams_recursion_level_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem file_sort_items[] = { +EnumPropertyItem rna_enum_file_sort_items[] = { {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically"}, {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension/type"}, {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time"}, @@ -698,14 +698,14 @@ static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C EnumPropertyItem *item = NULL; int totitem = 0; - RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_BOUNDBOX); - RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_WIRE); - RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_SOLID); - RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_TEXTURE); - RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_MATERIAL); + RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_BOUNDBOX); + RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_WIRE); + RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_SOLID); + RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_TEXTURE); + RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_MATERIAL); if (type && type->view_draw) - RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_RENDER); + RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_RENDER); RNA_enum_item_end(&item, &totitem); *r_free = true; @@ -1863,7 +1863,7 @@ static void rna_def_space(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "spacetype"); - RNA_def_property_enum_items(prop, space_type_items); + RNA_def_property_enum_items(prop, rna_enum_space_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Type", "Space data type"); @@ -2395,7 +2395,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) prop = RNA_def_property(srna, "viewport_shade", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "drawtype"); - RNA_def_property_enum_items(prop, viewport_shade_items); + RNA_def_property_enum_items(prop, rna_enum_viewport_shade_items); RNA_def_property_enum_funcs(prop, "rna_SpaceView3D_viewport_shade_get", NULL, "rna_SpaceView3D_viewport_shade_itemf"); RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View"); @@ -3863,7 +3863,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna) prop = RNA_def_property(srna, "sort_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "sort"); - RNA_def_property_enum_items(prop, file_sort_items); + RNA_def_property_enum_items(prop, rna_enum_file_sort_items); RNA_def_property_ui_text(prop, "Sort", ""); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_FILE_PARAMS, NULL); @@ -4203,7 +4203,7 @@ static void rna_def_space_node(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem texture_type_items[] = { + static EnumPropertyItem texture_id_type_items[] = { {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"}, {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"}, {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"}, @@ -4256,7 +4256,7 @@ static void rna_def_space_node(BlenderRNA *brna) prop = RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "texfrom"); - RNA_def_property_enum_items(prop, texture_type_items); + RNA_def_property_enum_items(prop, texture_id_type_items); RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); @@ -4493,7 +4493,7 @@ static void rna_def_space_clip(BlenderRNA *brna) /* mode */ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); - RNA_def_property_enum_items(prop, clip_editor_mode_items); + RNA_def_property_enum_items(prop, rna_enum_clip_editor_mode_items); RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_clip_mode_update"); diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 5424855ccf4..71069dc9751 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -61,7 +61,7 @@ static EnumPropertyItem texture_filter_items[] = { }; #endif -EnumPropertyItem texture_type_items[] = { +EnumPropertyItem rna_enum_texture_type_items[] = { {0, "NONE", 0, "None", ""}, {TEX_BLEND, "BLEND", ICON_TEXTURE, "Blend", "Procedural - create a ramp texture"}, {TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", "Procedural - create a cloud-like fractal noise texture"}, @@ -2028,7 +2028,7 @@ static void rna_def_texture(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); /*RNA_def_property_clear_flag(prop, PROP_EDITABLE); */ RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, texture_type_items); + RNA_def_property_enum_items(prop, rna_enum_texture_type_items); RNA_def_property_enum_funcs(prop, NULL, "rna_Texture_type_set", NULL); RNA_def_property_ui_text(prop, "Type", ""); RNA_def_property_update(prop, 0, "rna_Texture_update"); diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 2595771bece..5f11dd51282 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -43,7 +43,7 @@ #include "WM_types.h" /* see WM_types.h */ -EnumPropertyItem operator_context_items[] = { +EnumPropertyItem rna_enum_operator_context_items[] = { {WM_OP_INVOKE_DEFAULT, "INVOKE_DEFAULT", 0, "Invoke Default", ""}, {WM_OP_INVOKE_REGION_WIN, "INVOKE_REGION_WIN", 0, "Invoke Region Window", ""}, {WM_OP_INVOKE_REGION_CHANNELS, "INVOKE_REGION_CHANNELS", 0, "Invoke Region Channels", ""}, @@ -59,7 +59,7 @@ EnumPropertyItem operator_context_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem uilist_layout_type_items[] = { +EnumPropertyItem rna_enum_uilist_layout_type_items[] = { {UILST_LAYOUT_DEFAULT, "DEFAULT", 0, "Default Layout", "Use the default, multi-rows layout"}, {UILST_LAYOUT_COMPACT, "COMPACT", 0, "Compact Layout", "Use the compact, single-row layout"}, {UILST_LAYOUT_GRID, "GRID", 0, "Grid Layout", "Use the grid-based layout"}, @@ -886,7 +886,7 @@ static void rna_def_ui_layout(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, "rna_UILayout_active_get", "rna_UILayout_active_set"); prop = RNA_def_property(srna, "operator_context", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, operator_context_items); + RNA_def_property_enum_items(prop, rna_enum_operator_context_items); RNA_def_property_enum_funcs(prop, "rna_UILayout_op_context_get", "rna_UILayout_op_context_set", NULL); prop = RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE); @@ -996,13 +996,13 @@ static void rna_def_panel(BlenderRNA *brna) prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); - RNA_def_property_enum_items(prop, space_type_items); + RNA_def_property_enum_items(prop, rna_enum_space_type_items); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "Space type", "The space where the panel is going to be used in"); prop = RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->region_type"); - RNA_def_property_enum_items(prop, region_type_items); + RNA_def_property_enum_items(prop, rna_enum_region_type_items); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "Region Type", "The region where the panel is going to be used in"); @@ -1052,7 +1052,7 @@ static void rna_def_uilist(BlenderRNA *brna) /* Data */ prop = RNA_def_property(srna, "layout_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, uilist_layout_type_items); + RNA_def_property_enum_items(prop, rna_enum_uilist_layout_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* Filter options */ @@ -1187,7 +1187,7 @@ static void rna_def_header(BlenderRNA *brna) prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); - RNA_def_property_enum_items(prop, space_type_items); + RNA_def_property_enum_items(prop, rna_enum_space_type_items); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "Space type", "The space where the header is going to be used in"); diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 33cb8373abb..80777f57811 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -50,7 +50,7 @@ #define DEF_ICON_BLANK_SKIP #define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""}, #define DEF_VICO(name) {VICO_##name, (#name), 0, (#name), ""}, -EnumPropertyItem icon_items[] = { +EnumPropertyItem rna_enum_icon_items[] = { #include "UI_icons.h" {0, NULL, 0, NULL, NULL} }; @@ -389,7 +389,7 @@ static void api_ui_item_common(FunctionRNA *func) api_ui_item_common_text(func); prop = RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, icon_items); + RNA_def_property_enum_items(prop, rna_enum_icon_items); RNA_def_property_ui_text(prop, "Icon", "Override automatic icon of the item"); } @@ -843,7 +843,7 @@ void RNA_api_ui_layout(StructRNA *srna) "Identifier of a string property in items, to use as tooltip content"); RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Default and minimum number of rows to display", 0, INT_MAX); RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Default maximum number of rows to display", 0, INT_MAX); - RNA_def_enum(func, "type", uilist_layout_type_items, UILST_LAYOUT_DEFAULT, "Type", "Type of layout to use"); + RNA_def_enum(func, "type", rna_enum_uilist_layout_type_items, UILST_LAYOUT_DEFAULT, "Type", "Type of layout to use"); RNA_def_int(func, "columns", 9, 0, INT_MAX, "", "Number of items to display per row, for GRID layout", 0, INT_MAX); func = RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs"); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index a61f6b909ad..83c159a46dd 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -88,7 +88,7 @@ static EnumPropertyItem audio_device_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem navigation_mode_items[] = { +EnumPropertyItem rna_enum_navigation_mode_items[] = { {VIEW_NAVIGATION_WALK, "WALK", 0, "Walk", "Interactively walk or free navigate around the scene"}, {VIEW_NAVIGATION_FLY, "FLY", 0, "Fly", "Use fly dynamics to navigate the scene"}, {0, NULL, 0, NULL, NULL} @@ -3714,14 +3714,14 @@ static void rna_def_userdef_edit(BlenderRNA *brna) "and also Color is based on the transform axis"); prop = RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items); + RNA_def_property_enum_items(prop, rna_enum_beztriple_interpolation_mode_items); RNA_def_property_enum_sdna(prop, NULL, "ipo_new"); RNA_def_property_ui_text(prop, "New Interpolation Type", "Interpolation mode used for first keyframe on newly added F-Curves " "(subsequent keyframes take interpolation from preceding keyframe)"); prop = RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, keyframe_handle_type_items); + RNA_def_property_enum_items(prop, rna_enum_keyframe_handle_type_items); RNA_def_property_enum_sdna(prop, NULL, "keyhandles_new"); RNA_def_property_ui_text(prop, "New Handles Type", "Handle type for handles of new keyframes"); @@ -4354,7 +4354,7 @@ static void rna_def_userdef_input(BlenderRNA *brna) /* View Navigation */ prop = RNA_def_property(srna, "navigation_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "navigation_mode"); - RNA_def_property_enum_items(prop, navigation_mode_items); + RNA_def_property_enum_items(prop, rna_enum_navigation_mode_items); RNA_def_property_ui_text(prop, "View Navigation", "Which method to use for viewport navigation"); prop = RNA_def_property(srna, "walk_navigation", PROP_POINTER, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_vfont_api.c b/source/blender/makesrna/intern/rna_vfont_api.c index d92e75daf0a..6a2a7f3ffad 100644 --- a/source/blender/makesrna/intern/rna_vfont_api.c +++ b/source/blender/makesrna/intern/rna_vfont_api.c @@ -67,7 +67,7 @@ void RNA_api_vfont(StructRNA *srna) func = RNA_def_function(srna, "unpack", "rna_VectorFont_unpack"); RNA_def_function_ui_description(func, "Unpack the font to the samples filename"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - RNA_def_enum(func, "method", unpack_method_items, PF_USE_LOCAL, "method", "How to unpack"); + RNA_def_enum(func, "method", rna_enum_unpack_method_items, PF_USE_LOCAL, "method", "How to unpack"); } #endif diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 867d29fea88..20e9d64a47a 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -167,7 +167,7 @@ static EnumPropertyItem event_ndof_type_items[] = { #endif /* not returned: CAPSLOCKKEY, UNKNOWNKEY */ -EnumPropertyItem event_type_items[] = { +EnumPropertyItem rna_enum_event_type_items[] = { /* Note we abuse 'tooltip' message here to store a 'compact' form of some (too) long names. */ {0, "NONE", 0, "", ""}, {LEFTMOUSE, "LEFTMOUSE", 0, "Left Mouse", "LMB"}, @@ -374,7 +374,7 @@ EnumPropertyItem event_type_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem event_value_items[] = { +EnumPropertyItem rna_enum_event_value_items[] = { {KM_ANY, "ANY", 0, "Any", ""}, {KM_NOTHING, "NOTHING", 0, "Nothing", ""}, {KM_PRESS, "PRESS", 0, "Press", ""}, @@ -392,7 +392,7 @@ EnumPropertyItem event_value_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem keymap_propvalue_items[] = { +EnumPropertyItem rna_enum_keymap_propvalue_items[] = { {0, "NONE", 0, "", ""}, {0, NULL, 0, NULL, NULL} }; @@ -423,7 +423,7 @@ static EnumPropertyItem operator_flag_items[] = { }; #endif -EnumPropertyItem operator_return_items[] = { +EnumPropertyItem rna_enum_operator_return_items[] = { {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"}, {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", "When no action has been taken, operator exits"}, {OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"}, @@ -434,7 +434,7 @@ EnumPropertyItem operator_return_items[] = { }; /* flag/enum */ -EnumPropertyItem wm_report_items[] = { +EnumPropertyItem rna_enum_wm_report_items[] = { {RPT_DEBUG, "DEBUG", 0, "Debug", ""}, {RPT_INFO, "INFO", 0, "Info", ""}, {RPT_OPERATOR, "OPERATOR", 0, "Operator", ""}, @@ -700,7 +700,7 @@ static void rna_wmKeyMapItem_map_type_set(PointerRNA *ptr, int value) } } -/* assumes value to be an enum from event_type_items */ +/* assumes value to be an enum from rna_enum_event_type_items */ /* function makes sure keymodifiers are only valid keys, ESC keeps it unaltered */ static void rna_wmKeyMapItem_keymodifier_set(PointerRNA *ptr, int value) { @@ -731,7 +731,7 @@ static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerR if (map_type == KMI_TYPE_TIMER) return event_timer_type_items; if (map_type == KMI_TYPE_NDOF) return event_ndof_type_items; if (map_type == KMI_TYPE_TEXTINPUT) return event_textinput_type_items; - else return event_type_items; + else return rna_enum_event_type_items; } static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), @@ -744,7 +744,7 @@ static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *UNUSED(C), Pointer if (map_type == KMI_TYPE_TWEAK) return event_tweak_value_items; else - return event_value_items; + return rna_enum_event_value_items; } static EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), @@ -769,7 +769,7 @@ static EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA } - return keymap_propvalue_items; /* ERROR */ + return rna_enum_keymap_propvalue_items; /* ERROR */ } static int rna_KeyMapItem_any_get(PointerRNA *ptr) @@ -1667,13 +1667,13 @@ static void rna_def_event(BlenderRNA *brna) /* enums */ prop = RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "val"); - RNA_def_property_enum_items(prop, event_value_items); + RNA_def_property_enum_items(prop, rna_enum_event_value_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Value", "The type of event, only applies to some"); prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, event_type_items); + RNA_def_property_enum_items(prop, rna_enum_event_type_items); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Type", ""); @@ -1831,15 +1831,15 @@ static void rna_def_window_stereo3d(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Stereo 3D Display", "Settings for stereo 3D display"); prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, stereo3d_display_items); + RNA_def_property_enum_items(prop, rna_enum_stereo3d_display_items); RNA_def_property_ui_text(prop, "Display Mode", ""); prop = RNA_def_property(srna, "anaglyph_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, stereo3d_anaglyph_type_items); + RNA_def_property_enum_items(prop, rna_enum_stereo3d_anaglyph_type_items); RNA_def_property_ui_text(prop, "Anaglyph Type", ""); prop = RNA_def_property(srna, "interlace_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, stereo3d_interlace_type_items); + RNA_def_property_enum_items(prop, rna_enum_stereo3d_interlace_type_items); RNA_def_property_ui_text(prop, "Interlace Type", ""); prop = RNA_def_property(srna, "use_interlace_swap", PROP_BOOLEAN, PROP_BOOLEAN); @@ -2047,13 +2047,13 @@ static void rna_def_keyconfig(BlenderRNA *brna) prop = RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "spaceid"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_enum_items(prop, space_type_items); + RNA_def_property_enum_items(prop, rna_enum_space_type_items); RNA_def_property_ui_text(prop, "Space Type", "Optional space type keymap is associated with"); prop = RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "regionid"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_enum_items(prop, region_type_items); + RNA_def_property_enum_items(prop, rna_enum_region_type_items); RNA_def_property_ui_text(prop, "Region Type", "Optional region type keymap is associated with"); prop = RNA_def_property(srna, "keymap_items", PROP_COLLECTION, PROP_NONE); @@ -2120,7 +2120,7 @@ static void rna_def_keyconfig(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, event_type_items); + RNA_def_property_enum_items(prop, rna_enum_event_type_items); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_type_itemf"); RNA_def_property_ui_text(prop, "Type", "Type of event"); @@ -2128,7 +2128,7 @@ static void rna_def_keyconfig(BlenderRNA *brna) prop = RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "val"); - RNA_def_property_enum_items(prop, event_value_items); + RNA_def_property_enum_items(prop, rna_enum_event_value_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_value_itemf"); RNA_def_property_ui_text(prop, "Value", ""); RNA_def_property_update(prop, 0, "rna_KeyMapItem_update"); @@ -2178,7 +2178,7 @@ static void rna_def_keyconfig(BlenderRNA *brna) prop = RNA_def_property(srna, "key_modifier", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "keymodifier"); - RNA_def_property_enum_items(prop, event_type_items); + RNA_def_property_enum_items(prop, rna_enum_event_type_items); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS); RNA_def_property_enum_funcs(prop, NULL, "rna_wmKeyMapItem_keymodifier_set", NULL); RNA_def_property_ui_text(prop, "Key Modifier", "Regular key pressed as a modifier"); @@ -2192,7 +2192,7 @@ static void rna_def_keyconfig(BlenderRNA *brna) prop = RNA_def_property(srna, "propvalue", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "propvalue"); - RNA_def_property_enum_items(prop, keymap_propvalue_items); + RNA_def_property_enum_items(prop, rna_enum_keymap_propvalue_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_propvalue_itemf"); RNA_def_property_ui_text(prop, "Property Value", "The value this event translates to in a modal keymap"); RNA_def_property_update(prop, 0, "rna_KeyMapItem_update"); diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index e2fa053a6f2..7cf0cf67269 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -46,7 +46,7 @@ #include "rna_internal.h" /* own include */ /* confusingm 2 enums mixed up here */ -EnumPropertyItem window_cursor_items[] = { +EnumPropertyItem rna_enum_window_cursor_items[] = { {CURSOR_STD, "DEFAULT", 0, "Default", ""}, {CURSOR_NONE, "NONE", 0, "None", ""}, {CURSOR_WAIT, "WAIT", 0, "Wait", ""}, @@ -353,7 +353,7 @@ static void rna_generic_op_invoke(FunctionRNA *func, int flag) } if (flag & WM_GEN_INVOKE_RETURN) { - parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); + parm = RNA_def_enum_flag(func, "result", rna_enum_operator_return_items, OPERATOR_CANCELLED, "result", ""); RNA_def_function_return(func, parm); } } @@ -372,13 +372,13 @@ void RNA_api_window(StructRNA *srna) func = RNA_def_function(srna, "cursor_set", "WM_cursor_set"); parm = RNA_def_property(func, "cursor", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(parm, window_cursor_items); + RNA_def_property_enum_items(parm, rna_enum_window_cursor_items); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_function_ui_description(func, "Set the cursor"); func = RNA_def_function(srna, "cursor_modal_set", "WM_cursor_modal_set"); parm = RNA_def_property(func, "cursor", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(parm, window_cursor_items); + RNA_def_property_enum_items(parm, rna_enum_window_cursor_items); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_function_ui_description(func, "Set the cursor, so the previous cursor can be restored"); @@ -468,7 +468,7 @@ void RNA_api_wm(StructRNA *srna) parm = RNA_def_string(func, "title", NULL, 0, "", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(parm, icon_items); + RNA_def_property_enum_items(parm, rna_enum_icon_items); /* return */ parm = RNA_def_pointer(func, "menu", "UIPopupMenu", "", ""); RNA_def_property_flag(parm, PROP_RNAPTR | PROP_NEVER_NULL); @@ -486,7 +486,7 @@ void RNA_api_wm(StructRNA *srna) parm = RNA_def_string(func, "title", NULL, 0, "", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(parm, icon_items); + RNA_def_property_enum_items(parm, rna_enum_icon_items); parm = RNA_def_pointer(func, "event", "Event", "", ""); RNA_def_property_flag(parm, PROP_RNAPTR | PROP_NEVER_NULL); /* return */ @@ -508,7 +508,7 @@ void RNA_api_operator(StructRNA *srna) /* utility, not for registering */ func = RNA_def_function(srna, "report", "rna_Operator_report"); - parm = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", ""); + parm = RNA_def_enum_flag(func, "type", rna_enum_wm_report_items, 0, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_string(func, "message", NULL, 0, "Report Message", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -532,7 +532,7 @@ void RNA_api_operator(StructRNA *srna) RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); /* better name? */ - parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); + parm = RNA_def_enum_flag(func, "result", rna_enum_operator_return_items, OPERATOR_CANCELLED, "result", ""); RNA_def_function_return(func, parm); /* check */ @@ -555,7 +555,7 @@ void RNA_api_operator(StructRNA *srna) RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); /* better name? */ - parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); + parm = RNA_def_enum_flag(func, "result", rna_enum_operator_return_items, OPERATOR_CANCELLED, "result", ""); RNA_def_function_return(func, parm); func = RNA_def_function(srna, "modal", NULL); /* same as invoke */ @@ -567,7 +567,7 @@ void RNA_api_operator(StructRNA *srna) RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); /* better name? */ - parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); + parm = RNA_def_enum_flag(func, "result", rna_enum_operator_return_items, OPERATOR_CANCELLED, "result", ""); RNA_def_function_return(func, parm); /* draw */ @@ -592,7 +592,7 @@ void RNA_api_macro(StructRNA *srna) /* utility, not for registering */ func = RNA_def_function(srna, "report", "rna_Operator_report"); - parm = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", ""); + parm = RNA_def_enum_flag(func, "type", rna_enum_wm_report_items, 0, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_string(func, "message", NULL, 0, "Report Message", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -662,16 +662,16 @@ void RNA_api_keymapitems(StructRNA *srna) RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_string(func, "idname", NULL, 0, "Operator Identifier", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", event_type_items, 0, "Type", ""); + parm = RNA_def_enum(func, "type", rna_enum_event_type_items, 0, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "value", event_value_items, 0, "Value", ""); + parm = RNA_def_enum(func, "value", rna_enum_event_value_items, 0, "Value", ""); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_boolean(func, "any", 0, "Any", ""); RNA_def_boolean(func, "shift", 0, "Shift", ""); RNA_def_boolean(func, "ctrl", 0, "Ctrl", ""); RNA_def_boolean(func, "alt", 0, "Alt", ""); RNA_def_boolean(func, "oskey", 0, "OS Key", ""); - RNA_def_enum(func, "key_modifier", event_type_items, 0, "Key Modifier", ""); + RNA_def_enum(func, "key_modifier", rna_enum_event_type_items, 0, "Key Modifier", ""); RNA_def_boolean(func, "head", 0, "At Head", "Force item to be added at start (not end) of key map so that " "it doesn't get blocked by an existing key map item"); @@ -682,16 +682,16 @@ void RNA_api_keymapitems(StructRNA *srna) RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_string(func, "propvalue", NULL, 0, "Property Value", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", event_type_items, 0, "Type", ""); + parm = RNA_def_enum(func, "type", rna_enum_event_type_items, 0, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "value", event_value_items, 0, "Value", ""); + parm = RNA_def_enum(func, "value", rna_enum_event_value_items, 0, "Value", ""); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_boolean(func, "any", 0, "Any", ""); RNA_def_boolean(func, "shift", 0, "Shift", ""); RNA_def_boolean(func, "ctrl", 0, "Ctrl", ""); RNA_def_boolean(func, "alt", 0, "Alt", ""); RNA_def_boolean(func, "oskey", 0, "OS Key", ""); - RNA_def_enum(func, "key_modifier", event_type_items, 0, "Key Modifier", ""); + RNA_def_enum(func, "key_modifier", rna_enum_event_type_items, 0, "Key Modifier", ""); parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item"); RNA_def_function_return(func, parm); @@ -717,8 +717,8 @@ void RNA_api_keymaps(StructRNA *srna) func = RNA_def_function(srna, "new", "rna_keymap_new"); /* add_keymap */ parm = RNA_def_string(func, "name", NULL, 0, "Name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", ""); - RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", ""); + RNA_def_enum(func, "space_type", rna_enum_space_type_items, SPACE_EMPTY, "Space Type", ""); + RNA_def_enum(func, "region_type", rna_enum_region_type_items, RGN_TYPE_WINDOW, "Region Type", ""); RNA_def_boolean(func, "modal", 0, "Modal", ""); parm = RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Added key map"); RNA_def_function_return(func, parm); @@ -732,8 +732,8 @@ void RNA_api_keymaps(StructRNA *srna) func = RNA_def_function(srna, "find", "rna_keymap_find"); /* find_keymap */ parm = RNA_def_string(func, "name", NULL, 0, "Name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", ""); - RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", ""); + RNA_def_enum(func, "space_type", rna_enum_space_type_items, SPACE_EMPTY, "Space Type", ""); + RNA_def_enum(func, "region_type", rna_enum_region_type_items, RGN_TYPE_WINDOW, "Region Type", ""); parm = RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map"); RNA_def_function_return(func, parm); diff --git a/source/blender/nodes/intern/node_util.c b/source/blender/nodes/intern/node_util.c index 046188f8508..3a301f55487 100644 --- a/source/blender/nodes/intern/node_util.c +++ b/source/blender/nodes/intern/node_util.c @@ -86,28 +86,28 @@ void *node_initexec_curves(bNodeExecContext *UNUSED(context), bNode *node, bNode void node_blend_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int maxlen) { const char *name; - RNA_enum_name(ramp_blend_items, node->custom1, &name); + RNA_enum_name(rna_enum_ramp_blend_items, node->custom1, &name); BLI_strncpy(label, IFACE_(name), maxlen); } void node_math_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int maxlen) { const char *name; - RNA_enum_name(node_math_items, node->custom1, &name); + RNA_enum_name(rna_enum_node_math_items, node->custom1, &name); BLI_strncpy(label, IFACE_(name), maxlen); } void node_vect_math_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int maxlen) { const char *name; - RNA_enum_name(node_vec_math_items, node->custom1, &name); + RNA_enum_name(rna_enum_node_vec_math_items, node->custom1, &name); BLI_strncpy(label, IFACE_(name), maxlen); } void node_filter_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int maxlen) { const char *name; - RNA_enum_name(node_filter_items, node->custom1, &name); + RNA_enum_name(rna_enum_node_filter_items, node->custom1, &name); BLI_strncpy(label, IFACE_(name), maxlen); } diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c index 7cccc204088..d6c57f4c302 100644 --- a/source/blender/python/intern/bpy_operator.c +++ b/source/blender/python/intern/bpy_operator.c @@ -98,8 +98,8 @@ static PyObject *pyop_poll(PyObject *UNUSED(self), PyObject *args) } if (context_str) { - if (RNA_enum_value_from_id(operator_context_items, context_str, &context) == 0) { - char *enum_str = BPy_enum_as_string(operator_context_items); + if (RNA_enum_value_from_id(rna_enum_operator_context_items, context_str, &context) == 0) { + char *enum_str = BPy_enum_as_string(rna_enum_operator_context_items); PyErr_Format(PyExc_TypeError, "Calling operator \"bpy.ops.%s.poll\" error, " "expected a string enum in (%s)", @@ -184,8 +184,8 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args) } if (context_str) { - if (RNA_enum_value_from_id(operator_context_items, context_str, &context) == 0) { - char *enum_str = BPy_enum_as_string(operator_context_items); + if (RNA_enum_value_from_id(rna_enum_operator_context_items, context_str, &context) == 0) { + char *enum_str = BPy_enum_as_string(rna_enum_operator_context_items); PyErr_Format(PyExc_TypeError, "Calling operator \"bpy.ops.%s\" error, " "expected a string enum in (%s)", @@ -301,7 +301,7 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args) bpy_import_main_set(CTX_data_main(C)); /* return operator_ret as a bpy enum */ - return pyrna_enum_bitfield_to_py(operator_return_items, operator_ret); + return pyrna_enum_bitfield_to_py(rna_enum_operator_return_items, operator_ret); } diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index 19ded7fb4f3..529ee3bae9a 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -85,7 +85,7 @@ static EnumPropertyItem property_flag_enum_items[] = { " :type options: set\n" \ /* subtypes */ -/* XXX Keep in sync with rna_rna.c's property_subtype_items ??? +/* XXX Keep in sync with rna_rna.c's rna_enum_property_subtype_items ??? * Currently it is not... */ static EnumPropertyItem property_subtype_string_items[] = { @@ -1304,7 +1304,7 @@ static int icon_id_from_name(const char *name) int id; if (name[0]) { - for (item = icon_items, id = 0; item->identifier; item++, id++) { + for (item = rna_enum_icon_items, id = 0; item->identifier; item++, id++) { if (STREQ(item->name, name)) { return item->value; } @@ -2376,7 +2376,7 @@ static PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) BPY_PROPDEF_SUBTYPE_CHECK(FloatProperty, property_flag_items, property_subtype_number_items); - if (pyunit && RNA_enum_value_from_id(property_unit_items, pyunit, &unit) == 0) { + if (pyunit && RNA_enum_value_from_id(rna_enum_property_unit_items, pyunit, &unit) == 0) { PyErr_Format(PyExc_TypeError, "FloatProperty(unit='%s'): invalid unit", pyunit); return NULL; } @@ -2489,7 +2489,7 @@ static PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObjec BPY_PROPDEF_SUBTYPE_CHECK(FloatVectorProperty, property_flag_items, property_subtype_array_items); - if (pyunit && RNA_enum_value_from_id(property_unit_items, pyunit, &unit) == 0) { + if (pyunit && RNA_enum_value_from_id(rna_enum_property_unit_items, pyunit, &unit) == 0) { PyErr_Format(PyExc_TypeError, "FloatVectorProperty(unit='%s'): invalid unit", pyunit); return NULL; } diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 5414c4e4204..220ec5b6e8c 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -920,7 +920,7 @@ static PyObject *pyrna_prop_str(BPy_PropertyRNA *self) type = RNA_property_type(self->prop); - if (RNA_enum_id_from_value(property_type_items, type, &type_id) == 0) { + if (RNA_enum_id_from_value(rna_enum_property_type_items, type, &type_id) == 0) { PyErr_SetString(PyExc_RuntimeError, "could not use property type, internal error"); /* should never happen */ return NULL; } diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c index ced7d6a5c1c..63bfdc63e4d 100644 --- a/source/blender/python/intern/bpy_rna_anim.c +++ b/source/blender/python/intern/bpy_rna_anim.c @@ -171,7 +171,7 @@ static int pyrna_struct_keyframe_parse( /* flag may be null (no option currently for remove keyframes e.g.). */ if (options) { - if (pyoptions && (pyrna_set_to_enum_bitfield(keying_flag_items, pyoptions, options, error_prefix) == -1)) { + if (pyoptions && (pyrna_set_to_enum_bitfield(rna_enum_keying_flag_items, pyoptions, options, error_prefix) == -1)) { return -1; } diff --git a/source/blender/python/intern/bpy_rna_callback.c b/source/blender/python/intern/bpy_rna_callback.c index 4ae739407eb..df1c4155a6d 100644 --- a/source/blender/python/intern/bpy_rna_callback.c +++ b/source/blender/python/intern/bpy_rna_callback.c @@ -215,7 +215,7 @@ PyObject *pyrna_callback_classmethod_add(PyObject *UNUSED(self), PyObject *args) if (pyrna_enum_value_from_id(region_draw_mode_items, cb_event_str, &cb_event, "bpy_struct.callback_add()") == -1) { return NULL; } - else if (pyrna_enum_value_from_id(region_type_items, cb_regiontype_str, &cb_regiontype, "bpy_struct.callback_add()") == -1) { + else if (pyrna_enum_value_from_id(rna_enum_region_type_items, cb_regiontype_str, &cb_regiontype, "bpy_struct.callback_add()") == -1) { return NULL; } else { @@ -278,7 +278,7 @@ PyObject *pyrna_callback_classmethod_remove(PyObject *UNUSED(self), PyObject *ar customdata = ED_region_draw_cb_customdata(handle); Py_DECREF((PyObject *)customdata); - if (pyrna_enum_value_from_id(region_type_items, cb_regiontype_str, &cb_regiontype, "bpy_struct.callback_remove()") == -1) { + if (pyrna_enum_value_from_id(rna_enum_region_type_items, cb_regiontype_str, &cb_regiontype, "bpy_struct.callback_remove()") == -1) { return NULL; } else { diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 187c11ef3da..b2debf643d0 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -559,8 +559,8 @@ void WM_event_print(const wmEvent *event) const char *type_id = unknown; const char *val_id = unknown; - RNA_enum_identifier(event_type_items, event->type, &type_id); - RNA_enum_identifier(event_value_items, event->val, &val_id); + RNA_enum_identifier(rna_enum_event_type_items, event->type, &type_id); + RNA_enum_identifier(rna_enum_event_value_items, event->val, &val_id); printf("wmEvent type:%d / %s, val:%d / %s,\n" " shift:%d, ctrl:%d, alt:%d, oskey:%d, keymodifier:%d,\n" diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index 678d7b43518..f378a4cdfa3 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -904,12 +904,12 @@ static void wm_user_modal_keymap_set_items(wmWindowManager *wm, wmKeyMap *km) const char *WM_key_event_string(const short type, const bool compact) { EnumPropertyItem *it; - const int i = RNA_enum_from_value(event_type_items, (int)type); + const int i = RNA_enum_from_value(rna_enum_event_type_items, (int)type); if (i == -1) { return ""; } - it = &event_type_items[i]; + it = &rna_enum_event_type_items[i]; /* We first try enum items' description (abused as shortname here), and fall back to usual name if empty. */ if (compact && it->description[0]) { diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index eabc8614c80..3734b5ab530 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1285,7 +1285,7 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, prop = RNA_def_enum(ot->srna, "display_type", file_display_items, display, "Display Type", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "sort_method", file_sort_items, sort, "File sorting mode", ""); + prop = RNA_def_enum(ot->srna, "sort_method", rna_enum_file_sort_items, sort, "File sorting mode", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } @@ -5233,11 +5233,11 @@ static void WM_OT_stereo3d_set(wmOperatorType *ot) ot->check = wm_stereo3d_set_check; ot->cancel = wm_stereo3d_set_cancel; - prop = RNA_def_enum(ot->srna, "display_mode", stereo3d_display_items, S3D_DISPLAY_ANAGLYPH, "Display Mode", ""); + prop = RNA_def_enum(ot->srna, "display_mode", rna_enum_stereo3d_display_items, S3D_DISPLAY_ANAGLYPH, "Display Mode", ""); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "anaglyph_type", stereo3d_anaglyph_type_items, S3D_ANAGLYPH_REDCYAN, "Anaglyph Type", ""); + prop = RNA_def_enum(ot->srna, "anaglyph_type", rna_enum_stereo3d_anaglyph_type_items, S3D_ANAGLYPH_REDCYAN, "Anaglyph Type", ""); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - prop = RNA_def_enum(ot->srna, "interlace_type", stereo3d_interlace_type_items, S3D_INTERLACE_ROW, "Interlace Type", ""); + prop = RNA_def_enum(ot->srna, "interlace_type", rna_enum_stereo3d_interlace_type_items, S3D_INTERLACE_ROW, "Interlace Type", ""); RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean(ot->srna, "use_interlace_swap", false, "Swap Left/Right", "Swap left and right stereo channels"); -- cgit v1.2.3