Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-07-20 23:57:47 +0300
committerAntonioya <blendergit@gmail.com>2019-07-29 13:35:12 +0300
commit3ee246f614caaa8fa88b0c7813730fc35b7718e6 (patch)
treee6eec1031b5ce10aa365eb49ec7c51b00b187455 /release/scripts/startup/bl_ui/properties_material_gpencil.py
parent92f6e60f46b4f4db04a3b9a49b9429a027148ee7 (diff)
Fix T67338 : GPencil Disable material properties when material is locked
When the material was locked, the properties were deactivated but not disabled. Differential Revision: http://developer.blender.org/D5309
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_material_gpencil.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_material_gpencil.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index 29a89c7b4a3..8db0f8182ab 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -120,6 +120,7 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
ma = context.material
if ma is not None and ma.grease_pencil is not None:
gpcolor = ma.grease_pencil
+ self.layout.enabled = not gpcolor.lock
self.layout.prop(gpcolor, "show_stroke", text="")
def draw(self, context):
@@ -131,7 +132,7 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
gpcolor = ma.grease_pencil
col = layout.column()
- col.active = not gpcolor.lock
+ col.enabled = not gpcolor.lock
col.prop(gpcolor, "mode")
@@ -169,6 +170,7 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
def draw_header(self, context):
ma = context.material
gpcolor = ma.grease_pencil
+ self.layout.enabled = not gpcolor.lock
self.layout.prop(gpcolor, "show_fill", text="")
def draw(self, context):
@@ -180,7 +182,7 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
# color settings
col = layout.column()
- col.active = not gpcolor.lock
+ col.enabled = not gpcolor.lock
col.prop(gpcolor, "fill_style", text="Style")
if gpcolor.fill_style == 'GRADIENT':