Message 1 of 2
Insert UI elements into existing layouts

Not applicable
10-01-2019
02:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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!