这是我的剧本:
# confirming the project dimension resolution
projset = nuke.Root()
projset["format"].setValue("HD_1080")
# load video
foot = nuke.nodes.Read(file="C:/Users/Santosh/Desktop/MVI_8411.MOV", name="Nuke_Class1")
# select read node and attach write node to it
nuke.toNode("Nuke_Class1").setSelected(True)
wr = nuke.createNode("Write")
# specify the sequence path
wr["file"].setValue("C:/Users/Santosh/Desktop/nukke/nuke_API_###.jpg")
# connect to the first viewer, if many
nukescripts.connect_selected_to_viewer(0)
# perform the render, 50th to 140th frame
nuke.render(wr, 50, 140, 1)
我基本上是看一段视频然后写出一个图像序列。在
问题是,这个脚本渲染1帧91次,它应该渲染91个不同的帧。在
当我试图调查时,我发现问题出在Read节点上。我发现帧范围被设置为1-1。我必须手动设置帧范围吗?因为当我读同一个视频文件时,在GUI上,帧范围设置正确。这表明GUI依赖于元数据,而我的脚本不是,也许?在
我如何摆脱手动设置帧范围?在
问题就在你的Read节点中。应手动指定帧范围:
第一种方法
或者没有第一个理由:
^{pr2}$第二种方法
如果您不知道帧范围,可以使用TCL样式自动读入QT文件:
^{3}$另外,我想它可能与
sys
模块的功能有关,但绝对不能使用ViewMetaData
节点(在第一种方法中),因为当您在GUI模式或CLI模式下使用它时,它只读取可见帧范围。metadata()
方法返回一个python字典,其中包含Nuke_Class1节点的元数据,例如:相关问题 更多 >
编程相关推荐