[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60467] trunk/blender/source/blender/ editors/transform/transform_conversions.c: fix [#36900] single spline handle can't be "scaled"
Campbell Barton
ideasman42 at gmail.com
Tue Oct 1 09:02:18 CEST 2013
Revision: 60467
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60467
Author: campbellbarton
Date: 2013-10-01 07:02:18 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
fix [#36900] single spline handle can't be "scaled"
this works in the graph editor but didn't for curves, useful functionality to have.
Modified Paths:
--------------
trunk/blender/source/blender/editors/transform/transform_conversions.c
Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_conversions.c 2013-10-01 05:39:41 UTC (rev 60466)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c 2013-10-01 07:02:18 UTC (rev 60467)
@@ -123,6 +123,17 @@
#include "transform.h"
#include "bmesh.h"
+/**
+ * Transforming around ourselves is no use, fallback to individual origins,
+ * useful for curve/armatures.
+ */
+static void transform_around_single_fallback(TransInfo *t)
+{
+ if (t->total == 1 && ELEM3(t->around, V3D_CENTER, V3D_CENTROID, V3D_ACTIVE)) {
+ t->around = V3D_LOCAL;
+ }
+}
+
/* when transforming islands */
struct TransIslandData {
float co[3];
@@ -1084,6 +1095,8 @@
if (!t->total) return;
+ transform_around_single_fallback(t);
+
copy_m3_m4(mtx, t->obedit->obmat);
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
@@ -1408,6 +1421,8 @@
else t->total = countsel;
t->data = MEM_callocN(t->total * sizeof(TransData), "TransObData(Curve EditMode)");
+ transform_around_single_fallback(t);
+
copy_m3_m4(mtx, t->obedit->obmat);
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
More information about the Bf-blender-cvs
mailing list