Hello Blender Artits
I need to select all surfaces that have the same material name, then delete them.
Any help ?
Thanks
Hello Blender Artits
I need to select all surfaces that have the same material name, then delete them.
Any help ?
Thanks
Based on active object, selected material slot:
import bpy
bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.select_all(action='DESELECT')
bpy.ops.object.material_slot_select()
bpy.ops.mesh.delete(type='FACE')
bpy.ops.object.mode_set(mode = 'OBJECT')
Hello @JuhaW
Thanks ,
The object have a lot of materials and very complex form, when i run the script i have all faces selected then, i select the material i like to remove, after that run the code but then the entire object disapear.
any advice ?
Yes, deselect all faces first. Edited the script.