Hi
- how do i make a script to let me
1. pick an object
2. set its displace modifiers bitmap letting me choose the bitmap
3. apply a ProOptimser?
4. repeat for 3 objects
5. Export, letting me choose what name?
- the macrorecorder won't register button click on the Displace /Bitmap Button
regards
Bruno
Quite a few things at once, I will give you some pointers (links to maxscript reference, be sure to click and read through all of them):
1. have a look at PickObject function
2. obj.displace.bitmap = getOpenFilename ...
3. addModifier obj (ProOptimizer())
4. do the whole process in for or while loop
5. exportFile function together with the aforementioned getOpenFilename function
thanks, but
- i dont understand and
$LOD001.obj.displace.bitmap = getOpenFilename
doesnt work or this either
obj.displace.bitmap = getOpenFilename
No, I'm not giving you anything finished, just some pointers - that's why there's ellipsis at the end of the line and that's why it's a link so that you click on it and see the syntax, so for example one way would be:
objectsPicked = 0 while objectsPicked < 3 do ( messageBox "Pick Object" local obj = pickObject() if obj != undefined do ( objectsPicked += 1 obj.displace.bitmap = getOpenFileName types:"JPEG (*.jpg)|*.jpg|Portable Network Graphics (*.png)|*.png|All files (*.*)|*.*|" addModifier obj (ProOptimizer()) ) ) exportFilename = getOpenFileName types:"Wavefront Object (*.obj)|*.obj" if exportFilename != undefined do exportFile exportFilename #noPrompt selectedOnly:true