[Bf-blender-cvs] [1f388a21885] greasepencil-object: UI: Move Pass Index to separate Panel

Antonio Vazquez noreply at git.blender.org
Thu Jun 7 17:23:11 CEST 2018


Commit: 1f388a218856a95c55b5c45659914db36bc74c76
Author: Antonio Vazquez
Date:   Thu Jun 7 17:23:03 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB1f388a218856a95c55b5c45659914db36bc74c76

UI: Move Pass Index to separate Panel

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index d6a286bda57..0f5c44ae51e 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -168,9 +168,6 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
             if gpcolor.stroke_style == 'SOLID' or gpcolor.use_stroke_pattern is True:
                 col.prop(gpcolor, "color", text="Color")
 
-            # Options
-            col.prop(gpcolor, "pass_index")
-
 
 class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
     bl_label = "Fill"
@@ -236,11 +233,27 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
                 col.prop(gpcolor, "texture_clamp", text="Clip Image")
 
 
+class MATERIAL_PT_gpencil_options(GPMaterialButtonsPanel, Panel):
+    bl_label = "Options"
+    bl_options = {'DEFAULT_CLOSED'}
+
+    @staticmethod
+    def draw(self, context):
+        layout = self.layout
+        layout.use_property_split = True
+
+        ma = context.object.active_material
+        if ma is not None and ma.grease_pencil is not None:
+            gpcolor = ma.grease_pencil
+            layout.prop(gpcolor, "pass_index")
+
+
 classes = (
     GPENCIL_UL_matslots,
     MATERIAL_PT_gpencil_slots,
     MATERIAL_PT_gpencil_strokecolor,
     MATERIAL_PT_gpencil_fillcolor,
+    MATERIAL_PT_gpencil_options,
 )
 
 if __name__ == "__main__":  # only for live edit.



More information about the Bf-blender-cvs mailing list