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
path: root/source
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-04-30 14:52:38 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-04-30 14:52:38 +0300
commitea77584d36b0e1e495f1a5b0d294752069bc2cbe (patch)
tree2a88c6984aa3003e885d3cde77811974c5c0b149 /source
parent41b45d9159fcb349c5b98e8af57cb1e5318616e8 (diff)
Fix orientation change in Redo
Some transform redo operations require contraint to be enabled. Issue introduced in rBc57e4418bb85.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/transform/transform.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 26f108cbf33..843c60ec87c 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1746,11 +1746,9 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis"))) {
- if (t->con.mode & CON_APPLY) {
- bool constraint_axis[3] = {false, false, false};
- if (t->idx_max == 0) {
- /* Only set if needed, so we can hide in the UI when nothing is set.
- * See 'transform_poll_property'. */
+ bool constraint_axis[3] = {false, false, false};
+ if (t->idx_max == 0) {
+ if (t->con.mode & CON_APPLY) {
if (t->con.mode & CON_AXIS0) {
constraint_axis[0] = true;
}
@@ -1760,16 +1758,17 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
if (t->con.mode & CON_AXIS2) {
constraint_axis[2] = true;
}
+ RNA_property_boolean_set_array(op->ptr, prop, constraint_axis);
}
else {
- constraint_axis[0] = true;
- constraint_axis[1] = true;
- constraint_axis[2] = true;
+ RNA_property_unset(op->ptr, prop);
}
- RNA_property_boolean_set_array(op->ptr, prop, constraint_axis);
}
else {
- RNA_property_unset(op->ptr, prop);
+ constraint_axis[0] = true;
+ constraint_axis[1] = true;
+ constraint_axis[2] = true;
+ RNA_property_boolean_set_array(op->ptr, prop, constraint_axis);
}
}