[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54487] trunk/blender/source/blender/ windowmanager/intern/wm_operators.c: fix for own commit r54482, PROP_DISTANCE was being checked for by radial control operator.

Campbell Barton ideasman42 at gmail.com
Tue Feb 12 11:33:04 CET 2013


Revision: 54487
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54487
Author:   campbellbarton
Date:     2013-02-12 10:33:04 +0000 (Tue, 12 Feb 2013)
Log Message:
-----------
fix for own commit r54482, PROP_DISTANCE was being checked for by radial control operator. now allow PROP_NONE and treat it as a distance.

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54482

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2013-02-12 10:07:37 UTC (rev 54486)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2013-02-12 10:33:04 UTC (rev 54487)
@@ -3261,6 +3261,7 @@
 	rc->initial_mouse[1] = event->y;
 
 	switch (rc->subtype) {
+		case PROP_NONE:
 		case PROP_DISTANCE:
 			d[0] = rc->initial_value;
 			break;
@@ -3360,6 +3361,7 @@
 	float zoom[2], col[3] = {1, 1, 1};
 
 	switch (rc->subtype) {
+		case PROP_NONE:
 		case PROP_DISTANCE:
 			r1 = rc->current_value;
 			r2 = rc->initial_value;
@@ -3598,8 +3600,8 @@
 
 	/* get subtype of property */
 	rc->subtype = RNA_property_subtype(rc->prop);
-	if (!ELEM3(rc->subtype, PROP_DISTANCE, PROP_FACTOR, PROP_ANGLE)) {
-		BKE_report(op->reports, RPT_ERROR, "Property must be a distance, a factor, or an angle");
+	if (!ELEM4(rc->subtype, PROP_NONE, PROP_DISTANCE, PROP_FACTOR, PROP_ANGLE)) {
+		BKE_report(op->reports, RPT_ERROR, "Property must be a none, distance, a factor, or an angle");
 		MEM_freeN(rc);
 		return OPERATOR_CANCELLED;
 	}
@@ -3683,6 +3685,7 @@
 
 			/* calculate new value and apply snapping  */
 			switch (rc->subtype) {
+				case PROP_NONE:
 				case PROP_DISTANCE:
 					new_value = dist;
 					if (snap) new_value = ((int)new_value + 5) / 10 * 10;




More information about the Bf-blender-cvs mailing list