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:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-02-17 19:33:29 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-02-17 19:33:29 +0300
commita33b261473e95de8d8d438dbb6aa7afe513fb082 (patch)
tree3f96f6b3e463141382264f8325c019eb24365044 /source/blender/editors/transform/transform_ops.c
parent847bb4c4e0c35a4f617d75a700f79932e310c6db (diff)
Fix T71455, T73852, T73860: Transform, Redo doesn't work properly in time editors
The redo panel does not consider the position of the mouse. So it is not possible to know the direction to redo the operator. The solution is to add a new `direction` parameter that can be saved and used for redo. Differential Revision: https://developer.blender.org/D6852
Diffstat (limited to 'source/blender/editors/transform/transform_ops.c')
-rw-r--r--source/blender/editors/transform/transform_ops.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 39f6f24eb8d..d3d5d785eac 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -694,6 +694,14 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
RNA_def_property_ui_text(prop, "Center Override", "Force using this center value (when set)");
}
+ if (flags & P_MOUSE) {
+ prop = RNA_def_property(ot->srna, "mouse_coordinate_override", PROP_INT, PROP_XYZ);
+ RNA_def_property_array(prop, 2);
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
+ RNA_def_property_ui_text(
+ prop, "Mouse Coordinate Override", "Force using this mouse value (when set)");
+ }
+
if ((flags & P_NO_DEFAULTS) == 0) {
prop = RNA_def_boolean(ot->srna,
"release_confirm",
@@ -1239,7 +1247,7 @@ static void TRANSFORM_OT_transform(struct wmOperatorType *ot)
Transform_Properties(ot,
P_ORIENT_AXIS | P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR |
- P_ALIGN_SNAP | P_GPENCIL_EDIT | P_CENTER);
+ P_ALIGN_SNAP | P_GPENCIL_EDIT | P_CENTER | P_MOUSE);
}
static int transform_from_gizmo_invoke(bContext *C,