Community
Maya Animation and Rigging
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya animation topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

onModelChange3dc Error

27 REPLIES 27
SOLVED
Reply
Message 1 of 28
jonsX942W
40168 Views, 27 Replies

onModelChange3dc Error

I get this Error all the time. I usually ignore it but this time it is stopping a new script I am using from working. Any Ideas how to fix this? I am using Advanced skeleton

// Execute Step:1 : Prep
// Face step:1 complete.
// Execute Step:2 : CtrlBox
// Face step:2 complete.
// Execute Step:3 : EyeBall
// Face step:3 complete.
// Execute Step:4 : EyeLid
// Face step:4 complete.
// Execute Step:5 : EyeBrow
select -r eyeBrowCage.e[0:2] eyeBrowCage.e[4] eyeBrowCage.e[6] eyeBrowCage.e[8] eyeBrowCage.e[13:17] eyeBrowCage.e[20:21] eyeBrowCage.e[24:25] eyeBrowCage.e[28:29] eyeBrowCage.e[31:33] ;
// Face step:5 complete.
// Execute Step:6 : Lip
// Error: file: C:/Users/x9-ws/Documents/maya/2017/scripts/AutoRig_Skeleton/AdvancedSkeleton5.mel line 13385: Command attachCurve failed. Open Script Editor for details. //
// Error: line 1: Cannot find procedure "onModelChange3dc". //
// Error: line 1: Cannot find procedure "onModelChange3dc". //
// Error: line 1: Cannot find procedure "onModelChange3dc". //
// Error: line 1: Cannot find procedure "onModelChange3dc". //

 

// Error: line 1: Cannot find procedure "onModelChange3dc".

Thanks

Jon

27 REPLIES 27
Message 2 of 28

@jonsX942W

 

What version of Maya/update are you using?

 

Did this issue occur before you installed the new script?

 

Try resetting the preferences folder first to rule out any corrupted files.

 

 

 


Faline Custodio Da Silva

Message 3 of 28

I am on Maya 2017 Update 4, yes this error has been showing up for a long
time now. I know Resetting the pre folder could help but is there any way
to recover the re-setting of the folder? I have a bunch of custom shelves
and scrips and keyboard shortcuts.
Message 4 of 28

@jonsX942W

 

Renaming the folder also works so that you keep a backup of your settings. You could copy/paste your shelf files (maya\2018\prefs\shelves) into the new prefs folder.

 

 


Faline Custodio Da Silva

Message 5 of 28

Its not working.. 


@faline.custodio.da.silva wrote:

@jonsX942W

 

Renaming the folder also works so that you keep a backup of your settings. You could copy/paste your shelf files (maya\2018\prefs\shelves) into the new prefs folder.

 


 

Message 6 of 28
Anonymous
in reply to: jonsX942W

The original cause of this is still unknown to me, but I can tell you that this error will easily spread if you don't fix it.

 

All model editors in your current Maya session have been modified to execute a MEL script on the event editorChanged. Any time you save any scene, this information will be saved as well into the scene's uiConfigurationScriptNode node. This means that if you open a scene with this infection and then continue to work on any other number of scenes you will save the problem into those scenes as well.

 

In order to remedy this, open each scene and run these Python commands:

import pymel.core as pm

# Get all model editors in Maya and reset the editorChanged event
for item in pm.lsUI(editors=True):
   if isinstance(item, pm.ui.ModelEditor):
       pm.modelEditor(item, edit=True, editorChanged="")

Make sure to save after this. If you just opened the scene and run this script however, no changes have been done as far as Maya knows. This means you have to do something in your scene to make it dirty (and just undo it) and then save.

Message 7 of 28
BrianHorgan4960
in reply to: Anonymous

Many thanks for the fix, was irritating here.

Message 8 of 28
karma_the_kat
in reply to: Anonymous

DO NOT USE THAT SCRIPT! The above solution is very dangerous.

It will very likely cause problems with the viewport not refreshing at all anymore, unless you restore the normal callback expression for the  uiConfigurationScriptNode, or reinstall Maya. 

 

Here is a script that will safely remove the onModelChange3dc callback without damaging the default maya UI expression.

 

needs_fixing = False
try:
    expression_str = cmds.getAttr('uiConfigurationScriptNode.before')
    fixed_expression_lines = []
    for line in expression_str.split('\n'):
        if '-editorChanged "onModelChange3dc"' in line:
            needs_fixing = True
            continue
        fixed_expression_lines.append(line)
    fixed_expression = '\n'.join(fixed_expression_lines)
    
    if needs_fixing:
        
        cmds.setAttr('uiConfigurationScriptNode.before', fixed_expression, type='string')
except:
    pass
Message 9 of 28
Anonymous
in reply to: karma_the_kat

Well... i guess i should have read the whole thread before executing the script, i executed the first script, then the 2nd script. err.. the problem still persists. Any ideas how to fix this? 

Message 10 of 28
Anonymous
in reply to: Anonymous

Apparently, I can't edit old posts. At this point, try save you file as a separate ASCII file and manually search for the onModelChange3dc section (which is at the end of the file) in a text editor. Be very careful when editing here. Just remove the added event and nothing else. Save the file, close and restart Maya and then open the file again.

Message 11 of 28
Anonymous
in reply to: Anonymous

onmodelchange.JPG

ok so on searching, i see this. So do i remove "-editorChanged \"onModelChange3dc\" or do i just remove "onModelChange3dc\"?

Message 12 of 28
Anonymous
in reply to: Anonymous

Hi,

 

Yes, remove: -editorChanged \"onModelChange3dc\"

If you ever get uncertain, you can always save an empty Maya ASCII file and compare it (of course, in that case you would have to restart Maya first to make sure it's not infected with this problem).

Message 13 of 28
alo95.costa
in reply to: karma_the_kat

I just stumbled upon this topic, and I must admit I'm also getting

 

Error: line 1: Cannot find procedure "onModelChange3dc".

 

But in my case there's no new plug-in or similar stuff causing it. I uninstalled and reinstalled Maya 2018 because some things were not working, and yet, every time I open the software, that "Error: line 1" shows up. Do you think your solution could fix my problem too?

Message 14 of 28
Anonymous
in reply to: alo95.costa

Hi,

I ran the script but it seems the problem still persist. 

 

I noticed whenever I open brand new empty scene, Maya insert the same error into that scene

 

 

 

 

Capture

Message 15 of 28
giovanniakp
in reply to: Anonymous

For any kind of persistent virus-like proc error, you could try running this python script (you can also add your own proc error name in the EVIL_METHOD_NAMES) :

 

def removeRogueModelPanelChangeEvents():
    EVIL_METHOD_NAMES = ['DCF_updateViewportList', 'CgAbBlastPanelOptChangeCallback','onModelChange3dc']
    capitalEvilMethodNames = [name.upper() for name in EVIL_METHOD_NAMES]
    modelPanelLabel = mel.eval('localizedPanelLabel("ModelPanel")')
    processedPanelNames = []
    panelName = cmds.sceneUIReplacement(getNextPanel=('modelPanel', modelPanelLabel))
    while panelName and panelName not in processedPanelNames:
        editorChangedValue = cmds.modelEditor(panelName, query=True, editorChanged=True)
        parts = editorChangedValue.split(';')
        newParts = []
        changed = False
        for part in parts:
            for evilMethodName in capitalEvilMethodNames:
                if evilMethodName in part.upper():
                    changed = True
                    break
            else:
                newParts.append(part)
        if changed:
            cmds.modelEditor(panelName, edit=True, editorChanged=';'.join(newParts))
            print("Model panel error fixed!"),
        processedPanelNames.append(panelName)
        panelName = cmds.sceneUIReplacement(getNextPanel=('modelPanel', modelPanelLabel))


removeRogueModelPanelChangeEvents()

 

It will remove the error for the current Maya scene. If you encounter the error again in another "infected" files, just run it and it will cure them, otherwise the error will live on any Maya scene you open afterwards in that Maya session. 

Credits:  https://forums.autodesk.com/t5/maya-forum/error-cannot-find-procedure-quot-dcf-updateviewportlist-qu... 

Tags (1)
Message 16 of 28
mekiranoglu
in reply to: giovanniakp

Is there a way to revert back this code? Also a solution to onModelChange3dc errors?

import pymel.core as pm

# Get all model editors in Maya and reset the editorChanged event
for item in pm.lsUI(editors=True):
   if isinstance(item, pm.ui.ModelEditor):
       pm.modelEditor(item, edit=True, editorChanged="")

 I used this to try to fix my onModelChange3dc error. Not only it didn't fix it, now when I try to select control vertices thru hotbox's component selection, nothing shows up in the viewport. I did:

-Remove 'editorchanged and onModelChange3dc' lines in *.ma file

-Reinstall Maya

-Delete userpref

But it didn't help. I'm using Maya 2018.  I tried the second script written here. It didn't do anything to onModelChange3dc errors either.

Thanks.

Message 17 of 28
giovanniakp
in reply to: mekiranoglu

Yeah that script is not working. As mentioned before, it sometimes causes the viewport not refreshing. The second script is not working for me either. Have you tried the script I posted? For me it works if I run that and save the file (otherwise the "infection" will remain on the scene file if you open it later). Also works for a new/blank Maya session that gets infected.

If you want to clear the onModelChange3dc infection manually, either delete this line on each of your infected .ma file:
-editorChanged \"onModelChange3dc\"

or you could try preventing the infected uIConfigurationScriptNode to load on new Maya session:
https://forums.autodesk.com/t5/maya-forum/error-cannot-find-procedure-quot-dcf-updateviewportlist-qu...

Tags (1)
Message 18 of 28

**** Maya, stupid software 😡

Message 19 of 28
mekiranoglu
in reply to: giovanniakp

Thanks, that works. Tho I had to clean my userprefs file from "editorchanged ... onmodelchange ...." lines first. Cheers! 

Message 20 of 28
Anonymous
in reply to: karma_the_kat

this is still not working... i tried all of all scripts posted.. darn...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report