Insert UI elements into existing layouts

Insert UI elements into existing layouts

Anonymous
Not applicable
565 Views
1 Reply
Message 1 of 2

Insert UI elements into existing layouts

Anonymous
Not applicable

For example I would like to add an button to the shelf and I query the shelf with this:

import maya.cmds as cmds

a = cmds.layout('Shelf', query = True, childArray = True)
b = cmds.layout(a, query = True, childArray = True)
c = cmds.layout(b, query = True, childArray = True)
d = cmds.layout(c[1], query = True, childArray = True)
e = cmds.layout(d[1], query = True, childArray = True)
print e

Its only an example! I would like to add a button by script between 'shelfButton1' and 'shelfButton2', the first and second element of 'e'.
This is a shorter and easier to understand version of my actual problem.
Hope you can help!

0 Likes
566 Views
1 Reply
Reply (1)
Message 2 of 2

olarn
Advocate
Advocate
0 Likes