[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46595] trunk/blender/source/blender/ editors/transform: code cleanup: use static functions for transform operators

Campbell Barton ideasman42 at gmail.com
Sun May 13 01:18:15 CEST 2012


Revision: 46595
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46595
Author:   campbellbarton
Date:     2012-05-12 23:18:14 +0000 (Sat, 12 May 2012)
Log Message:
-----------
code cleanup: use static functions for transform operators

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform.h
    trunk/blender/source/blender/editors/transform/transform_ops.c

Modified: trunk/blender/source/blender/editors/transform/transform.h
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.h	2012-05-12 23:07:52 UTC (rev 46594)
+++ trunk/blender/source/blender/editors/transform/transform.h	2012-05-12 23:18:14 UTC (rev 46595)
@@ -435,8 +435,6 @@
 #define POINT_INIT		4
 #define MULTI_POINTS	8
 
-void TRANSFORM_OT_transform(struct wmOperatorType *ot);
-
 int initTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op, struct wmEvent *event, int mode);
 void saveTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op);
 int  transformEvent(TransInfo *t, struct wmEvent *event);

Modified: trunk/blender/source/blender/editors/transform/transform_ops.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_ops.c	2012-05-12 23:07:52 UTC (rev 46594)
+++ trunk/blender/source/blender/editors/transform/transform_ops.c	2012-05-12 23:18:14 UTC (rev 46595)
@@ -75,21 +75,21 @@
 static char OP_EDGE_BWEIGHT[] = "TRANSFORM_OT_edge_bevelweight";
 static char OP_SEQ_SLIDE[] = "TRANSFORM_OT_seq_slide";
 
-void TRANSFORM_OT_translate(struct wmOperatorType *ot);
-void TRANSFORM_OT_rotate(struct wmOperatorType *ot);
-void TRANSFORM_OT_tosphere(struct wmOperatorType *ot);
-void TRANSFORM_OT_resize(struct wmOperatorType *ot);
-void TRANSFORM_OT_shear(struct wmOperatorType *ot);
-void TRANSFORM_OT_warp(struct wmOperatorType *ot);
-void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot);
-void TRANSFORM_OT_push_pull(struct wmOperatorType *ot);
-void TRANSFORM_OT_tilt(struct wmOperatorType *ot);
-void TRANSFORM_OT_trackball(struct wmOperatorType *ot);
-void TRANSFORM_OT_mirror(struct wmOperatorType *ot);
-void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot);
-void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot);
-void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot);
-void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot);
+static void TRANSFORM_OT_translate(struct wmOperatorType *ot);
+static void TRANSFORM_OT_rotate(struct wmOperatorType *ot);
+static void TRANSFORM_OT_tosphere(struct wmOperatorType *ot);
+static void TRANSFORM_OT_resize(struct wmOperatorType *ot);
+static void TRANSFORM_OT_shear(struct wmOperatorType *ot);
+static void TRANSFORM_OT_warp(struct wmOperatorType *ot);
+static void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot);
+static void TRANSFORM_OT_push_pull(struct wmOperatorType *ot);
+static void TRANSFORM_OT_tilt(struct wmOperatorType *ot);
+static void TRANSFORM_OT_trackball(struct wmOperatorType *ot);
+static void TRANSFORM_OT_mirror(struct wmOperatorType *ot);
+static void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot);
+static void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot);
+static void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot);
+static void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot);
 
 static TransformModeItem transform_modes[] =
 {
@@ -502,7 +502,7 @@
 	//RNA_def_property_flag(prop, PROP_HIDDEN);
 }
 
-void TRANSFORM_OT_translate(struct wmOperatorType *ot)
+static void TRANSFORM_OT_translate(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Translate";
@@ -522,7 +522,7 @@
 	Transform_Properties(ot, P_CONSTRAINT|P_PROPORTIONAL|P_MIRROR|P_ALIGN_SNAP|P_OPTIONS);
 }
 
-void TRANSFORM_OT_resize(struct wmOperatorType *ot)
+static void TRANSFORM_OT_resize(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Resize";
@@ -543,7 +543,7 @@
 }
 
 
-void TRANSFORM_OT_trackball(struct wmOperatorType *ot)
+static void TRANSFORM_OT_trackball(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Trackball";
@@ -563,7 +563,7 @@
 	Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP);
 }
 
-void TRANSFORM_OT_rotate(struct wmOperatorType *ot)
+static void TRANSFORM_OT_rotate(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Rotate";
@@ -583,7 +583,7 @@
 	Transform_Properties(ot, P_AXIS|P_CONSTRAINT|P_PROPORTIONAL|P_MIRROR|P_GEO_SNAP);
 }
 
-void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
+static void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Tilt";
@@ -606,7 +606,7 @@
 	Transform_Properties(ot, P_CONSTRAINT|P_PROPORTIONAL|P_MIRROR|P_SNAP);
 }
 
-void TRANSFORM_OT_warp(struct wmOperatorType *ot)
+static void TRANSFORM_OT_warp(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Warp";
@@ -627,7 +627,7 @@
 	// XXX Warp axis?
 }
 
-void TRANSFORM_OT_shear(struct wmOperatorType *ot)
+static void TRANSFORM_OT_shear(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Shear";
@@ -648,7 +648,7 @@
 	// XXX Shear axis?
 }
 
-void TRANSFORM_OT_push_pull(struct wmOperatorType *ot)
+static void TRANSFORM_OT_push_pull(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Push/Pull";
@@ -668,7 +668,7 @@
 	Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP);
 }
 
-void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot)
+static void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Shrink/Fatten";
@@ -688,7 +688,7 @@
 	Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP);
 }
 
-void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)
+static void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "To Sphere";
@@ -709,7 +709,7 @@
 	Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP);
 }
 
-void TRANSFORM_OT_mirror(struct wmOperatorType *ot)
+static void TRANSFORM_OT_mirror(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Mirror";
@@ -727,7 +727,7 @@
 	Transform_Properties(ot, P_CONSTRAINT|P_PROPORTIONAL);
 }
 
-void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot)
+static void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Edge Slide";
@@ -747,7 +747,7 @@
 	Transform_Properties(ot, P_MIRROR|P_SNAP|P_CORRECT_UV);
 }
 
-void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot)
+static void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Edge Crease";
@@ -767,7 +767,7 @@
 	Transform_Properties(ot, P_SNAP);
 }
 
-void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot)
+static void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Edge Bevel Weight";
@@ -787,7 +787,7 @@
 	Transform_Properties(ot, P_SNAP);
 }
 
-void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot)
+static void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name   = "Sequence Slide";
@@ -807,7 +807,7 @@
 	Transform_Properties(ot, P_SNAP);
 }
 
-void TRANSFORM_OT_transform(struct wmOperatorType *ot)
+static void TRANSFORM_OT_transform(struct wmOperatorType *ot)
 {
 	PropertyRNA *prop;
 




More information about the Bf-blender-cvs mailing list