Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2022-06-27 10:13:29 +0300
committerAntonio Vazquez <blendergit@gmail.com>2022-06-27 10:13:40 +0300
commit10a2c50733169f1f5dcf23d43eb49c1e4bf4446e (patch)
treeb52af135d4c8738732e9bc230b9c0d8fba5733ef
parent3a8fa77c1fd21b9266afe549f9bd308d74439dd0 (diff)
Fix T99178: Console warning using search (F3) in grease pencil draw mode
The preview data was not available in this context and need to be checked to avoid the warning.
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 8c43186313f..44d82be8ab0 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -296,7 +296,7 @@ class GPENCIL_MT_material_active(Menu):
for slot in ob.material_slots:
mat = slot.material
- if mat:
+ if mat and mat.id_data and mat.id_data.preview:
icon = mat.id_data.preview.icon_id
layout.operator("gpencil.material_set", text=mat.name, icon_value=icon).slot = mat.name