Fix #119396: Add toggle for texture paint mask icon
This PR adjusts the behavior of the Texture Paint mask icon to behave similarly to the automasking icon in Sculpt mode. This behavior was missed in the original task: #102585 Pull Request: https://projects.blender.org/blender/blender/pulls/119399
This commit is contained in:
@@ -995,7 +995,7 @@ class VIEW3D_HT_header(Header):
|
||||
row = layout.row()
|
||||
row.ui_units_x = 9
|
||||
row.popover(panel="VIEW3D_PT_slots_projectpaint", icon=icon)
|
||||
row.popover(panel="VIEW3D_PT_mask", icon='MOD_MASK', text="")
|
||||
row.popover(panel="VIEW3D_PT_mask", icon=VIEW3D_HT_header._texture_mask_icon(tool_settings.image_paint), text="")
|
||||
else:
|
||||
# Transform settings depending on tool header visibility
|
||||
VIEW3D_HT_header.draw_xform_template(layout, context)
|
||||
@@ -1103,6 +1103,11 @@ class VIEW3D_HT_header(Header):
|
||||
|
||||
return "CLIPUV_DEHLT" if automask_enabled else "CLIPUV_HLT"
|
||||
|
||||
@staticmethod
|
||||
def _texture_mask_icon(ipaint):
|
||||
mask_enabled = ipaint.use_stencil_layer or ipaint.use_cavity
|
||||
return "CLIPUV_DEHLT" if mask_enabled else "CLIPUV_HLT"
|
||||
|
||||
|
||||
class VIEW3D_MT_editor_menus(Menu):
|
||||
bl_label = ""
|
||||
|
||||
Reference in New Issue
Block a user