Commit: c301dc445a78e01518bc07c10e8a7c35c481023d
Author: Campbell Barton
Date:   Thu Apr 6 12:47:00 2017 +1000
Branches: custom-manipulators
https://developer.blender.org/rBc301dc445a78e01518bc07c10e8a7c35c481023d

Use obmat for manipulator center instead of 'loc'

Would show wrong location with parenting.

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

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

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

diff --git a/source/blender/editors/transform/transform_manipulator.c 
b/source/blender/editors/transform/transform_manipulator.c
index 6931b60cfb6..8273a4eae84 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -478,13 +478,13 @@ static void protectflag_to_drawflags(short protectflag, 
short *drawflags)
 }
 
 /* for pose mode */
-static void protectflag_to_drawflags_pchan(RegionView3D *rv3d, bPoseChannel 
*pchan)
+static void protectflag_to_drawflags_pchan(RegionView3D *rv3d, const 
bPoseChannel *pchan)
 {
        protectflag_to_drawflags(pchan->protectflag, &rv3d->twdrawflag);
 }
 
 /* for editmode*/
-static void protectflag_to_drawflags_ebone(RegionView3D *rv3d, EditBone *ebo)
+static void protectflag_to_drawflags_ebone(RegionView3D *rv3d, const EditBone 
*ebo)
 {
        if (ebo->flag & BONE_EDITMODE_LOCKED) {
                protectflag_to_drawflags(OB_LOCK_LOC | OB_LOCK_ROT | 
OB_LOCK_SCALE, &rv3d->twdrawflag);
@@ -523,7 +523,7 @@ static void axis_angle_to_gimbal_axis(float gmat[3][3], 
const float axis[3], con
 }
 
 
-static int test_rotmode_euler(short rotmode)
+static bool test_rotmode_euler(short rotmode)
 {
        return (ELEM(rotmode, ROT_MODE_AXISANGLE, ROT_MODE_QUAT)) ? 0 : 1;
 }
@@ -927,8 +927,7 @@ static int calc_manipulator_stats(const bContext *C)
                        if (TESTBASELIB_NEW(base)) {
                                if (ob == NULL)
                                        ob = base->object;
-
-                               calc_tw_center(scene, base->object->loc);
+                               calc_tw_center(scene, base->object->obmat[3]);
                                totsel++;
                        }
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to