Fix T45258, impossible to select brush when removing it from 2d
painting. Also system added a brush every time it found no paint brush in the system which is not what we would want. Solution: * Brush panel stays visible always, regardless of whether there is a brush or not. * We search for first available brush when we find no brush in paint struct instead of always generating a new one. * Generating and searching for a brush take a mode argument now. Needed some refactoring to users of BKE_paint_init as well. * Did some style cleanups for paint mode enums. Patch is big but it's mostly argument refactoring.
This commit is contained in:
@@ -705,7 +705,7 @@ class IMAGE_PT_tools_transform_uvs(Panel, UVToolsPanel):
|
||||
col.operator("transform.shear")
|
||||
|
||||
|
||||
class IMAGE_PT_paint(Panel, BrushButtonsPanel):
|
||||
class IMAGE_PT_paint(Panel, ImagePaintPanel):
|
||||
bl_label = "Paint"
|
||||
bl_category = "Tools"
|
||||
|
||||
@@ -721,6 +721,11 @@ class IMAGE_PT_paint(Panel, BrushButtonsPanel):
|
||||
if brush:
|
||||
brush_texpaint_common(self, context, layout, brush, settings)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
sima = context.space_data
|
||||
toolsettings = context.tool_settings.image_paint
|
||||
return sima.show_paint
|
||||
|
||||
class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel):
|
||||
bl_label = "Overlay"
|
||||
|
Reference in New Issue
Block a user