rowLayout slightly broken in Maya 2024.1

rowLayout slightly broken in Maya 2024.1

FirespriteNate
Advocate Advocate
563 Views
3 Replies
Message 1 of 4

rowLayout slightly broken in Maya 2024.1

FirespriteNate
Advocate
Advocate

so it seems rowLayout is slightly broken in Maya 2024. "Adjustable" columns no longer auto-adjust when paired with the raw cw= flag (as opposed to the more "convenient" cw3= alternative).

 

Here's some example code. it should display a window with TWO "identical" rowLayouts. This works fine in all versions of Maya from 2017-2023, but not in 2024, as the second row doesn't auto-scale the field like it's supposed to.

 

window = cmds.window()
cmds.columnLayout(adj=True)

cmds.rowLayout(nc=3, cw3=(50, 1, 50), adj=2)
cmds.text(l='Filter')
cmds.textField()    # this should auto-adjust (column:2)
cmds.button(l='OK')
cmds.setParent('..')

cmds.rowLayout(nc=3, cw=((1, 50), (2, 1), (3, 50)), adj=2)
cmds.text(l='Filter')
cmds.textField()    # this should auto-adjust (column:2)
cmds.button(l='OK')
cmds.setParent('..')

cmds.setParent('..')

cmds.showWindow(window)

 

it's still working fine using "cw3", but this is not a viable workaround for me as one of my UIs has 7 or 8 elelments in the rowLayout.

0 Likes
Accepted solutions (1)
564 Views
3 Replies
Replies (3)
Message 2 of 4

brentmc
Autodesk
Autodesk
Accepted solution

Hi,

I can confirm that there were some bug fixes made for rowLayout adjustable columns in Maya 2024.

I don't remember the exact details but the workaround is quite simple. Don't supply a width for adjustable columns so you need to remove the (2, 1) argument from the list passed to cw.

 

 

cmds.rowLayout(nc=3, cw=((1, 50), (3, 50)), adj=2)

 

Brent McPherson
Principle Engineer
Message 3 of 4

FirespriteNate
Advocate
Advocate
Thanks Brent, I can confirm that does "fix" it, and the change still works in older versions too.
To be fair, it does make more logical sense to OMIT the width in this case, rather than set it to some arbitrary value just for the sake of it.
Many thanks
Message 4 of 4

brentmc
Autodesk
Autodesk

Hi Nathan,

Just a quick update to say we are now treating this as a bug since it has the potential to break other row layouts.

Thanks.

Brent McPherson
Principle Engineer