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

Maya UI logic Problem

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
666 Views, 0 Replies

Maya UI logic Problem

Hi,

I am new to scripting in Maya (did a little bit in XSI), and I have a problem with a UI using class.

 

I am wondering what is the right way to 'refresh' a UI when using a class.

I've shortened the script to focus on the problem I have. I am trying to refresh a window UI (delete and reCreate it ) when the 'Type' optionMenu is changed (I need to refresh it, because all the other parameters of the UI will depend of the selected 'Type').

There is a 'Maya Fatal Error' appening when trying to delete the UI. In this example, it's on line 78. But ultimately, I would uncomment line 77, and the error is appening in the _initUI function (but also when deleting the UI.... cmds.deleteUI(self.win, window=True)).

So if you try the code as it is, you would get a fatal error (Maya shuts down), when changing the 'Type' parameter of my UI.

What is interesting is that... when the UI is created (I create it as object a, in my example), I can type in maya's script Editor; cmds.deleteUI(testUI.a.win,window=True) without creating the error.

It's probably the location from where I call; cmds.deleteUI(self.win, window=True) inside my class that is wrong...

Do you have any idea?

thanks,
Jonathan

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report