[Bf-blender-cvs] [a4df7f78a88] blender-v2.83-release: Fix T75398: Redo with Shift R always uses the previous pivot center
Germano Cavalcante
noreply at git.blender.org
Mon Apr 27 17:07:44 CEST 2020
Commit: a4df7f78a8816ca463cb09f23ac64b989cd8ebb0
Author: Germano Cavalcante
Date: Mon Apr 27 12:07:07 2020 -0300
Branches: blender-v2.83-release
https://developer.blender.org/rBa4df7f78a8816ca463cb09f23ac64b989cd8ebb0
Fix T75398: Redo with Shift R always uses the previous pivot center
Overwriting the pivot center was an attempt to fix T71455.
The solution now is to save the direction in the "mirror" property.
===================================================================
M source/blender/editors/transform/transform.c
M source/blender/editors/transform/transform_convert.c
===================================================================
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index d0866968daa..d376c71d867 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1651,11 +1651,6 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
}
- if ((prop = RNA_struct_find_property(op->ptr, "center_override"))) {
- /* Important for redo operations. */
- RNA_property_float_set_array(op->ptr, prop, t->center_global);
- }
-
if (t->flag & T_PROP_EDIT_ALL) {
if (t->flag & T_PROP_EDIT) {
proportional |= PROP_EDIT_USE;
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c
index 14f9365096d..4ae6964f739 100644
--- a/source/blender/editors/transform/transform_convert.c
+++ b/source/blender/editors/transform/transform_convert.c
@@ -823,17 +823,25 @@ void clipUVData(TransInfo *t)
*/
char transform_convert_frame_side_dir_get(TransInfo *t, float cframe)
{
+ char r_dir;
Scene *scene = t->scene;
float center[2];
if (t->flag & T_MODAL) {
UI_view2d_region_to_view(
(View2D *)t->view, t->mouse.imval[0], t->mouse.imval[1], ¢er[0], ¢er[1]);
+ r_dir = (center[0] > cframe) ? 'R' : 'L';
+ {
+ /* XXX: This saves the direction in the "mirror" property to be used for redo! */
+ if (r_dir == 'R') {
+ t->flag |= T_NO_MIRROR;
+ }
+ }
}
else {
- copy_v2_v2(center, t->center_global);
+ r_dir = (t->flag & T_NO_MIRROR) ? 'R' : 'L';
}
- return (center[0] > cframe) ? 'R' : 'L';
+ return r_dir;
}
/* This function tests if a point is on the "mouse" side of the cursor/frame-marking */
More information about the Bf-blender-cvs
mailing list