mrproxy creation
I´m trying to develop a script, that generates mrproxies from selected objects, but the script generates only the first object and then stops..
start_value = 0
end_value = 10
for i in selection do
(
mypath = "D://temp//"
myfile = mypath + i.name as string + "_.mib"
myProxy = mr_proxy()
myProxy.srcgeometry = i
-- until now the script works fine
myProxy.writeProxy i myfile replace:false animation: true zoom: true start: start_value end: end_value
-- generates exactly one mrproxy and then stops
)
I would really appreciate your help...
thanks in advance.
Andy.
Comments
Thanks guys... you´re
Thanks guys... you´re really great... The script is now burning like hell.. I also found another script by google that is doing exactly the same with much more code inside and unfortunately not for animation purposes... that script is also using an array inside the for-loop... now I´m getting the idea...
My next step would be to make a small interface and upload that to scriptspot... Thank you very much for your help..
Lol, we even used the same
Lol, we even used the same variable name.... oh well, great minds think alike I guess =D
ups, marco has been faster.
ups, marco has been faster. yes, hes right.
looks like the selection is
looks like the selection is gone(deselected) after writing proxy, so store ypur selection into array at start:
Maybe one of the steps
Maybe one of the steps alters the selection, thus screwing up the FOR loop. Try storing the selection in an array, and the loop in there.
local mySelection = selection as array
FOR i in mySelection DO
(
myPath = "D://temp//"
etc etc