[Bf-blender-cvs] [6849d42] soc-2013-paint: Force curve pivot to be around center always (this will fall back to local for 1 selection leading to nice point rotation/scaling otherwise)

Antony Riakiotakis noreply at git.blender.org
Sat May 10 17:57:04 CEST 2014


Commit: 6849d42a8bc78ef96279847c7d7be05d7724c89c
Author: Antony Riakiotakis
Date:   Sat May 10 18:56:37 2014 +0300
https://developer.blender.org/rB6849d42a8bc78ef96279847c7d7be05d7724c89c

Force curve pivot to be around center always (this will fall back to
local for 1 selection leading to nice point rotation/scaling otherwise)

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

M	source/blender/editors/transform/transform_generics.c

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

diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 73fbeb3..3890802 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1206,8 +1206,10 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
 
 		if (ob && ob->mode & OB_MODE_ALL_PAINT) {
 			Paint *p = BKE_paint_get_active_from_context(C);
-			if (p && p->brush && (p->brush->flag & BRUSH_CURVE))
+			if (p && p->brush && (p->brush->flag & BRUSH_CURVE)) {
 				t->options |= CTX_PAINT_CURVE;
+				t->around = V3D_CENTER;
+			}
 		}
 
 		/* initialize UV transform from */
@@ -1240,6 +1242,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
 		}
 		else if (sima->mode == SI_MODE_PAINT){
 			t->options |= CTX_PAINT_CURVE;
+			t->around = V3D_CENTER;
 			/* image not in uv edit, nor in mask mode, can happen for some tools */
 		}
 	}




More information about the Bf-blender-cvs mailing list