(sorry for my english)
I'm having a hard time about this. So my problem is, when i just create a window and put some controls (textField, textFieldGrp) in it. Editing or querying with class methods is not a problem. but when i use dockControl to build my ui, maya cannot find "_grp" controls
here i post some code:
textField querying is working, but textField querying is not (error message below)
maya can't find the control. even i print its name and its same as the name in the error message.
is it a known bug ?
(by the way, if i change textFieldGrp command to textField, it works)
(and if i change this to a window (not dock) it works either)
import maya.cmds as mc
class SimpleUI(object):
def __init__(self, *args):
self.wg={}
self.wg['win'] = 'MySimpleWindow'
self.wg['dock'] = 'MySimpleDock'
if mc.dockControl(self.wg['dock'], exists=True):
mc.deleteUI(self.wg['dock'])
# window
mc.window(self.wg['win'])
# layout
mc.rowColumnLayout(nc=1)
""" controls """
mc.button(l='textField_button',
c=self.com_button_command)
# this works
self.wg['textField'] = mc.textField()
mc.button(l='textFieldGrp_button',
c=self.com_grp_button_command)
# this does not work
self.wg['textFieldGrp'] = mc.textFieldGrp()
mc.dockControl(self.wg['dock'],
area='left',
content=self.wg['win'])
def com_button_command(self, *args):
# this works
mc.textField(self.wg['textField'], e=True, tx='blabla')
def com_grp_button_command(self, *args):
# this does not work
mc.textFieldGrp(self.wg['textFieldGrp'], e=True, tx='blabla')
SimpleUI()
"""Error Code"""
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/195e1b55-5bcb-4248-8a63-7b13d6d90bf2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CADvbQw%2BzAPuEZk8L-BEWUCHvievsh4PtwCo3hW4zMH_7AWJCHA%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/195e1b55-5bcb-4248-8a63-7b13d6d90bf2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Bests,madoodia
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.