本解决思路的前提是曲线缓存正确,如果曲线缓存不正确,按道理说,无论怎么设置都无法设置成功
1、最常见的问题,将maya 的animation 改为DG模式,具体操作方法百度一下即可,这里不做赘述
2、由于是脚本批量组装的后期文件,有可能会导致缓存虽然指认上去,但是xgen 的面板并没有刷新,既读取不到缓存,导致毛发刷新失败,导致的,所以我们需要手动刷新下缓存
# -*- coding: UTF-8 -*-
"""
@Time : 2023/3/20 16:45
@Author : Jerris_Cheng
@File : temp11.py
@Description:
"""
from __future__ import print_function
import xgenm as xg
import xgenm.xgGlobal as xgg
_all_palettes = xg.palettes()
for _palette in _all_palettes:
_des_editor = xgg.DescriptionEditor
_des_editor.setCurrentPalette(_palette)
_pale_descs = xg.descriptions(_palette)
for _desc in _pale_descs:
_des_editor.setCurrentDescription(_desc)
oldpatchfile = xg.getAttr("custom__arnold_auxRenderPatch", _palette, _desc, "RendermanRenderer")
xg.setAttr("custom__arnold_auxRenderPatch", oldpatchfile, _palette, _desc, "RendermanRenderer")
_des_editor.refresh("Full")