About this site
ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Comments
I correct your script. Now
I correct your script. Now works only with E-Poly, E-Mesh, and E-Spline objects without modifiers assigned.
bga
Man this is a real life saver!
Can't thank you enough!
Actually
I have this here script that snaps Editable polygon vertex to grid points.
Anyone could help convert it to snap spline vertex in much the same way?
( Also this script seems to have a small issue,
Need to run it twice for it to work.
-----------------------------------------------
Rollout vertSnap "Vert Fixer"
(
group "Snap verts:"
(
button fixVert1 "1 unit" across:3
button fixVert2 "10 units"
button fixVert3 "100 units"
)
on fixVert1 pressed do vertMove 1
on fixVert2 pressed do vertMove 10
on fixVert3 pressed do vertMove 100
)
objEd = newRolloutFloater "Vert Editor" 245 450 50 50
addrollout vertSnap objEd
fn vertMove vertScale =
(
for K = 1 to selection.count do
(
if (selection[K].baseObject as string == "Editable Mesh") or
(selection[K].baseObject as string == "Editable Poly") do
(
for L = 1 to selection[K].numverts do
(
currentVert = polyop.getVert selection[K] L
currentVert.x = float currentVert.x/vertScale
currentVert.y = float currentVert.y/vertScale
currentVert.z = float currentVert.z/vertScale
if currentVert.x - (floor currentVert.x) < .5 then
currentVert.x = floor currentVert.x
else
currentVert.x = ceil currentVert.x
if currentVert.y - (floor currentVert.y) < .5 then
currentVert.y = floor currentVert.y
else
currentVert.y = ceil currentVert.y
if currentVert.z - (floor currentVert.z) < .5 then
currentVert.z = floor currentVert.z
else
currentVert.z = ceil currentVert.z
currentVert.x = currentVert.x*vertScale
currentVert.y = currentVert.y*vertScale
currentVert.z = currentVert.z*vertScale
polyop.setVert selection[K] L currentVert
)
update(selection[K])
)
)
)
Example from mxs help
Example from mxs help
bga
Thanks but,, i made a mistake
Ops, Sorry, I guess that i should not have said homegrid.
should have said 2.5D snap to any viewport grid points.
So vertex snap to grid points. not just a flaten vertex to the home grid