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

MEL "confirmDialog" not behaving as expected

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
776 Views, 5 Replies

MEL "confirmDialog" not behaving as expected


//Find Workspace and open confirmDialog
string $sceneDir = `workspace -q -fn`;
string $saveSceneQuery = `confirmDialog -title "Render to this Directory?"
-message $sceneDir
-button "Yes"
-button "Set Project"
-button "Cancel"
-defaultButton "Yes"
-cancelButton "Cancel"
-dismissString "Cancel"`;

 

//If Answer is "Yes"
if($saveSceneQuery == "Yes"){

string $getSHs[] = `fileDialog2 -ds 1 -fileFilter "*.sh"`;

}

 

 

//-----------------------------------------

I'm running Maya 2018 on OS X. 

 

The above code is a snippet from a larger MEL script that I wrote. However, when executed it seems to open the file dialog box and close it immediately without any interaction from he user. If I comment out the confirmDialog section and simply set the $saveSceneQuery equal to "Yes", everything works as expected. The fileDialog2 box open and lets me save the .sh file. Can anyone see why that would be/confirm you are having the same issue? (Sorry that the formatting didn't copy and paste very well)

 

Thank you!

 

 

 

 

Tags (1)
5 REPLIES 5
Message 2 of 6
sean.heasley
in reply to: Anonymous

Hi @Anonymous

 

Is your 2018 up to date?

 

I just tried this on on 2018 with Update 5 installed and it worked as expected with the file browser opening and waiting for my input.

 

 

Message 3 of 6
Anonymous
in reply to: sean.heasley

Thanks for testing it out for me. I'm running update 4, but I'll give 5 a try. I'm curious though, are you on a Mac or PC? If you're on a Mac, which OS are you running? I've determined that swapping the "promptDialog" command for the "confirmDialog" will give me the same issue... so I'm thinking maybe its an OS X Finder thing. I've tried on a couple macs running different OS versions and they've all given me the same error. 

 

Thanks again

Message 4 of 6
sean.heasley
in reply to: Anonymous

Hi @Anonymous

 

I'm running Windows 10 on a PC so yes its possible this may be specifically down to Mac OS's.

 

 

Message 5 of 6
Anonymous
in reply to: sean.heasley

Updating to Maya 2018 update 5 seems to have fixed the issue. Thanks!

Message 6 of 6
sean.heasley
in reply to: Anonymous

Hi @Anonymous

 

No problem! Glad the update solved this issue for you!

 

 

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report