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:
authorDalai Felinto <dfelinto@gmail.com>2019-03-08 21:30:22 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-03-08 21:36:31 +0300
commit4ccaf56814a1389516dba7b2eb8fde0944dfccd8 (patch)
tree0318c455da798488bea5c0aa225fc8220f41fec5 /release/scripts/startup/bl_ui/properties_material.py
parentcee7c36cbddc47fbf257a8b9fdca9c424b684c91 (diff)
Fix T62349: Grease Pencil top material list not working
This is a fixup for my own: 92d185faebe. I'm also fixing the poll of the EEVEE_MATERIAL_PT_context_material which would fail when we had no context.material available.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_material.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_material.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index 07c94c90738..b05955e3598 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -87,8 +87,13 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
@classmethod
def poll(cls, context):
+ ob = context.object
mat = context.material
- return (context.object or mat) and (context.engine in cls.COMPAT_ENGINES) and not mat.grease_pencil
+
+ if (ob and ob.type == 'GPENCIL') or (mat and mat.grease_pencil):
+ return False
+
+ return (ob or mat) and (context.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout