[Bf-blender-cvs] [9ab67fd31bc] blender2.8: Hide transform widget when tool widget is used
Campbell Barton
noreply at git.blender.org
Fri Oct 27 06:54:58 CEST 2017
Commit: 9ab67fd31bc5b84034deddd6487343d45c2ba1d7
Author: Campbell Barton
Date: Fri Oct 27 15:54:17 2017 +1100
Branches: blender2.8
https://developer.blender.org/rB9ab67fd31bc5b84034deddd6487343d45c2ba1d7
Hide transform widget when tool widget is used
===================================================================
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 1fa62556bd5..d1f17ac7cb2 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -1441,8 +1441,16 @@ static bool WIDGETGROUP_manipulator_poll(const struct bContext *C, struct wmMani
const ScrArea *sa = CTX_wm_area(C);
const View3D *v3d = sa->spacedata.first;
- return (((v3d->twflag & V3D_MANIPULATOR_DRAW) != 0) &&
- ((v3d->twtype & (V3D_MANIP_TRANSLATE | V3D_MANIP_ROTATE | V3D_MANIP_SCALE)) != 0));
+ if (((v3d->twflag & V3D_MANIPULATOR_DRAW) != 0) &&
+ ((v3d->twtype & (V3D_MANIP_TRANSLATE | V3D_MANIP_ROTATE | V3D_MANIP_SCALE)) != 0))
+ {
+ /* Don't show when tools have a manipulator. */
+ WorkSpace *workspace = CTX_wm_workspace(C);
+ if (workspace->tool.manipulator_group[0] == '\0') {
+ return true;
+ }
+ }
+ return false;
}
void TRANSFORM_WGT_manipulator(wmManipulatorGroupType *wgt)
More information about the Bf-blender-cvs
mailing list