Floatslidergrp In Rowcolumnlayout

When I create several floatSliderGrp objects in a rowColumnLayout, they come out as just fields, with a blank space where the sliders should be.

Is this a known bug in MEL or in my code? Is there a workaround?

I am running Maya under Windows 2000. I have not tried this yet in Linux to see if it happens there as well.

Example:

rowColumnLayout -numberOfColumns 2 -columnWidth 1 200 -columnWidth 2 200;

text -label "First";
text -label "Second";

floatSliderGrp -min 0 -max 1 -s 0.01 -field 1 -label "One" slider1;
floatSliderGrp -min -1 -max 1 -s 0.01 -field 1 -label "Two" slider2;

Note that the sliders work correctly if they are in (say) a columnLayout.

QUOTE(Paul G @ 08/16/06, 03:21 PM) [snapback]245276[/snapback]
When I create several floatSliderGrp objects in a rowColumnLayout, they come out as just fields, with a blank space where the sliders should be.

Is this a known bug in MEL or in my code? Is there a workaround?

Looks as though I don't have enough space... if I remove -field 1, I get a tiny slider; if instead I make the columns 250 wide, I get the field and a tiny slider. So it looks like the sliders were hidden under the fields.

The problem is still there...

Is it because a floatSliderGrp is effectively two columns wide, and so needs to be given two columns of the layout? If so, is there a "span columns" flag in rowColumnLayout that means "make this control span n columns"? I don't see one in the documentation.

it could just be because rowColumnLayout is a total piece of crap....?

seriously though, it should work, but you DO have to set sizes for everything:

CODE
window;
rowColumnLayout -nc 2 -cw 1 180 -cw 2 50;
floatSliderGrp -l "one" -f 1 -cw3 40 30 100;
button;
floatSliderGrp -l "two" -f 1 -cw3 40 30 100;
button;
floatSliderGrp -l "three" -f 1 -cw3 40 30 100;
button;
setParent ..;
showWindow;

but rowColumnLayout is useless, try and use a different layout if you can, you'l get much nicer and more versatile results...

:nathaN

QUOTE(Naughty @ 08/16/06, 05:40 PM) [snapback]245292[/snapback]
it could just be because rowColumnLayout is a total piece of crap....?

Well, I wasn't going to say that, but I must admit that I was thinking it...

I tried columnLayout too, but had the same problem.

In the end I just used rowLayouts nested in columnLayouts, and put only one floatSliderGrp in each row. It comes out looking neat but it's not how I wanted it.

Does MEL ever get updated, like C++ does? It strikes me that the language has a lot of shortcomings. My wishlist would include:

  • a fix for the problem posted here
  • bitwise operators for ints
  • pass-by-reference for non-array types

I've encountered all of these (and more that I don't remember right now) in my use of MEL, and have had to implement workarounds in their absence, but it would make life much easier if they were part of the language.

well they do accept bug reports for MEL.. I've submitted 3-4 MEL bugs in the past and all of them have been accepted and are now fixed or being looked into... so yeah, they do occasionally change MEL from version to version.
Also, new MEL commands are sometimes added but it's usually just additions of new scripts in the \others\ script folder rather than new actual commands...

:nathaN