I hope somebody can help me.
In my script theres is an editable mesh, wich I want to transform. It ist possible to do this tranformation manual. If I add an "edit mesh"-modifier, I can move the several vertices in the vertex-sublevelmode. By deleting the "edit mesh"-modifier I can undo my transformation if it isn't correct.
I tried to write a script, but it doesn't work. Either it is irreversible or it doesn't work. Has anybody an idea how to solve this problem?
This is my script:
disableSceneRedraw()
percent = 50
factor = (percent/100.0)
currentSelection = getCurrentSelection()
max modify mode
for obj in currentSelection do
(
-- addModifier obj (edit_mesh())
for i = 1 to getNumVerts obj do
(
vert = getVert obj i
vert.x = vert.x * factor
vert.y = vert.y * factor
vert.z = vert.z * factor
setVert obj i [vert.x, vert.y, vert.z]
)
update obj
)
enablesceneredraw()
Ralf · 2008-12-22