GP: New main switches to hide stroke and fill material

New parameters to switch visibility of stroke and fill
This commit is contained in:
Antonioya
2018-11-03 08:46:21 +01:00
parent c48ca87bce
commit 628908a710
6 changed files with 51 additions and 3 deletions

View File

@@ -179,6 +179,12 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
bl_label = "Stroke"
bl_parent_id = 'MATERIAL_PT_gpencil_surface'
def draw_header(self, context):
ma = context.object.active_material
if ma is not None and ma.grease_pencil is not None:
gpcolor = ma.grease_pencil
self.layout.prop(gpcolor, "show_stroke", text="")
@staticmethod
def draw(self, context):
layout = self.layout
@@ -211,6 +217,12 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
bl_label = "Fill"
bl_parent_id = 'MATERIAL_PT_gpencil_surface'
def draw_header(self, context):
ma = context.object.active_material
if ma is not None and ma.grease_pencil is not None:
gpcolor = ma.grease_pencil
self.layout.prop(gpcolor, "show_fill", text="")
@staticmethod
def draw(self, context):
layout = self.layout