diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_modifier.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_modifier.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 29fcb06ac67..b5f087fd5ee 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1855,7 +1855,6 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): # the mt.type enum is (ab)used for a lookup on function names # ...to avoid lengthy if statements # so each type must have a function here. - def gpencil_masking(self, layout, ob, md, use_vertex, use_curve=False): gpd = ob.data layout.separator() @@ -1884,7 +1883,15 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): split = col2.split(factor=0.6) row = split.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') + + valid = md.material in (slot.material for slot in ob.material_slots) or md.material is None + if valid: + icon = 'SHADING_TEXTURE' + else: + icon = 'ERROR' + + row.alert = not valid + row.prop_search(md, "material", gpd, "materials", text="", icon=icon) row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') row = split.row(align=True) |