-- shouldn't this:x = vert.x/1 - vert.zy = vert.y/1 - vert.z--be actuallyx = vert.x/(1 - vert.z)y = vert.y/(1 - vert.z) as divisions/mul come first in math, but the equation presented is different
Hi, I don't know exactly what's the purpose of this script, anyway I spotted a couple of issues x = vert.x/1 - vertz y = vert.y/1 - vertzshould be x = vert.x/1 - vert.z y = vert.y/1 - vert.z You may want to add a "with redraw off" context to speed things up and "with undo on" to reduce program granularity.
Good! For the sake of optimization if you plan to use it on large objects, you could store calculated positions x, y and z in an Array of Point3, then shift the whole vertexes in a single step with polyOp.moveVerts, it would be much faster. Something like: local iNumVerts = obj.getNumVertices() local ap3Shift = #()…
Thanks! I got it working. Also when it said 1-z it actually meant to invert it. Here is what I get now. But some of the meshes really mess up when it attempts to move a vertice to 30 different locations. Is there a way to split these vertices when this happens? Or a way to make each faces its own element?