verts setVert eat all RAM for big mesh

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

Check your cgtalk thread.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.