PDA

View Full Version : do nothing


Subscream
07-07-2003, 02:42 PM
Hi

Is there a command for " do nothing" in mel.

I'm doing a UI for a script but I think there's a better way
of "tabbing" through the layout.

rowColumnLayout -numberOfColumns 3 -columnWidth 1 35 -columnWidth 2 40 -columnWidth 3 5;
text -label "";
text -label " A";
text -label "";
text -label "";
checkBox -h 30 -label "";
text -label "";
setParent ..;

Anyone got a suggestion?

regards Joel

bigfatMELon
07-08-2003, 04:52 PM
Not sure what you are asking. Your example script creates an interface that does nothing and has no fields to tab through.

-jl

Subscream
07-09-2003, 08:43 AM
the code is just extracted from a longer script so pay no attention to the function.

My question is.

instead of the
"text -label"; //which does nothing ..
I want to type something else .. is there a command that actually does nothing.
If I understand correctly my code will generate lots of empty texts.. which actually will use memory. Maybe not alot but I think this doesn't make the code look good.

In other languages there is commands for doing "nothing" .. I was wondering if Mel has that too?

regards Joel

ajk48n
07-09-2003, 09:40 AM
I'm not quite sure what you want, but if you want to just have more space between your text and your check box, you could use a formLayout.

bigfatMELon
07-09-2003, 09:44 AM
text -l "" isn't nothing. It is a something that cannot be seen but takes up a fixed amount of space in the UI when the width and height aren't specified. Any other non-visible UI control could be used instead.

Using the text command to use up space isn't ever going to take up enough memory to matter in the slightest bit so go ahead and use them. However, you can use fewer of them by simply specifying a height value, such as:

text -l "" -h 50;

Or use the form layout for everything.

-jl

Subscream
07-09-2003, 09:59 AM
thanks guys ..

the thing is .. I use both formlayout, rowcolumn-, column and framelayout in my UI. And they're all great but for diffrent things ..

The thing with the text is that when you use a rowcolumnlayout every command that follows after the creation will end up in a diffrent column .. that's why I don't specify a textwidth .. because I've allready specified that in the rowcolumn settings above. I just want the checkbox to end up in the third column and all will be great.

Another solution would be if there is a way that I can tell maya to just put the checkbox in the third column .. that way I wouldn't have to care about the empty-texts at all.

regards Joel

boraddd
08-08-2003, 12:14 AM
well, i would suggest you to study formLayouts more. You`ld never need such `do nothing` lines to create any kinda interface..
at least i didn`t.... ;) don`t think anybody can help alot

CGTalk Moderation
01-15-2006, 01:00 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.