Fix #93078: users choice was overridden by former constraint

Ensure 'constraint_axis' is unset in the Rotate operator when user
sets 'orient_axis' via the operator panel. This prevents unintended
overrides and aligns with expected behavior.

Change is limited to avoid affecting Shear, Rotate Normals, and
Transform, though Rotate Normals may benefit from similar handling due
to overlapping axis properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/114779
This commit is contained in:
Laurynas Duburas
2025-06-26 22:20:57 +02:00
committed by Germano Cavalcante
parent 86d6855ee8
commit c30e6a37b0

View File

@@ -973,6 +973,11 @@ static void TRANSFORM_OT_trackball(wmOperatorType *ot)
properties_register(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT | P_CENTER);
}
static void transform_set_orient_axis(Main * /*main*/, Scene * /*scene*/, PointerRNA *ptr)
{
RNA_struct_property_unset(ptr, "constraint_axis");
}
static void TRANSFORM_OT_rotate(wmOperatorType *ot)
{
/* Identifiers. */
@@ -997,6 +1002,10 @@ static void TRANSFORM_OT_rotate(wmOperatorType *ot)
properties_register(ot,
P_ORIENT_AXIS | P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR |
P_GEO_SNAP | P_GPENCIL_EDIT | P_CENTER);
if (PropertyRNA *prop = RNA_struct_type_find_property(ot->srna, "orient_axis")) {
RNA_def_property_update_runtime(prop, transform_set_orient_axis);
}
}
static bool tilt_poll(bContext *C)