我正在制作一个批量提交脚本,在我的3d场景中渲染一系列相机。这些摄影机有自己的单帧编号,需要进行渲染。我希望能够根据我提供的脚本名称保存文件,但在末尾省略帧编号。(例如: fileName0004.tif to fileName.tif )使用3dsmax 2018和vray 3.0。
这似乎是一个自动功能,但我似乎找不到任何地方谈到禁用它。到目前为止,我唯一看到的是它是v-ray 5.0中的一个选项。不幸的是,我不能很快升级。
这个是可能的吗?有人知道怎么做吗?
谢谢
function fn_netSubmit =
(
local arr_camTEST = #("cam1", "cam2", "cam3")
local arr_renderSeatSide =#("side1", "side2", "side3")
local arr_renderSeat = #("seat1", "seat2", "seat3")
local arr_renderFrames = #("1", "3", "7")
local appendDate = "200707"
local outputLocation = "some\\location\\"
--connect
nm.connect #manual "mtlwarml401.ca.aero.bombardier.net" platform:#64
if nm.QueryControl #wait do
(
nm.GetControl()
exit
)
if nm.getControl() == true then
(
for i = 1 to arr_camTEST.count do
(
job = nm.newJob()
job.outputWidth = 3600
job.outputHeight = 3600
job.name = ("filename" + " " + arr_renderSeat[i] + " " + arr_renderSeatSide[i] + " " + "S" + "-" + appendDate)
job.nonSeqFrames = true
job.frames = arr_renderFrames[i]
job.renderCamera = arr_camTEST[i]
job.frameOutputName = (outputLocation + "/" + ("filename" + " " + arr_renderSeat[i] + " " + arr_renderSeatSide[i] + " " + "S") + ".tif")
job.submit()
)
)
nm.Disconnect()
)
fn_netSubmit()发布于 2020-10-01 02:28:13
在过去,我在渲染后使用了一个脚本,它解析目录中的文件名并对它们进行重命名。事实证明,这比尝试使用渲染后回调或试图强制文件名输出在渲染过程中更改要容易得多,错误也更少:
newSuffixes=#("one","two","three")
--get folder
dirToProcess = getSavePath caption:"Select folder to rename" initialDir:"\\\\SERVER\\Path\\Path\\"
--sort functions for file list
fn numFromName str =
(
--returns the frame number from a max rendered filename, e.g. 0002 from file_0002.tga. Filename MUST use an underscore.
local parts = filterstring str "\._"
return (parts[parts.count-1] as integer)
)
fn compareFN v1 v2 =
(
--sort function copy-pasted from MXS help for filename numeric ordering
local d = (numFromName v1) - (numFromName v2)
case of
(
(d < 0.): -1
(d > 0.): 1
default: 0
)
)
if dirToProcess != undefined do
(
local filesToProcess = getFiles (dirToProcess + "\\*.png")
--sort files array ito ordered list of frames in case they're collected out-of-order
qsort filesToProcess compareFN
for f in 1 to filesToProcess.count do
(
--replace the underscore and frame number suffix of foo_####.png with the corresponding memebr of the suffixes array
local newSuffix = newSuffixes[f]
local fileToProcess = filesToProcess[f] as string
local idx = (fileToProcess.count) - 7
newFileName = replace fileToProcess idx 4 newSuffix --string function
--debug
--format "New file name: %\n" newFileName
if not (copyfile fileToProcess newFileName) do format "Failed copying % to %" filetoProcess newFileName
)
)(原始脚本使用从动画控制器提取的数据以编程方式为数以千计的图像生成newsuffixes数组)
https://stackoverflow.com/questions/62838301
复制相似问题