From 14fcbabafc4f00c860457b7dbf6dc203f75ee94e Mon Sep 17 00:00:00 2001 From: YimingWu Date: Tue, 26 Nov 2024 12:18:37 +0100 Subject: [PATCH] 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 --- intern/cycles/blender/addon/ui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 8672d10dafe..074f3112c88 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -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)