[Bf-blender-cvs] [676d790] master: Cleanup: use `rna_enum_` prefix for RNA enums

Campbell Barton noreply at git.blender.org
Mon Nov 23 07:51:46 CET 2015


Commit: 676d790d29ead413a9619aa94005c5248d274cb2
Author: Campbell Barton
Date:   Mon Nov 23 13:49:52 2015 +1100
Branches: master
https://developer.blender.org/rB676d790d29ead413a9619aa94005c5248d274cb2

Cleanup: use `rna_enum_` prefix for RNA enums

Definitions could shadow local vars.

===================================================================

M	source/blender/blenkernel/intern/boids.c
M	source/blender/compositor/operations/COM_BlurBaseOperation.cpp
M	source/blender/editors/animation/keyframes_general.c
M	source/blender/editors/armature/armature_add.c
M	source/blender/editors/armature/pose_edit.c
M	source/blender/editors/curve/editcurve.c
M	source/blender/editors/interface/interface_icons.c
M	source/blender/editors/mesh/editmesh_loopcut.c
M	source/blender/editors/mesh/editmesh_select.c
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/object/object_add.c
M	source/blender/editors/object/object_bake_api.c
M	source/blender/editors/object/object_constraint.c
M	source/blender/editors/object/object_data_transfer.c
M	source/blender/editors/object/object_edit.c
M	source/blender/editors/object/object_lattice.c
M	source/blender/editors/object/object_modifier.c
M	source/blender/editors/object/object_select.c
M	source/blender/editors/physics/dynamicpaint_ops.c
M	source/blender/editors/physics/particle_boids.c
M	source/blender/editors/physics/rigidbody_constraint.c
M	source/blender/editors/physics/rigidbody_object.c
M	source/blender/editors/render/render_shading.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/sculpt_paint/paint_ops.c
M	source/blender/editors/sound/sound_ops.c
M	source/blender/editors/space_action/action_edit.c
M	source/blender/editors/space_clip/clip_ops.c
M	source/blender/editors/space_graph/graph_edit.c
M	source/blender/editors/space_image/image_ops.c
M	source/blender/editors/space_logic/logic_ops.c
M	source/blender/editors/space_nla/nla_edit.c
M	source/blender/editors/space_node/node_edit.c
M	source/blender/editors/space_sequencer/sequencer_edit.c
M	source/blender/editors/space_sequencer/sequencer_modifier.c
M	source/blender/editors/space_view3d/view3d_header.c
M	source/blender/editors/transform/transform_ops.c
M	source/blender/makesdna/DNA_windowmanager_types.h
M	source/blender/makesrna/RNA_enum_types.h
M	source/blender/makesrna/intern/rna_ID.c
M	source/blender/makesrna/intern/rna_action.c
M	source/blender/makesrna/intern/rna_animation.c
M	source/blender/makesrna/intern/rna_animviz.c
M	source/blender/makesrna/intern/rna_boid.c
M	source/blender/makesrna/intern/rna_brush.c
M	source/blender/makesrna/intern/rna_constraint.c
M	source/blender/makesrna/intern/rna_controller.c
M	source/blender/makesrna/intern/rna_curve.c
M	source/blender/makesrna/intern/rna_dynamicpaint.c
M	source/blender/makesrna/intern/rna_fcurve.c
M	source/blender/makesrna/intern/rna_image.c
M	source/blender/makesrna/intern/rna_image_api.c
M	source/blender/makesrna/intern/rna_key.c
M	source/blender/makesrna/intern/rna_lamp.c
M	source/blender/makesrna/intern/rna_lattice.c
M	source/blender/makesrna/intern/rna_linestyle.c
M	source/blender/makesrna/intern/rna_main_api.c
M	source/blender/makesrna/intern/rna_mask.c
M	source/blender/makesrna/intern/rna_material.c
M	source/blender/makesrna/intern/rna_mesh.c
M	source/blender/makesrna/intern/rna_meta.c
M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/makesrna/intern/rna_nla.c
M	source/blender/makesrna/intern/rna_nodetree.c
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/makesrna/intern/rna_object_force.c
M	source/blender/makesrna/intern/rna_packedfile.c
M	source/blender/makesrna/intern/rna_particle.c
M	source/blender/makesrna/intern/rna_pose.c
M	source/blender/makesrna/intern/rna_property.c
M	source/blender/makesrna/intern/rna_render.c
M	source/blender/makesrna/intern/rna_rigidbody.c
M	source/blender/makesrna/intern/rna_rna.c
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/makesrna/intern/rna_screen.c
M	source/blender/makesrna/intern/rna_sculpt_paint.c
M	source/blender/makesrna/intern/rna_sensor.c
M	source/blender/makesrna/intern/rna_sequencer.c
M	source/blender/makesrna/intern/rna_sound_api.c
M	source/blender/makesrna/intern/rna_space.c
M	source/blender/makesrna/intern/rna_texture.c
M	source/blender/makesrna/intern/rna_ui.c
M	source/blender/makesrna/intern/rna_ui_api.c
M	source/blender/makesrna/intern/rna_userdef.c
M	source/blender/makesrna/intern/rna_vfont_api.c
M	source/blender/makesrna/intern/rna_wm.c
M	source/blender/makesrna/intern/rna_wm_api.c
M	source/blender/nodes/intern/node_util.c
M	source/blender/python/intern/bpy_operator.c
M	source/blender/python/intern/bpy_props.c
M	source/blender/python/intern/bpy_rna.c
M	source/blender/python/intern/bpy_rna_anim.c
M	source/blender/python/intern/bpy_rna_callback.c
M	source/blender/windowmanager/intern/wm_event_system.c
M	source/blender/windowmanager/intern/wm_keymap.c
M	source/blender/windowmanager/intern/wm_operators.c

===================================================================

diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index 64b9bf4..7ce61ec 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 ce42de7..dc5f80e 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 f0d9c48..be58c75 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 59453f0..1d9059f 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 e87c324..0260b60 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 367467b..e2cf0c1 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 796a764..ed1137f 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 593e27f..7236b41 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 09b146f..f2cbef6 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 2d9de6d..a0017f9 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

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list