t0m3k Posted July 13, 2007 Posted July 13, 2007 Witam, Zadalem tutaj pytanie i dostalem skrypt od mentat'a ktory swietnie dzialal pozniej zrobilem z tego utility z "grafika" i przestalo dzialac Ctrl+Z, tzn. dziala ale nie cofie tego co zrobil moj skrypt ale pamieta o innych operacjach np. uzycie Array, dlaczego? Wczesniej moglem cofnac osobno kazde wywolanie oryginalnego skryptu. programowanie w MAXScript zaczalem wczoraj wiec moga byc bledy w kodzie. utility randomize "Randomize!" width:160 height:368 ( groupBox move_range "Move" pos:[8,8] width:144 height:88 spinner x_range "X axis +/- " pos:[24,24] width:120 height:16 enabled:true range:[0,10000,0] spinner y_range "Y axis +/- " pos:[24,48] width:120 height:16 enabled:true range:[0,10000,0] spinner z_range "Z axis +/- " pos:[24,72] width:120 height:16 enabled:true range:[0,10000,0] groupBox rotate_option "Rotate" pos:[8,104] width:144 height:88 checkbox x_rotate "X Rotate" pos:[16,120] width:72 height:16 checkbox y_rotate "Y Rotate" pos:[16,144] width:72 height:16 checkbox z_rotate "Z Rotate" pos:[16,168] width:72 height:16 groupBox scale_it "Scale" pos:[8,200] width:144 height:112 spinner x_scale "X Scale " pos:[24,216] width:112 height:16 range:[0,100,0] pos:[144,216] width:8 height:16 label perc "%" pos:[136,216] width:8 height:16 spinner y_scale "Y Scale " pos:[24,240] width:112 height:16 range:[0,100,0] pos:[144,240] width:8 height:16 label perc1 "%" pos:[136,240] width:8 height:16 spinner z_scale "Z Scale " pos:[24,264] width:112 height:16 range:[0,100,0] pos:[144,264] width:8 height:16 label perc2 "%" pos:[136,264] width:8 height:16 checkbox unif "Uniform" pos:[16,288] width:112 height:16 button doit "RaNdOmIzE!" pos:[8,320] width:144 height:24 on unif changed state do ( if unif.checked == true then ( y_scale.enabled = false z_scale.enabled = false ) else ( y_scale.enabled = true z_scale.enabled = true ) ) on doit pressed do ( for i in selection do ( dir = random 1 2 scale_temp = x_scale.value if dir == 1 do scale_temp = -scale_temp a = 1 + (scale_temp / 100) if unif.checked == true then ( b = a c = a ) else ( dir = random 1 2 scale_temp = y_scale.value if dir == 1 do scale_temp = -scale_temp b = 1 + (scale_temp / 100) dir = random 1 2 scale_temp = z_scale.value if dir == 1 do scale_temp = -scale_temp c = 1 + (scale_temp / 100) ) scale i [a,b,c] x = random 0 x_range.value dir = random 1 2 if dir == 1 do x = -x y = random 0 y_range.value dir = random 1 2 if dir == 1 do y = -y z = random 0 z_range.value dir = random 1 2 if dir == 1 do z = -z move i [x,y,z] if x_rotate.checked == true then xr = random 1 360 else xr = 0 if y_rotate.checked == true then yr = random 1 360 else yr = 0 if z_rotate.checked == true then zr = random 1 360 else zr = 0 rot_obj = eulerangles xr yr zr rotate i rot_obj ) ) ) z gory dzieki za pomoc...
3grosze Posted July 13, 2007 Posted July 13, 2007 hey ho, tu masz opisane co i jak żeby undo włączyć w maxskrypcie http://www.max3d.pl/forum/showthread.php?t=4135
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now