[Bf-blender-cvs] [19624c8dd71] greasepencil-object: UI: Redo paper panel

Antonio Vazquez noreply at git.blender.org
Fri Nov 24 10:42:12 CET 2017


Commit: 19624c8dd710f50f89cd42803821c33dbd9508ac
Author: Antonio Vazquez
Date:   Fri Nov 24 10:41:58 2017 +0100
Branches: greasepencil-object
https://developer.blender.org/rB19624c8dd710f50f89cd42803821c33dbd9508ac

UI: Redo paper panel

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index eb583d37a50..2eb4554efe0 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -115,30 +115,6 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel):
         split.row()
         split.prop(unit, "use_separate")
 
-class SCENE_PT_gp_paper(SceneButtonsPanel, Panel):
-    bl_label = "Grease Pencil Paper"
-    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        ts = context.tool_settings
-        row = layout.row(align=False)
-        row.prop(ts, "use_gpencil_paper", text="Use Paper")
-
-        row = layout.row()
-        row.prop(ts, "gp_paper_color", text="Color")
-        row = layout.row()
-        row.prop(ts, "gp_paper_opacity", text="Opacity")
-
-        row = layout.row(align=False)
-        row.prop(ts, "use_gpencil_grid", text="Display Grid")
-
-        row = layout.row(align=False)
-        col = row.column(align=True)
-        col.enabled = ts.use_gpencil_grid
-        col.prop(ts, "gpencil_grid_size", text="")
-
 class SceneKeyingSetsPanel:
 
     @staticmethod
@@ -503,6 +479,34 @@ class SCENE_PT_gp_simplify(SceneButtonsPanel, Panel):
         row.prop(ts, "gpencil_disable_fast_drawing")
 
 
+class SCENE_PT_gp_paper(SceneButtonsPanel, Panel):
+    bl_label = "Grease Pencil Paper"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
+
+    def draw_header(self, context):
+        ts = context.tool_settings
+        self.layout.prop(ts, "use_gpencil_paper", text="")
+
+    def draw(self, context):
+        layout = self.layout
+
+        ts = context.tool_settings
+        layout.active = ts.use_gpencil_paper
+
+        row = layout.row()
+        row.prop(ts, "gp_paper_color", text="Color")
+        row = layout.row()
+        row.prop(ts, "gp_paper_opacity", text="Opacity")
+
+        row = layout.row(align=False)
+        row.prop(ts, "use_gpencil_grid", text="Display Grid")
+
+        row = layout.row(align=False)
+        col = row.column(align=True)
+        col.enabled = ts.use_gpencil_grid
+        col.prop(ts, "gpencil_grid_size", text="")
+
+
 class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
     _context_path = "scene"



More information about the Bf-blender-cvs mailing list