[Bf-blender-cvs] [4324242557a] greasepencil-object: UI Tweak: Move the multiedit toggle to the panel header (instead of being a separate button inside)

Joshua Leung noreply at git.blender.org
Fri Dec 1 05:10:03 CET 2017


Commit: 4324242557afa1a728cc70148fb8c38fd76ff734
Author: Joshua Leung
Date:   Fri Dec 1 15:30:11 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rB4324242557afa1a728cc70148fb8c38fd76ff734

UI Tweak: Move the multiedit toggle to the panel header (instead of being a separate button inside)

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

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py

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

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 44ec380c424..2d697ade86e 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -510,7 +510,7 @@ class GreasePencilStrokeSculptPanel:
 
 
 class GreasePencilMultiFramePanel:
-    bl_label = "Multiframe"
+    bl_label = "Multi Frame"
     bl_category = "Tools"
     bl_region_type = 'TOOLS'
 
@@ -528,21 +528,25 @@ class GreasePencilMultiFramePanel:
         return False
 
     @staticmethod
-    def draw(self, context):
+    def draw_header(self, context):
         layout = self.layout
+
+        gpd = context.gpencil_data
+        layout.prop(gpd, "use_multiedit", text="")
+
+    @staticmethod
+    def draw(self, context):
         gpd = context.gpencil_data
         settings = context.tool_settings.gpencil_sculpt
 
-        row = layout.row()
-        row.prop(gpd, "use_multiedit", text="Multi Frame", icon="FORCE_HARMONIC")
+        layout = self.layout
+        layout.enabled = gpd.use_multiedit
 
-        row = layout.row()
-        row.enabled = gpd.use_multiedit
-        row.prop(settings, "use_multiframe_falloff")
+        col = layout.column(align=True)
+        col.prop(settings, "use_multiframe_falloff")
 
         # Falloff curve
-        layout.label("Falloff")
-        box = layout.box()
+        box = col.box()
         box.enabled = gpd.use_multiedit and settings.use_multiframe_falloff
         box.template_curve_mapping(settings, "multiframe_falloff_curve", brush=True)



More information about the Bf-blender-cvs mailing list