ScriptSpot

Forum topic · General Scripting

verts setVert eat all RAM for big mesh

By olygraph · 2014-06-30

Description

HI, I have a simple script to copy vertices position from one mesh to another mesh with same point order, different pose.

Code:


theMesh = selection[1]
theMesh2 = selection[2]

for vert in (theMesh.mesh.verts as bitarray) do
(
polyop.setVert theMesh2 vert [((polyop.getVert theMesh vert).x),((polyop.getVert theMesh vert).y),((polyop.getVert theMesh vert).z)]
)

But when i run with huge polycount meshes it eat ALL ram up to 24GB and run forever. Is there anyway to optimize that? I am very new to maxscript.

Thanks!

Comments (1)

.

miauu · 2014-06-30

Check your cgtalk thread.