Help & Feedback
Work in progress
Indespensible MaxScripts, Plugins and 3rd Party Tools
The allmighty FREE Resources Thread !
The Life of a Sea Turtle - Tutorial by mrgrotey
Maxforums member photo gallery index
Maxforums Member Tutorials
three cheers to maxforums...
101 Things you didnt know in Max...
A Face tutorial from MDB101 :D
Maxforums.org Members Gallery
SON OF POST YOURSELF
Dub's Maxscript Tutorial Index
Maxunderground news unavailable
Lil' code troubleshooting
Hi, ive pieced together some code from online and in the listener to automate some simple stuff but its throwing an error;
'type error array index must be positive got: got: undefined'
Can anyone else see why it might be doing this?
newmod = uvwmap()
newmod.maptype = 4
for obj in $ do addmodifier obj (copy newmod)
$.modifiers[#UVW_Map].maptype = 4
$.modifiers[#UVW_Map].length = 600
$.modifiers[#UVW_Map].width = 600
$.modifiers[#UVW_Map].height = 600
--create material & assign bitmap
newmat = StandardMaterial()
mybmp = bitmaptexture filename:"X:\Projects\Categories\Graphics\PFS Tiling\JP_Bakery_Tiles.jpg"
newmat.name = ("MAT_" + i as string)
newmat.diffusemap = myBmp
selection[i].material = newmat
read 626 times
9/9/2015 1:47:07 PM (last edit: 9/9/2015 1:49:35 PM)
I don't know maxscript but it's probably referring to 'i' ( specifically where it says 'selection[i]' ), because 'i' isn't defined anywhere..
read 616 times
9/9/2015 3:37:18 PM (last edit: 9/9/2015 3:37:18 PM)
Looks like Dave nailed it :)
This should do what you want (I think):
myBmp = bitmapTexture filename:"X:/Projects/Categories/Graphics/PFS Tiling/JP_Bakery_Tiles.jpg"
for i = 1 to selection.count do (
addModifier selection[i] (uvwMap mapType:4 length:600 width:600 height:600)
selection[i].material = standardMaterial name:("MAT_" + i as string) diffuseMap:myBmp
read 611 times
9/9/2015 4:33:48 PM (last edit: 9/9/2015 4:33:48 PM)
Thanks guys, i noticed that literally 30 seconds after posting this thread haha, that uvw snipped it great thanks garp obviously mine is straight from the listener :D
read 584 times
9/9/2015 11:02:26 PM (last edit: 9/9/2015 11:02:26 PM)
I need to start getting familiar with Maxscript soon, i've had a quick look over Nik and a bit of Dubs tutorials, looking forward to getting started :)
read 577 times
9/10/2015 1:07:30 AM (last edit: 9/10/2015 1:07:30 AM)
is the best place to start, imo.
read 563 times
9/10/2015 7:12:04 AM (last edit: 9/10/2015 7:12:04 AM)
Thanks Garp. Damn i hate video tutorials though. What happened to good old fashioned text with diagrams and examples.. So much quicker and easier to scan through and pick out what you need.
read 557 times
9/10/2015 10:27:05 AM (last edit: 9/10/2015 10:27:05 AM)
That'd be the doc then ;)
read 555 times
9/10/2015 11:40:51 AM (last edit: 9/10/2015 11:40:51 AM)
My tutorials are a bit shit these days.
I didn't know a heck of a lot when I wrote them.
read 464 times
9/22/2015 5:22:31 AM (last edit: 9/22/2015 5:22:31 AM)
Open chat window