Commit: 2758319abece472da9efef9c79a691be7e3b01cb
Author: Antonio Vazquez
Date: Thu Jun 8 12:04:49 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB2758319abece472da9efef9c79a691be7e3b01cb
Hide material panel in BI render 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 d711150cccf..063de80cf4a 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -113,9 +113,11 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel,
Panel):
def poll(cls, context):
# An exception, don't call the parent poll func because
# this manages materials for all engine types
-
- 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
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs