You can insert the following line into the for loop (at the end) to add the subgroups: editRenderLayerMembers -noRecurse ( "l" + ($i+1)) $subGroups[$i];
So yeah, the window and the buttons were fine, but they weren't necessary. A couple of other things: Your two procs were doing the exact same thing. Not sure why. I would suggest avoiding naming procs that are also the same as Maya's default commands, such as rename. That'll give you all sorts of errors. A couple notes on…
It looks like you have code for a window that comes up with buttons that run other procedures. Depending on those procedures, you might be able to just put them into the for loop and forgo the window entirely // stores current selection (main group)string $mainGroup[] = `ls -sl`;// lists all children (sub groups)string…
Hey, sorry about that error. My code was missing a big dumb dollar sign for a variable, haha! Here's a reformatted code with your buttons integrated into the FOR loop: // stores current selection (main group)string $mainGroup[] = `ls -sl`;// lists all children (sub groups)string $subGroups[] = `listRelatives -c…