Hello,How can select these Cubes in groups use python


#1

picture

like the picture,i try cmds.select(“group2”, hierarchy=True),all things in group2 selected…but the “group” cannt bake animation.i want bake cubes animation and export to FBX


#2

Maybe I don’t understand the question, but if you do this it at least lists both the group nodes and the cube nodes:

import maya.cmds as cmds

main_selection = cmds.ls(sl=True)
selection = cmds.select(hierarchy = True)
new_selection = cmds.ls(sl = True)
print (new_selection)