[Bf-blender-cvs] [6885d31] master: Fix T44474: Rotation manipulator not hidden completely with all axes locked

Julian Eisel noreply at git.blender.org
Tue Apr 21 21:56:21 CEST 2015


Commit: 6885d316b1b4e275f055fc2adea9a21a03cbc260
Author: Julian Eisel
Date:   Tue Apr 21 21:55:10 2015 +0200
Branches: master
https://developer.blender.org/rB6885d316b1b4e275f055fc2adea9a21a03cbc260

Fix T44474: Rotation manipulator not hidden completely with all axes
locked

Really doesn't look like a bug on a first glance but the line of code
that was there previously seemed to be there to prevent the manipulator
from drawing in this case.

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

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 fc8e6cd..ae8cbc7 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -895,6 +895,11 @@ static void postOrtho(const bool ortho)
 	}
 }
 
+BLI_INLINE bool manipulator_rotate_is_visible(const int drawflags)
+{
+	return (drawflags & (MAN_ROT_X | MAN_ROT_Y | MAN_ROT_Z));
+}
+
 static void draw_manipulator_rotate(
         View3D *v3d, RegionView3D *rv3d, const int drawflags, const int combo,
         const bool is_moving, const bool is_picksel)
@@ -908,8 +913,8 @@ static void draw_manipulator_rotate(
 	const int colcode = (is_moving) ? MAN_MOVECOL : MAN_RGB;
 	bool ortho;
 
-	/* when called while moving in mixed mode, do not draw when... */
-	if ((drawflags & MAN_ROT_C) == 0) return;
+	/* skip drawing if all axes are locked */
+	if (manipulator_rotate_is_visible(drawflags) == false) return;
 
 	/* Init stuff */
 	glDisable(GL_DEPTH_TEST);
@@ -1448,8 +1453,8 @@ static void draw_manipulator_rotate_cyl(
 	int axis_order[3] = {2, 0, 1};
 	int i;
 
-	/* when called while moving in mixed mode, do not draw when... */
-	if ((drawflags & MAN_ROT_C) == 0) return;
+	/* skip drawing if all axes are locked */
+	if (manipulator_rotate_is_visible(drawflags) == false) return;
 
 	manipulator_axis_order(rv3d, axis_order);




More information about the Bf-blender-cvs mailing list