gunner89
11-22-2010, 10:16 AM
Hey, i am new to python programming and need some help. I have been asked to create a window which will contain a list of all the objects, cameras and lights in maya. I have done thos but the nodes print out in the script editor and not in the window that i have created. I need them to be in a clolumn view. I also need to specifiy next to its node name what type of object it is. Any help will be greatly appreciated. Thanks
p, li { white-space: pre-wrap; } import maya.cmds as cmds
window = cmds.window( title="Objects, Cameras and Lights")
cmds.columnLayout()
cmds.showWindow(window)
lights = cmds.ls(lt=True)
print lights, cmds.listRelatives(object, p=True)
cameras = cmds.ls(ca=True)
print cameras, cmds.listRelatives(Object, p=True)
objects = cmds.ls(o=True)
print objects, cmds.listRelatives(Object, p=True)
p, li { white-space: pre-wrap; } import maya.cmds as cmds
window = cmds.window( title="Objects, Cameras and Lights")
cmds.columnLayout()
cmds.showWindow(window)
lights = cmds.ls(lt=True)
print lights, cmds.listRelatives(object, p=True)
cameras = cmds.ls(ca=True)
print cameras, cmds.listRelatives(Object, p=True)
objects = cmds.ls(o=True)
print objects, cmds.listRelatives(Object, p=True)
