[Bf-blender-cvs] [d29ea702838] greasepencil-object: Hide material panel in Eevee for GP objects

Antonio Vazquez noreply at git.blender.org
Thu Jun 8 13:42:44 CEST 2017


Commit: d29ea702838bfaa18bacb83dad4f05fdc229d8a7
Author: Antonio Vazquez
Date:   Thu Jun 8 11:49:01 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBd29ea702838bfaa18bacb83dad4f05fdc229d8a7

Hide material panel in Eevee for GP objects

When a GP object is selected this panel must be hidden

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index efdd22c5d0c..d711150cccf 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -1060,8 +1060,11 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
 
     @classmethod
     def poll(cls, context):
-        engine = context.scene.render.engine
-        return (context.material or context.object) and (engine in cls.COMPAT_ENGINES)
+        if context.active_object and context.active_object.type == 'GPENCIL':
+            return False
+        else:
+            engine = context.scene.render.engine
+            return (context.material or context.object) and (engine in cls.COMPAT_ENGINES)
 
     def draw(self, context):
         layout = self.layout




More information about the Bf-blender-cvs mailing list