Fix T73774: Error in Paint 'Clone from Image/UV Map' panel

This panel is not for 2D paint, IMAGEPAINT_PROJECT_LAYER_CLONE is only
ever used in projection painting, not 2D painting.
Add a proper poll for this.

Maniphest Tasks: T73774

Differential Revision: https://developer.blender.org/D6836
This commit is contained in:
Philipp Oeser 2020-02-13 15:20:44 +01:00
parent 9fef5a2db4
commit d9e4f5a7e8
Notes: blender-bot 2023-02-14 08:59:10 +01:00
Referenced by issue #73774, Image Editor - AttributeError: 'NoneType' object has no attribute 'material_slots'
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ class ClonePanel(BrushPanel):
settings = cls.paint_settings(context)
mode = cls.get_brush_mode(context)
if mode in {'PAINT_TEXTURE', 'PAINT_2D'}:
if mode == 'PAINT_TEXTURE':
brush = settings.brush
return brush.image_tool == 'CLONE'
return False