from maya import cmds
for model_panel in cmds.getPanel(typ="modelPanel"):
# Get callback of the model editor
callback = cmds.modelEditor(model_panel, query=True, editorChanged=True)
# If the callback is the erroneous `CgAbBlastPanelOptChangeCallback`
if callback == "CgAbBlastPanelOptChangeCallback":
# Remove the callbacks from the editor
cmds.modelEditor(model_panel, edit=True, editorChanged="")
Maya消除‘CgAbBlastPanelOptChangeCallback’报错
文章介绍了如何使用Python的MayaAPI(cmds)获取modelPanel的回调函数,如果发现是CgAbBlastPanelOptChangeCallback,就从modelEditor中移除该回调。
摘要由CSDN通过智能技术生成