[Bf-blender-cvs] [5f7d5c08091] blender-v3.0-release: Gizmo: adjust when gizmo protection flags are displayed
Campbell Barton
noreply at git.blender.org
Fri Nov 12 14:30:58 CET 2021
Commit: 5f7d5c0809104bf702dff4be1b706c6841095fda
Author: Campbell Barton
Date: Sat Nov 13 00:28:13 2021 +1100
Branches: blender-v3.0-release
https://developer.blender.org/rB5f7d5c0809104bf702dff4be1b706c6841095fda
Gizmo: adjust when gizmo protection flags are displayed
Restore behavior reverted in
0ea60cf6b813f8b792a253e10a6c2edaf7fb689f but only for location
as it makes sense to use protection flags in global mode in that case.
===================================================================
M source/blender/editors/transform/transform_gizmo_3d.c
===================================================================
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index d3aaae7253e..6a2353d403f 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -1062,9 +1062,13 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
}
}
- /* Protect-flags apply to world space in object mode, so only let them influence axis
- * visibility if we show the global orientation, otherwise it's confusing. */
- if (ELEM(orient_index, V3D_ORIENT_LOCAL, V3D_ORIENT_GIMBAL)) {
+ if (orient_index == V3D_ORIENT_GLOBAL) {
+ /* Protect-flags apply to world space in object mode,
+ * so only let them influence axis visibility if we show the global orientation,
+ * otherwise it's confusing. */
+ protectflag_to_drawflags(base->object->protectflag & OB_LOCK_LOC, &rv3d->twdrawflag);
+ }
+ else if (ELEM(orient_index, V3D_ORIENT_LOCAL, V3D_ORIENT_GIMBAL)) {
protectflag_to_drawflags(base->object->protectflag, &rv3d->twdrawflag);
}
totsel++;
More information about the Bf-blender-cvs
mailing list