[Bf-blender-cvs] [1d58aed] GPencil_EditStrokes: Proportional Editing options for GPencil should now work across all editors supported

Joshua Leung noreply at git.blender.org
Sat Nov 29 13:57:03 CET 2014


Commit: 1d58aedf6fd99341d28da9b1caf8bad9084180ca
Author: Joshua Leung
Date:   Sun Nov 30 01:21:46 2014 +1300
Branches: GPencil_EditStrokes
https://developer.blender.org/rB1d58aedf6fd99341d28da9b1caf8bad9084180ca

Proportional Editing options for GPencil should now work across all editors supported

* When in Stroke Editing mode (or strokes points can get transformed),
  the proportional editing settings for editing points/geometry will now
  be used. These include the disabled/enabled/connected + falloff properties.

* Uncommented the code in the pie menu for showing these settings, so that
  this functionality can be tested in each applicable editor.

TODO:
* Fix refresh bugs for UI to ensure that the right set of settings is displayed
* Expose these settings in other places where they may be applicable

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

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	source/blender/editors/transform/transform_generics.c

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

diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index c5421ac..f9cfe42 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -181,10 +181,10 @@ class GPENCIL_PIE_tool_palette(Menu):
                 row.operator("transform.translate", icon='MAN_TRANS').gpencil_strokes = True
                 row.operator("transform.rotate",    icon='MAN_ROT').gpencil_strokes = True
                 row.operator("transform.resize",    text="Scale", icon='MAN_SCALE').gpencil_strokes = True
-                #row = col.row(align=True)
-                #row.label("Proportional Edit:")
-                #row.prop(context.tool_settings, "proportional_edit", text="", icon_only=True)
-                #row.prop(context.tool_settings, "proportional_edit_falloff", text="", icon_only=True)
+                row = col.row(align=True)
+                row.label("Proportional Edit:")
+                row.prop(context.tool_settings, "proportional_edit", text="", icon_only=True)
+                row.prop(context.tool_settings, "proportional_edit_falloff", text="", icon_only=True)
 
                 # NW - Select (Non-Modal)
                 col = pie.column()
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 765ad82..fcf7895 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1318,6 +1318,9 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
 					if (t->obedit) {
 						t->flag |= initTransInfo_edit_pet_to_flag(ts->proportional);
 					}
+					else if (t->options & CTX_GPENCIL_STROKES) {
+						t->flag |= initTransInfo_edit_pet_to_flag(ts->proportional);
+					}
 					else if (t->options & CTX_MASK) {
 						if (ts->proportional_mask) {
 							t->flag |= T_PROP_EDIT;




More information about the Bf-blender-cvs mailing list