Hellow!
Sorry! I have bad English!
Help me, please, separate all polygons
for p in me.polygons:
p.select=True
don’t work
for v in me.vertices:
v.select=True
don’t work
How select???
bmes = bmesh.from_edit_mesh(me)
for f in bmes.faces:
f.select = True
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
bpy.ops.mesh.separate(type='SELECTED')
don’t work:(
How for f in bmes.faces or for p in me.polygons separate all faces? All faces to individual objects?
and what about separating only the selected faces?
I also need a help to figure out a way to process each face in order because the face index get assigned in a weird way.
I’m trying to assign a different texture to each face of a subdivided cube in a sequential row/column scheme.
anyone has already done this?
only selected faces was the request, but sure, you could do that by running the mark sharp operator and apply edge split modifier with split sharp option i guess. But doing the same with bmesh module for instance could be a nicer approach which wouldn’t require mode changes.
Not sure what mode switching does, but i suppose it does update the object and the scene, just like operators.
And mode switching is slow, so bmesh has its clear advantages over standard API. But in recent builds, there is also update_from_editmesh() to flush selections and geometry without mode switching. However, it’s less powerful than bmesh module.