zulu10
12-30-2009, 07:08 PM
Hi all,
can someone tell me how I can export my UVW map channel 2 to a file by using a script (withouth having to enter the filename manually, no popup window)?
I have written a small script, but it just opens the UVW export window and I have to enter the names manually. Unfortunately the "$.modifiers[#unwrap_uvw].unwrap.save ()" command does not accept a filname as input. Is there a known workaround for this problem?
outPath = "c:\\temp"
selection_array = selection as array
for i = 1 to selection_array.count by 1 do
(
current_obj = selection_array[i]
objName = current_obj.Name
-- set the filename to the object filename
exportname = outPath + "\\" + objName + ".obj"
select current_obj
-- save uvw map 2
exportname_uvw2 = outPath + "\\" + objName + "-uv2.uvw"
$.modifiers[#unwrap_uvw].unwrap.save () --exportname_uvw2
)
completeRedraw()
thanks
Zulu
can someone tell me how I can export my UVW map channel 2 to a file by using a script (withouth having to enter the filename manually, no popup window)?
I have written a small script, but it just opens the UVW export window and I have to enter the names manually. Unfortunately the "$.modifiers[#unwrap_uvw].unwrap.save ()" command does not accept a filname as input. Is there a known workaround for this problem?
outPath = "c:\\temp"
selection_array = selection as array
for i = 1 to selection_array.count by 1 do
(
current_obj = selection_array[i]
objName = current_obj.Name
-- set the filename to the object filename
exportname = outPath + "\\" + objName + ".obj"
select current_obj
-- save uvw map 2
exportname_uvw2 = outPath + "\\" + objName + "-uv2.uvw"
$.modifiers[#unwrap_uvw].unwrap.save () --exportname_uvw2
)
completeRedraw()
thanks
Zulu
