mirror of
https://github.com/OpenFusionProject/scripts.git
synced 2024-11-21 22:00:04 +00:00
code to show all selected faces
This commit is contained in:
parent
af2988e062
commit
f6dc2d690f
@ -101,15 +101,22 @@ def rip_terrain_mesh(f, outpath, clear=False):
|
|||||||
outfile = f"{name}.obj"
|
outfile = f"{name}.obj"
|
||||||
bpy.ops.export_scene.obj(filepath=os.path.join(outpath, outfile))
|
bpy.ops.export_scene.obj(filepath=os.path.join(outpath, outfile))
|
||||||
|
|
||||||
# select modified vertices
|
bpy.ops.object.mode_set(mode="EDIT")
|
||||||
#bpy.ops.object.mode_set(mode="EDIT")
|
bm = bmesh.from_edit_mesh(context.edit_object.data)
|
||||||
#bm = bmesh.from_edit_mesh(context.edit_object.data)
|
bm.verts.ensure_lookup_table()
|
||||||
#bm.verts.ensure_lookup_table()
|
|
||||||
#for v in bm.verts:
|
# deselect all
|
||||||
# v.select = False
|
for v in bm.verts:
|
||||||
|
v.select = False
|
||||||
|
for l in v.link_loops:
|
||||||
|
l.face.select = False
|
||||||
|
|
||||||
|
# select modified vertices + faces
|
||||||
#for shift_index in indices:
|
#for shift_index in indices:
|
||||||
# v = bm.verts[shift_index]
|
# v = bm.verts[shift_index]
|
||||||
# v.select = True
|
# v.select = True
|
||||||
|
# for l in v.link_loops:
|
||||||
|
# l.face.select = True
|
||||||
|
|
||||||
if(clear):
|
if(clear):
|
||||||
bpy.ops.object.mode_set(mode="OBJECT")
|
bpy.ops.object.mode_set(mode="OBJECT")
|
||||||
|
Loading…
Reference in New Issue
Block a user