Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-02-27 09:25:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-27 09:30:51 +0300
commit80ef7fbeb15f388097e2f778d41f7280e77779cf (patch)
treec9667f120a4c63c3da795214de60b83a02b6c98d
parent3f23b5ffd5935b260c79dcf58781d976be814044 (diff)
Transform: refactor orientation naming and usasge
Transform orientation was previously related to constraints, recent changes meant it was used even when not constraining to an axis. Now transform orientation is separate from axis constraints.
-rw-r--r--release/scripts/startup/bl_operators/view3d.py6
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py12
-rw-r--r--source/blender/editors/include/ED_transform.h1
-rw-r--r--source/blender/editors/transform/transform.c72
-rw-r--r--source/blender/editors/transform/transform_generics.c10
-rw-r--r--source/blender/editors/transform/transform_gizmo_3d.c8
-rw-r--r--source/blender/editors/transform/transform_gizmo_extrude_3d.c14
-rw-r--r--source/blender/editors/transform/transform_ops.c43
8 files changed, 89 insertions, 77 deletions
diff --git a/release/scripts/startup/bl_operators/view3d.py b/release/scripts/startup/bl_operators/view3d.py
index 5ae112e57e4..2dd4b7457ed 100644
--- a/release/scripts/startup/bl_operators/view3d.py
+++ b/release/scripts/startup/bl_operators/view3d.py
@@ -45,7 +45,7 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator):
bpy.ops.mesh.extrude_region_move(
'INVOKE_REGION_WIN',
TRANSFORM_OT_translate={
- "constraint_orientation": 'NORMAL',
+ "orient_type": 'NORMAL',
"constraint_axis": (False, False, True),
}
)
@@ -92,7 +92,7 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
bpy.ops.mesh.extrude_region_move(
'INVOKE_REGION_WIN',
TRANSFORM_OT_translate={
- "constraint_orientation": 'NORMAL',
+ "orient_type": 'NORMAL',
"constraint_axis": (False, False, True),
},
)
@@ -103,7 +103,7 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
TRANSFORM_OT_translate={
# Don't set the constraint axis since users will expect MMB
# to use the user setting, see: T61637
- # "constraint_orientation": 'NORMAL',
+ # "orient_type": 'NORMAL',
# Not a popular choice, too restrictive for retopo.
# "constraint_axis": (True, True, False)})
"constraint_axis": (False, False, False),
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 7a17cb864c6..d44f0943c30 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -507,26 +507,26 @@ class VIEW3D_MT_mirror(Menu):
props = layout.operator("transform.mirror", text="X Global")
props.constraint_axis = (True, False, False)
- props.constraint_orientation = 'GLOBAL'
+ props.orient_type = 'GLOBAL'
props = layout.operator("transform.mirror", text="Y Global")
props.constraint_axis = (False, True, False)
- props.constraint_orientation = 'GLOBAL'
+ props.orient_type = 'GLOBAL'
props = layout.operator("transform.mirror", text="Z Global")
props.constraint_axis = (False, False, True)
- props.constraint_orientation = 'GLOBAL'
+ props.orient_type = 'GLOBAL'
if context.edit_object:
layout.separator()
props = layout.operator("transform.mirror", text="X Local")
props.constraint_axis = (True, False, False)
- props.constraint_orientation = 'LOCAL'
+ props.orient_type = 'LOCAL'
props = layout.operator("transform.mirror", text="Y Local")
props.constraint_axis = (False, True, False)
- props.constraint_orientation = 'LOCAL'
+ props.orient_type = 'LOCAL'
props = layout.operator("transform.mirror", text="Z Local")
props.constraint_axis = (False, False, True)
- props.constraint_orientation = 'LOCAL'
+ props.orient_type = 'LOCAL'
layout.operator("object.vertex_group_mirror")
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 88e821091f5..1bd8782bb12 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -136,6 +136,7 @@ int BIF_countTransformOrientation(const struct bContext *C);
#define P_PROPORTIONAL (1 << 1)
#define P_ORIENT_AXIS (1 << 2)
#define P_ORIENT_AXIS_ORTHO (1 << 16)
+#define P_ORIENT_MATRIX (1 << 17)
#define P_SNAP (1 << 3)
#define P_GEO_SNAP (P_SNAP | (1 << 4))
#define P_ALIGN_SNAP (P_GEO_SNAP | (1 << 5))
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 34a6c64b90f..53c5fbddcdb 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -2055,7 +2055,6 @@ static void drawTransformPixel(const struct bContext *C, ARegion *ar, void *arg)
void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
{
ToolSettings *ts = CTX_data_tool_settings(C);
- bool constraint_axis[3] = {false, false, false};
int proportional = 0;
PropertyRNA *prop;
@@ -2137,7 +2136,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
if (t->spacetype == SPACE_VIEW3D) {
- if ((prop = RNA_struct_find_property(op->ptr, "constraint_orientation")) &&
+ if ((prop = RNA_struct_find_property(op->ptr, "orient_type")) &&
!RNA_property_is_set(op->ptr, prop) &&
(t->orientation.user != V3D_ORIENT_CUSTOM_MATRIX))
{
@@ -2156,6 +2155,20 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
RNA_float_set(op->ptr, "proportional_size", t->prop_size);
}
+ if ((prop = RNA_struct_find_property(op->ptr, "mirror"))) {
+ RNA_property_boolean_set(op->ptr, prop, (t->flag & T_NO_MIRROR) == 0);
+ }
+
+ short orientation = (t->con.mode & CON_APPLY) ? t->con.orientation : t->orientation.unset;
+ if (orientation == V3D_ORIENT_CUSTOM) {
+ const int orientation_index_custom = BKE_scene_transform_orientation_get_index(
+ t->scene, t->orientation.custom);
+ /* Maybe we need a t->con.custom_orientation?
+ * Seems like it would always match t->orientation.custom. */
+ orientation = V3D_ORIENT_CUSTOM + orientation_index_custom;
+ BLI_assert(orientation >= V3D_ORIENT_CUSTOM);
+ }
+
if ((prop = RNA_struct_find_property(op->ptr, "orient_axis"))) {
if (t->flag & T_MODAL) {
if (t->con.mode & CON_APPLY) {
@@ -2167,45 +2180,41 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
}
- if ((prop = RNA_struct_find_property(op->ptr, "mirror"))) {
- RNA_property_boolean_set(op->ptr, prop, (t->flag & T_NO_MIRROR) == 0);
- }
-
- if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis"))) {
- /* constraint orientation can be global, even if user selects something else
- * so use the orientation in the constraint if set */
- short orientation = (t->con.mode & CON_APPLY) ? t->con.orientation : t->orientation.unset;
-
- if (orientation == V3D_ORIENT_CUSTOM) {
- const int orientation_index_custom = BKE_scene_transform_orientation_get_index(
- t->scene, t->orientation.custom);
-
- /* Maybe we need a t->con.custom_orientation?
- * Seems like it would always match t->orientation.custom. */
- orientation = V3D_ORIENT_CUSTOM + orientation_index_custom;
- BLI_assert(orientation >= V3D_ORIENT_CUSTOM);
- }
-
- /* Use 'constraint_matrix' instead. */
- if (orientation != V3D_ORIENT_CUSTOM_MATRIX) {
- RNA_enum_set(op->ptr, "constraint_orientation", orientation);
- }
-
+ if ((prop = RNA_struct_find_property(op->ptr, "orient_matrix"))) {
if (t->flag & T_MODAL) {
if (orientation != V3D_ORIENT_CUSTOM_MATRIX) {
if (t->flag & T_MODAL) {
- RNA_enum_set(op->ptr, "constraint_matrix_orientation", orientation);
+ RNA_enum_set(op->ptr, "orient_matrix_type", orientation);
}
}
if (t->con.mode & CON_APPLY) {
- RNA_float_set_array(op->ptr, "constraint_matrix", &t->con.mtx[0][0]);
+ RNA_float_set_array(op->ptr, "orient_matrix", &t->con.mtx[0][0]);
}
else if (t->orient_matrix_is_set) {
- RNA_float_set_array(op->ptr, "constraint_matrix", &t->orient_matrix[0][0]);
+ RNA_float_set_array(op->ptr, "orient_matrix", &t->orient_matrix[0][0]);
}
else {
- RNA_float_set_array(op->ptr, "constraint_matrix", &t->spacemtx[0][0]);
+ RNA_float_set_array(op->ptr, "orient_matrix", &t->spacemtx[0][0]);
}
+ }
+ }
+
+
+ if ((prop = RNA_struct_find_property(op->ptr, "orient_type"))) {
+ /* constraint orientation can be global, even if user selects something else
+ * so use the orientation in the constraint if set */
+
+ /* Use 'orient_matrix' instead. */
+ if (orientation != V3D_ORIENT_CUSTOM_MATRIX) {
+ RNA_property_enum_set(op->ptr, prop, orientation);
+ }
+ }
+
+ if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis"))) {
+ bool constraint_axis[3] = {false, false, false};
+ if (t->flag & T_MODAL) {
+ /* Only set if needed, so we can hide in the UI when nothing is set.
+ * See 'transform_poll_property'. */
if (t->con.mode & CON_APPLY) {
if (t->con.mode & CON_AXIS0) {
constraint_axis[0] = true;
@@ -2217,9 +2226,6 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
constraint_axis[2] = true;
}
}
-
- /* Only set if needed, so we can hide in the UI when nothing is set.
- * See 'transform_poll_property'. */
if (ELEM(true, UNPACK3(constraint_axis))) {
RNA_property_boolean_set_array(op->ptr, prop, constraint_axis);
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 98031fd0ed4..fb52918de9b 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1518,13 +1518,13 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
t->around = V3D_AROUND_CENTER_BOUNDS;
}
- if (op && ((prop = RNA_struct_find_property(op->ptr, "constraint_matrix")) &&
+ if (op && ((prop = RNA_struct_find_property(op->ptr, "orient_matrix")) &&
RNA_property_is_set(op->ptr, prop)) &&
((t->flag & T_MODAL) ||
/* When using redo, don't use the the custom constraint matrix
* if the user selects a different orientation. */
- (RNA_enum_get(op->ptr, "constraint_orientation") ==
- RNA_enum_get(op->ptr, "constraint_matrix_orientation"))))
+ (RNA_enum_get(op->ptr, "orient_type") ==
+ RNA_enum_get(op->ptr, "orient_matrix_type"))))
{
RNA_property_float_get_array(op->ptr, prop, &t->spacemtx[0][0]);
/* Some transform modes use this to operate on an axis. */
@@ -1534,10 +1534,10 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
t->orientation.user = V3D_ORIENT_CUSTOM_MATRIX;
t->orientation.custom = 0;
if (t->flag & T_MODAL) {
- RNA_enum_set(op->ptr, "constraint_matrix_orientation", RNA_enum_get(op->ptr, "constraint_orientation"));
+ RNA_enum_set(op->ptr, "orient_matrix_type", RNA_enum_get(op->ptr, "orient_type"));
}
}
- else if (op && ((prop = RNA_struct_find_property(op->ptr, "constraint_orientation")) &&
+ else if (op && ((prop = RNA_struct_find_property(op->ptr, "orient_type")) &&
RNA_property_is_set(op->ptr, prop)))
{
short orientation = RNA_property_enum_get(op->ptr, prop);
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index 8b50377fb2c..1839b08f6a1 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -1817,15 +1817,15 @@ static void WIDGETGROUP_gizmo_invoke_prepare(
Scene *scene = CTX_data_scene(C);
wmGizmoOpElem *gzop = WM_gizmo_operator_get(gz, 0);
PointerRNA *ptr = &gzop->ptr;
- PropertyRNA *prop_constraint_orientation = RNA_struct_find_property(ptr, "constraint_orientation");
+ PropertyRNA *prop_orient_type = RNA_struct_find_property(ptr, "orient_type");
const TransformOrientationSlot *orient_slot = BKE_scene_orientation_slot_get(scene, ggd->twtype_init);
if (orient_slot == &scene->orientation_slots[SCE_ORIENT_DEFAULT]) {
- RNA_property_unset(ptr, prop_constraint_orientation);
+ RNA_property_unset(ptr, prop_orient_type);
}
else {
/* TODO: APIfunction */
int index = BKE_scene_orientation_slot_get_index(orient_slot);
- RNA_property_enum_set(ptr, prop_constraint_orientation, index);
+ RNA_property_enum_set(ptr, prop_orient_type, index);
}
}
@@ -2214,7 +2214,7 @@ static void WIDGETGROUP_xform_shear_refresh(const bContext *C, wmGizmoGroup *gzg
cross_v3_v3v3(orient_matrix[0], tbounds.axis[i_ortho_a], axis);
copy_v3_v3(orient_matrix[1], tbounds.axis[i_ortho_a]);
copy_v3_v3(orient_matrix[2], axis);
- RNA_float_set_array(&gzop->ptr, "constraint_matrix", &orient_matrix[0][0]);
+ RNA_float_set_array(&gzop->ptr, "orient_matrix", &orient_matrix[0][0]);
mul_v3_fl(gz->matrix_basis[0], 0.5f);
mul_v3_fl(gz->matrix_basis[1], 6.0f);
}
diff --git a/source/blender/editors/transform/transform_gizmo_extrude_3d.c b/source/blender/editors/transform/transform_gizmo_extrude_3d.c
index f6d1b91c284..b1ea7b87efb 100644
--- a/source/blender/editors/transform/transform_gizmo_extrude_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_extrude_3d.c
@@ -80,7 +80,7 @@ typedef struct GizmoExtrudeGroup {
/* Copied from the transform operator,
* use to redo with the same settings. */
struct {
- float constraint_matrix[3][3];
+ float orient_matrix[3][3];
bool constraint_axis[3];
float value[4];
} redo_xform;
@@ -282,7 +282,7 @@ static void gizmo_mesh_extrude_refresh(const bContext *C, wmGizmoGroup *gzgroup)
gz_adjust = ggd->adjust[1];
/* We can't access this from 'ot->last_properties'
* because some properties use skip-save. */
- RNA_float_get_array(op_xform->ptr, "constraint_matrix", &ggd->redo_xform.constraint_matrix[0][0]);
+ RNA_float_get_array(op_xform->ptr, "orient_matrix", &ggd->redo_xform.orient_matrix[0][0]);
RNA_boolean_get_array(op_xform->ptr, "constraint_axis", ggd->redo_xform.constraint_axis);
RNA_float_get_array(op_xform->ptr, "value", ggd->redo_xform.value);
@@ -311,7 +311,7 @@ static void gizmo_mesh_extrude_refresh(const bContext *C, wmGizmoGroup *gzgroup)
if (has_redo) {
if (gz_adjust == ggd->adjust[0]) {
- gizmo_mesh_extrude_orientation_matrix_set_for_adjust(ggd, ggd->redo_xform.constraint_matrix);
+ gizmo_mesh_extrude_orientation_matrix_set_for_adjust(ggd, ggd->redo_xform.orient_matrix);
if (adjust_is_flip) {
negate_v3(ggd->adjust[0]->matrix_basis[2]);
}
@@ -390,8 +390,8 @@ static void gizmo_mesh_extrude_invoke_prepare(const bContext *UNUSED(C), wmGizmo
PointerRNA macroptr = RNA_pointer_get(&gzop->ptr, "TRANSFORM_OT_translate");
if (gz == ggd->adjust[0]) {
RNA_boolean_set_array(&macroptr, "constraint_axis", ggd->redo_xform.constraint_axis);
- RNA_float_set_array(&macroptr, "constraint_matrix", &ggd->redo_xform.constraint_matrix[0][0]);
- RNA_enum_set(&macroptr, "constraint_orientation", V3D_ORIENT_NORMAL);
+ RNA_float_set_array(&macroptr, "orient_matrix", &ggd->redo_xform.orient_matrix[0][0]);
+ RNA_enum_set(&macroptr, "orient_type", V3D_ORIENT_NORMAL);
}
RNA_float_set_array(&macroptr, "value", ggd->redo_xform.value);
}
@@ -409,8 +409,8 @@ static void gizmo_mesh_extrude_invoke_prepare(const bContext *UNUSED(C), wmGizmo
if (use_normal_matrix) {
wmGizmoOpElem *gzop = WM_gizmo_operator_get(gz, 0);
PointerRNA macroptr = RNA_pointer_get(&gzop->ptr, "TRANSFORM_OT_translate");
- RNA_float_set_array(&macroptr, "constraint_matrix", &ggd->data.normal_mat3[0][0]);
- RNA_enum_set(&macroptr, "constraint_orientation", V3D_ORIENT_NORMAL);
+ RNA_float_set_array(&macroptr, "orient_matrix", &ggd->data.normal_mat3[0][0]);
+ RNA_enum_set(&macroptr, "orient_type", V3D_ORIENT_NORMAL);
}
}
}
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index ef2ecc25315..6a36f302405 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -515,7 +515,7 @@ static bool transform_poll_property(const bContext *UNUSED(C), wmOperator *op, c
/* Orientation/Constraints. */
{
/* Hide orientation axis if no constraints are set, since it wont be used. */
- PropertyRNA *prop_con = RNA_struct_find_property(op->ptr, "constraint_orientation");
+ PropertyRNA *prop_con = RNA_struct_find_property(op->ptr, "orient_type");
if (prop_con != NULL && (prop_con != prop)) {
if (STRPREFIX(prop_id, "constraint")) {
return false;
@@ -555,25 +555,26 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
RNA_def_property_enum_items(prop, rna_enum_axis_xyz_items);
}
- if (flags & P_CONSTRAINT) {
- RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
+ if (flags & P_ORIENT_MATRIX) {
+ prop = RNA_def_property(ot->srna, "orient_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation");
+ RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf);
- /* Set by 'constraint_orientation' or gizmo which acts on non-standard orientation. */
- prop = RNA_def_float_matrix(ot->srna, "constraint_matrix", 3, 3, NULL, 0.0f, 0.0f, "Matrix", "", 0.0f, 0.0f);
+ /* Set by 'orient_type' or gizmo which acts on non-standard orientation. */
+ prop = RNA_def_float_matrix(ot->srna, "orient_matrix", 3, 3, NULL, 0.0f, 0.0f, "Matrix", "", 0.0f, 0.0f);
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
- /* Only use 'constraint_matrix' when 'constraint_matrix_orientation == constraint_orientation',
+ /* Only use 'orient_matrix' when 'orient_matrix_type == orient_type',
* this allows us to reuse the orientation set by a gizmo for eg, without disabling the ability
* to switch over to other orientations. */
- prop = RNA_def_property(ot->srna, "constraint_matrix_orientation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(ot->srna, "orient_matrix_type", PROP_ENUM, PROP_NONE);
RNA_def_property_ui_text(prop, "Matrix Orientation", "");
RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf);
RNA_def_property_flag(prop, PROP_HIDDEN);
+ }
- prop = RNA_def_property(ot->srna, "constraint_orientation", PROP_ENUM, PROP_NONE);
- RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation");
- RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf);
-
+ if (flags & P_CONSTRAINT) {
+ RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
}
if (flags & P_MIRROR) {
@@ -674,7 +675,7 @@ static void TRANSFORM_OT_translate(struct wmOperatorType *ot)
Transform_Properties(
ot,
- P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_ALIGN_SNAP | P_OPTIONS |
+ P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_ALIGN_SNAP | P_OPTIONS |
P_GPENCIL_EDIT | P_CURSOR_EDIT);
}
@@ -699,7 +700,7 @@ static void TRANSFORM_OT_resize(struct wmOperatorType *ot)
WM_operatortype_props_advanced_begin(ot);
Transform_Properties(
- ot, P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_OPTIONS | P_GPENCIL_EDIT | P_CENTER);
+ ot, P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_OPTIONS | P_GPENCIL_EDIT | P_CENTER);
}
static bool skin_resize_poll(bContext *C)
@@ -732,7 +733,8 @@ static void TRANSFORM_OT_skin_resize(struct wmOperatorType *ot)
WM_operatortype_props_advanced_begin(ot);
- Transform_Properties(ot, P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_OPTIONS | P_NO_TEXSPACE);
+ Transform_Properties(
+ ot, P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_OPTIONS | P_NO_TEXSPACE);
}
static void TRANSFORM_OT_trackball(struct wmOperatorType *ot)
@@ -780,7 +782,7 @@ static void TRANSFORM_OT_rotate(struct wmOperatorType *ot)
WM_operatortype_props_advanced_begin(ot);
Transform_Properties(
- ot, P_ORIENT_AXIS | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_GPENCIL_EDIT | P_CENTER);
+ ot, P_ORIENT_AXIS | P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_GPENCIL_EDIT | P_CENTER);
}
static void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
@@ -853,7 +855,9 @@ static void TRANSFORM_OT_shear(struct wmOperatorType *ot)
WM_operatortype_props_advanced_begin(ot);
- Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT | P_ORIENT_AXIS | P_ORIENT_AXIS_ORTHO);
+ Transform_Properties(
+ ot, P_ORIENT_AXIS | P_ORIENT_AXIS_ORTHO | P_ORIENT_MATRIX | P_PROPORTIONAL | P_MIRROR |
+ P_SNAP | P_GPENCIL_EDIT);
}
static void TRANSFORM_OT_push_pull(struct wmOperatorType *ot)
@@ -944,7 +948,7 @@ static void TRANSFORM_OT_mirror(struct wmOperatorType *ot)
ot->poll = ED_operator_screenactive;
ot->poll_property = transform_poll_property;
- Transform_Properties(ot, P_CONSTRAINT | P_PROPORTIONAL | P_GPENCIL_EDIT | P_CENTER);
+ Transform_Properties(ot, P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_GPENCIL_EDIT | P_CENTER);
}
static void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot)
@@ -1096,7 +1100,7 @@ static void TRANSFORM_OT_rotate_normal(struct wmOperatorType *ot)
RNA_def_float_rotation(ot->srna, "value", 0, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI * 2, M_PI * 2);
- Transform_Properties(ot, P_ORIENT_AXIS | P_CONSTRAINT | P_MIRROR);
+ Transform_Properties(ot, P_ORIENT_AXIS | P_ORIENT_MATRIX | P_CONSTRAINT | P_MIRROR);
}
@@ -1126,7 +1130,8 @@ static void TRANSFORM_OT_transform(struct wmOperatorType *ot)
WM_operatortype_props_advanced_begin(ot);
Transform_Properties(
- ot, P_ORIENT_AXIS | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_ALIGN_SNAP | P_GPENCIL_EDIT | P_CENTER);
+ ot, P_ORIENT_AXIS | P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_ALIGN_SNAP |
+ P_GPENCIL_EDIT | P_CENTER);
}
static int transform_from_gizmo_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event))