Fix #130799: Prevent cycles material template to show in Grease Pencil

The `poll()` function for `CYCLES_PT_context_material` was using the
legacy `GPENCIL` identifier as opposed to `GREASEPENCIL`. This caused
duplicated material templates to show in the material tab.

Pull Request: https://projects.blender.org/blender/blender/pulls/130962
This commit is contained in:
YimingWu
2024-11-26 12:18:37 +01:00
committed by Thomas Dinges
parent 306b2cd0fa
commit 14fcbabafc
+1 -1
View File
@@ -1156,7 +1156,7 @@ class CYCLES_PT_context_material(CyclesButtonsPanel, Panel):
@classmethod
def poll(cls, context):
if context.active_object and context.active_object.type == 'GPENCIL':
if context.active_object and context.active_object.type == 'GREASEPENCIL':
return False
else:
return (context.material or context.object) and CyclesButtonsPanel.poll(context)