[Bf-blender-cvs] [3b1e2a4f565] master: Fix T62241: Repeat last translate, wrong direction
Campbell Barton
noreply at git.blender.org
Wed Mar 6 08:12:01 CET 2019
Commit: 3b1e2a4f5657b88c3d2bd0e3ff7f4ae07da61da7
Author: Campbell Barton
Date: Wed Mar 6 18:08:27 2019 +1100
Branches: master
https://developer.blender.org/rB3b1e2a4f5657b88c3d2bd0e3ff7f4ae07da61da7
Fix T62241: Repeat last translate, wrong direction
Only use orientation value when the operator uses orientation axis.
Own error in 03da3b6593a24
===================================================================
M source/blender/editors/transform/transform.c
===================================================================
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 5b26066afe0..877ca336cfe 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -2160,6 +2160,9 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
/* Orientation used for redo. */
+ const bool use_orient_axis = (
+ t->orient_matrix_is_set &&
+ (RNA_struct_find_property(op->ptr, "orient_axis") != NULL));
short orientation;
if (t->con.mode & CON_APPLY) {
orientation = t->con.orientation;
@@ -2177,10 +2180,13 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
{
orientation = RNA_property_enum_get(op->ptr, prop);
}
- else {
+ else if (use_orient_axis) {
/* We're not using an orientation, use the fallback. */
orientation = t->orientation.unset;
}
+ else {
+ orientation = V3D_ORIENT_GLOBAL;
+ }
if ((prop = RNA_struct_find_property(op->ptr, "orient_axis"))) {
@@ -2212,7 +2218,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
if (t->con.mode & CON_APPLY) {
RNA_float_set_array(op->ptr, "orient_matrix", &t->con.mtx[0][0]);
}
- else if (t->orient_matrix_is_set) {
+ else if (use_orient_axis) {
RNA_float_set_array(op->ptr, "orient_matrix", &t->orient_matrix[0][0]);
}
else {
More information about the Bf-blender-cvs
mailing list