Created
February 26, 2016 14:23
-
-
Save JokerMartini/22d283163be8b47cf358 to your computer and use it in GitHub Desktop.
Maxscript: This demonstrates adding a uvwMap modifier and setting its transform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- delete objects | |
-- for y = -10 to 10 do | |
-- ( | |
-- for x = -10 to 10 do | |
-- ( | |
-- b = box width:5 height:1 length:5 | |
-- b.pos = [x*5,y*5,0] | |
-- ) | |
-- ) | |
mapped fn setUVWModifier obj = | |
( | |
--addModifier obj (UvwMap length:200 width:200) | |
for i = (obj.modifiers.count) to 1 by -1 do | |
( | |
if isKindOf (local mody = obj.modifiers[i]) UvwMap do | |
( | |
mody[1].transform = inverse obj.transform | |
) | |
) | |
) | |
-- odd modifier | |
nodes = getCurrentSelection() | |
for n in nodes do addModifier n (UvwMap length:200 width:200) | |
setUVWModifier nodes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment