Commit: 9e028f5feb585c13893e547d73aa8fa4b3df5486
Author: Antonio Vazquez
Date: Thu Jun 8 12:04:22 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB9e028f5feb585c13893e547d73aa8fa4b3df5486
Hide material panel in Cycles for GP Objects
When a GP object is selected, this panel must be hidden
===================================================================
M intern/cycles/blender/addon/ui.py
===================================================================
diff --git a/intern/cycles/blender/addon/ui.py
b/intern/cycles/blender/addon/ui.py
index a8018e3824d..275d72d04cd 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -730,7 +730,10 @@ class Cycles_PT_context_material(CyclesButtonsPanel,
Panel):
@classmethod
def poll(cls, context):
- return (context.material or context.object) and
CyclesButtonsPanel.poll(context)
+ if context.active_object and context.active_object.type == 'GPENCIL':
+ return False
+ else:
+ return (context.material or context.object) and
CyclesButtonsPanel.poll(context)
def draw(self, context):
layout = self.layout
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs