[Bf-blender-cvs] [5c48592ccde] master: Fix T78259: Proportional editing does not work in particle editing

Germano Cavalcante noreply at git.blender.org
Fri Jun 26 17:03:37 CEST 2020


Commit: 5c48592ccde08e18d13255e89d09067d5dc0f771
Author: Germano Cavalcante
Date:   Fri Jun 26 12:02:52 2020 -0300
Branches: master
https://developer.blender.org/rB5c48592ccde08e18d13255e89d09067d5dc0f771

Fix T78259: Proportional editing does not work in particle editing

This is a long-standing bug, possibly proportional editing never worked
in particle mode.

Some parameter definitions in the transform code are scattered and
sometimes duplicated.

Proportional editing is a parameter that depends only on the Convert
type and not `spacetype`, `CTX_` or `obedit_type`.

===================================================================

M	source/blender/editors/transform/transform_convert.c
M	source/blender/editors/transform/transform_generics.c

===================================================================

diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c
index ce37cb9dacd..71e5bca70b1 100644
--- a/source/blender/editors/transform/transform_convert.c
+++ b/source/blender/editors/transform/transform_convert.c
@@ -1086,7 +1086,6 @@ void createTransData(bContext *C, TransInfo *t)
       convert_type = TC_MBALL_VERTS;
     }
     else if (t->obedit_type == OB_ARMATURE) {
-      t->flag &= ~T_PROP_EDIT;
       convert_type = TC_ARMATURE_VERTS;
     }
   }
@@ -1164,6 +1163,7 @@ void createTransData(bContext *C, TransInfo *t)
       break;
     case TC_ARMATURE_VERTS:
       createTransArmatureVerts(t);
+      init_prop_edit = false;
       break;
     case TC_CURSOR_IMAGE:
       createTransCursor_image(t);
@@ -1291,6 +1291,10 @@ void createTransData(bContext *C, TransInfo *t)
        * and are still added into transform data. */
       sort_trans_data_selected_first(t);
     }
+
+    if (!init_prop_edit) {
+      t->flag &= ~T_PROP_EDIT;
+    }
   }
 
   BLI_assert((!(t->flag & T_EDIT)) == (!(t->obedit_type != -1)));
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 32b23ad7ff3..a8f742a8610 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -650,34 +650,9 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
       t->flag |= initTransInfo_edit_pet_to_flag(proportional);
     }
     else {
-      /* use settings from scene only if modal */
-      if (t->flag & T_MODAL) {
-        if ((t->options & CTX_NO_PET) == 0) {
-          if (t->spacetype == SPACE_GRAPH) {
-            t->flag |= initTransInfo_edit_pet_to_flag(ts->proportional_fcurve);
-          }
-          else if (t->spacetype == SPACE_ACTION) {
-            t->flag |= initTransInfo_edit_pet_to_flag(ts->proportional_action);
-          }
-          else if (t->obedit_type != -1) {
-            t->flag |= initTransInfo_edit_pet_to_flag(ts->proportional_edit);
-          }
-          else if (t->options & CTX_GPENCIL_STROKES) {
-            t->flag |= initTransInfo_edit_pet_to_flag(ts->proportional_edit);
-          }
-          else if (t->options & CTX_MASK) {
-            if (ts->proportional_mask) {
-              t->flag |= T_PROP_EDIT;
-
-              if (ts->proportional_edit & PROP_EDIT_CONNECTED) {
-                t->flag |= T_PROP_CONNECTED;
-              }
-            }
-          }
-          else if (!(t->options & CTX_CURSOR) && ts->proportional_objects) {
-            t->flag |= T_PROP_EDIT;
-          }
-        }
+      /* Use settings from scene only if modal. */
+      if (t->flag & T_MODAL && (t->options & CTX_NO_PET) == 0) {
+        t->flag |= initTransInfo_edit_pet_to_flag(ts->proportional_edit);
       }
     }



More information about the Bf-blender-cvs mailing list