If I run this script in Maya 2008 it gives me a 3 panel User Interface with at the top 2 cams. If I run the script in Maya 2009 it gives me this error:
// Error: line 8: Too many children in layout: modelEditorIconBar //
I guess the problem is because of the new 'icon toolbar' in the viewport in 2009. Toggling it off before running doesn't fix the problem though.

If I duplicate both the setParent..; commands then it DOES run the script, but only the left side camera in the UI works...

How do I fix this in Maya 2009? What should I turn of in the script or what should I change?..

Hope somebody can help me out! I'm really stuck here!

Thanks in advance!

Roy

BigRoyNL

02-23-2009, 12:11 AM

What is the best way to contact autodesk about this kind of things?

goleafsgo

02-23-2009, 01:19 AM

I logged this bug for someone else a week or so ago...

To workaround the bug set the parent explicitly instead of with the "..".

If you create such a panel. It comes in the panel list. But if you run the script again, there comes a new one. And a new one, and a new one... How can I delete the panel under the panel list when the window gets closes, or when ran again delete the previous once.

Roy

Ha. I got it with the panel -q -ex and the deleteUI -panel...
Thanks anyway.

goleafsgo

02-24-2009, 12:52 PM

Instead of using "modelPanel" in your script have you tried using "modelEditor"? That will probably give you want you want.

If you want your window to be able to go inside a panel then you should look at the docs for "scriptedPanel". This command lets you set up a type of UI and lets you provide callbacks for when you should create/edit the UI.

BigRoyNL

02-24-2009, 02:32 PM

The modelEditor was indeed more what I needed, thanks for the tip.. will be using that now.

Also I'll dig into the scriptedPanel in a while.

Thanks!

Roy

EDIT:
If I do something in the viewport created with the modelEditor and then I press CTRL + Z it doesn't work. Only when I first press in the 'normal' viewport and then press CTRL + Z it undos the action. How can I setup the camera in the UI that I can instantly press CTRL + Z to undo.

CGTalk Moderation

02-24-2009, 02:32 PM

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.

Follow Us On:

The CGSociety

The CGSociety is the most respected and accessible global organization for creative digital artists. The CGS supports artists at every level by offering a range of services to connect, inform, educate and promote digital artists worldwide. More about us on TheArtSociety.com