GP: New main switches to hide stroke and fill material
New parameters to switch visibility of stroke and fill
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user