我在调用的脚本中发现了这一点,右键单击->引用->复制,并找到了原始脚本。
我在我的场景中选择一个参考项目。
然后,我需要: string $test = duplicateReference 0 " ";
它不返回新的引用。如何从这个命令中创建新的项目?
它没有任何关于Python或MEL的引用,如果您查找它的话。
发布于 2016-09-12 12:48:02
当它不在文档中时,请尝试使用MEL命令whatIs
whatIs duplicateReference;它将返回写入该函数的mel文件。
您可以在文本编辑器中打开该文件,以确保它不返回任何内容。有时它会选择节点,有时不会。在这些情况下,最好的方法是在操作之前和之后列出节点,然后执行不同的操作:
def getNewNodesCreated(_function):
""" Return the new nodes created after the execution of a function """
before = cmds.ls(long=True)
eval(_function)
after = cmds.ls(long=True)
return list(set(after) - set(before))它将返回创建的所有新节点。
https://stackoverflow.com/questions/39449814
复制相似问题