Skip to content

Commit cde28d9

Browse files
committed
Remove vertex paint eraser toggle hack for Blender 4.3 since it's no longer necessary
1 parent e414fd0 commit cde28d9

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

vcol_editor.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -138,34 +138,9 @@ def execute(self, context):
138138
if mode == 'TEXTURE_PAINT':
139139
context.tool_settings.image_paint.brush = new_brush
140140

141-
# HACK: Blender 4.3 sometimes can't set the active brush this way
142-
if is_bl_newer_than(4, 3) and context.tool_settings.image_paint.brush != new_brush:
143-
catalog_id = new_brush.asset_data.catalog_id if new_brush.asset_data else ''
144-
try:
145-
bpy.ops.brush.asset_activate(
146-
asset_library_type='ESSENTIALS',
147-
asset_library_identifier="",
148-
relative_asset_identifier="brushes\\essentials_brushes-mesh_texture.blend\\Brush\\" + new_brush.name
149-
)
150-
except:
151-
self.report({'ERROR'}, 'Cannot set the brush to \'' + new_brush.name + '\'!')
152-
return {'CANCELLED'}
153-
154141
elif mode == 'VERTEX_PAINT':
155142
context.tool_settings.vertex_paint.brush = new_brush
156143

157-
# HACK: Blender 4.3 sometimes can't set the active brush this way
158-
if is_bl_newer_than(4, 3) and context.tool_settings.vertex_paint.brush != new_brush:
159-
try:
160-
bpy.ops.brush.asset_activate(
161-
asset_library_type='ESSENTIALS',
162-
asset_library_identifier="",
163-
relative_asset_identifier="brushes\\essentials_brushes-mesh_vertex.blend\\Brush\\" + new_brush.name
164-
)
165-
except:
166-
self.report({'ERROR'}, 'Cannot set the brush to \'' + new_brush.name + '\'!')
167-
return {'CANCELLED'}
168-
169144
elif mode == 'SCULPT':
170145
context.tool_settings.sculpt.brush = new_brush
171146

0 commit comments

Comments
 (0)