Commit: 5eb5a7f4b7d7c5228ec9596b35e7f2e317aad97d
Author: Germano Cavalcante
Date:   Wed Feb 3 14:48:08 2021 -0300
Branches: blender-v2.92-release
https://developer.blender.org/rB5eb5a7f4b7d7c5228ec9596b35e7f2e317aad97d

Fix unreported: Rotation Gizmo "C" influenced by custom orientation

The white rotation Gizmo should always use the View orientation.

Before, if you set an orientation for the gizmo other than the default,
that gizmo would behave like the contraint Z Gizmo.

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

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 166fded5209..be29c1cda02 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -1865,7 +1865,10 @@ static void WIDGETGROUP_gizmo_invoke_prepare(const 
bContext *C,
     PropertyRNA *prop_orient_type = RNA_struct_find_property(ptr, 
"orient_type");
     const TransformOrientationSlot *orient_slot = 
BKE_scene_orientation_slot_get_from_flag(
         scene, ggd->twtype_init);
-    if (orient_slot == &scene->orientation_slots[SCE_ORIENT_DEFAULT]) {
+    if ((gz == ggd->gizmos[MAN_AXIS_ROT_C]) ||
+        (orient_slot == &scene->orientation_slots[SCE_ORIENT_DEFAULT])) {
+      /* #MAN_AXIS_ROT_C always uses the #V3D_ORIENT_VIEW orientation,
+       * optionally we could set this orientation instead of unset the 
property. */
       RNA_property_unset(ptr, prop_orient_type);
     }
     else {

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

Reply via email to