Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BigRoy/0c094648e6af1a22d6fe99cdc9837072 to your computer and use it in GitHub Desktop.
Save BigRoy/0c094648e6af1a22d6fe99cdc9837072 to your computer and use it in GitHub Desktop.
Little snippet to remove "CgAbBlastPanelOptChangeCallback" error from Maya scene - // Error: line 1: Cannot find procedure "CgAbBlastPanelOptChangeCallback". //
"""
This will iterate all modelPanels and remove the "CgAbBlastPanelOptChangeCallback"
As such, after running this the following error should be fixed:
// Error: line 1: Cannot find procedure "CgAbBlastPanelOptChangeCallback". //
"""
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="")
@BigRoy
Copy link
Author

BigRoy commented Apr 1, 2020

For the sake of completeness I've added some more details/information on the original topic including where it's found in the uiConfigurationScriptNode.

@boyyscout
Copy link

@BigRoy It actually works! Thanks man

@Roumenov
Copy link

Thnx man, these ui script node errors are annoying af.

@SkullNeck
Copy link

Hello
I'm a beginner and I'm using maya 2019 and 2020, how do I use this code to get this error out? Thanks

@BigRoy
Copy link
Author

BigRoy commented Sep 3, 2022

@SkullNeck Try as described in this post here

To avoid confusion, here's the important bit copy pasted:

  • Go to top of this page you are on now (so yes, that's here)
  • On top right of the code click on RAW, this should open the plain text in your browser
  • Now press CTRL + A (select all)
  • then CTRL + C (copy)
  • then go into Maya's Script Editor* into a Python TAB
  • then CTRL + V (paste)
  • run it.

*To open Maya's Script Editor:

  • Start Maya
  • Go to: Windows > General Editors > Script Editor

If none of this works - please read the rest of that topic on Autodesk Forum because there I've described more about the issue an how to go about debugging where it's saved with the maya scene (in uiConfigurationScriptNode), etc.

@SkullNeck
Copy link

Thanks @BigRoy I will see if this solution solves this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment