wow i was wrapped once i got it working, but yet again another road block.
It worked and soon as i added variables for translate,rotate and scale??
thanks i have almost got through this first video haha
anyways heres the code
_________________________________________________________________
import maya.cmds as cmds
widgets = {}
def UI():
if cmds.window("tabTest", exists = True):
cmds.deleteUI("tabTest")
widgets["window"] = cmds.window("tabTest", title = "Character Tabs Test", w = 400, h = 600, mxb = False, mnb = False)
mainLayout = cmds.columnLayout(w = 400, h = 600)
widgets["tabLayout"] = cmds.tabLayout(imw = 5, imh = 5)
#find all the character namespaces in the scene create UI for each
findNameSpaces()
cmds.showWindow(widgets["window"])
def findNameSpaces():
cmds.namespace(setNamespace = ":")
namespaces = cmds.namespaceInfo(listOnlyNamespaces = True)
for namespace in namespaces:
if cmds.objExists(namespace + ":*"):
#create a tab
widgets[(namespace + "_tab")] = cmds.columnLayout(w = 400, h = 600, parent = widgets["tabLayout"])
#create attr field grps for translate rotate and scale
cmds.separator(h = 10, style = "none")
widgets[(namespace + "_attrFG_T")] = cmds.attrFieldGrp(attribute = (namespace + ":null.translate"))
widgets[(namespace + "_attrFG_R")] = cmds.attrFieldGrp(attribute = (namespace + ":null.rotate"))
widgets[(namespace + "_attrFG_S")] = cmds.attrFieldGrp(attribute = (namespace + ":null.scale"))
#edit the tab name
cmds.tabLayout(widgets["tabLayout"], edit = True, tabLabel = (widgets[(namespace + "_tab")], namespace))
_____________________________________________________________________________________________________
error from script editor
Error: Could not find vector attribute named Bob:null.translate.
# Traceback (most recent call last):
# File "", line 3, in
# File "C:/Users/Jason/Documents/maya/scripts\tabTest.py", line 18, in UI
# findNameSpaces()
# File "C:/Users/Jason/Documents/maya/scripts\tabTest.py", line 39, in findNameSpaces
# widgets[(namespace + "_attrFG_T")] = cmds.attrFieldGrp(attribute = (namespace + ":null.translate"))
# RuntimeError: Could not find vector attribute named Bob:null.translate. #
_____________________________________________________________________________________________________
Cheers
Joe