Layout issue - works in 2011, not in 2009 (MEL)

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 12 December 2012   #1
Layout issue - works in 2011, not in 2009 (MEL)

Unfortunately this is something I can't test here as the oldest version of Maya I have is 2011, but someone who is using a script I wrote is having an issue with it in Maya 2009.
They get an error ' Too many children in layout: frameLayout8 //'

Here's the code (the start of it anyway) that builds the UI, it's the last line here that is causing the error. Any ideas as to why this doesn't work in Maya 2009?


 // build the UI
 	if (`window -exists bhGhost`)
 		deleteUI bhGhost;
 		  global string $theLayout;
 		window -toolbox 1 -rtf true -menuBar 1 bhGhost ; 
 		 
 		menu -l "Colour" -to 1 optionsMenu;		
 		menuItem -divider true;
 		$colorSel =`radioMenuItemCollection`;			   
 		menuItem -label "Black"  -c bhBlackLine -radioButton off blk;
 		menuItem -label "White"  -c bhWhiteLine -radioButton off wht;	  
 		menu -l "Help" -to 1 helpMenu;
 		menuItem -l "Show Help"   -c bhHelpWin aboutlabel5;		
 				  
 		columnLayout -adj 1 mainCol;
 


Cheers,
Brian
 
Old 12 December 2012   #2
I couldnt get your code to work, but this code works in Maya 2012. Might have something to do with running the window command before you've added your UI elements.


 string $window = `window -title "Long Name" -menuBar true -rtf true -toolbox 1 -widthHeight 200 55`;
    menu -l "Colour" -to 1 optionsMenu;		
    menuItem -divider true;
    $colorSel =`radioMenuItemCollection`;			   
    menuItem -label "Black"  -c bhBlackLine -radioButton off blk;
    menuItem -label "White"  -c bhWhiteLine -radioButton off wht;	  
    menu -l "Help" -to 1 helpMenu;
    menuItem -l "Show Help"   -c bhHelpWin aboutlabel5;	
    columnLayout -adj 1 mainCol;
    showWindow $window;
    


Also, Ive found that rowColumnLayout is completely unreliable, it might be the same for columnLayout as well. Its more work, but formLayouts are great and pretty consistent in my experience.

Last edited by backwheelbates : 12 December 2012 at 04:53 AM.
 
Old 12 December 2012   #3
Thanks, appreciate the ideas. I don't think it's that I'm creating the window before adding the elements though as if I don't do that they get added to another part of the UI instead.

I'll try converting it to a form layout instead and see if that works. It's a nuisance really as my code works fine in 2011,2012 and 2013 but not in 2009 apparently and I've no way to test here.

Cheers,
Brian
 
Old 12 December 2012   #4
Thread automatically closed

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.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:40 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.