# Error: non-keyword arg after keyword arg
# File "<maya console>", line 9
# SyntaxError: non-keyword arg after keyword arg #
import maya.cmds as cmds
cmds.window(w=150, h=100)
cmds.columnLayout(adjustableColumn=True)
form = cmds.formLayout(numberOfDivisions=100)
exportSelection = cmds.optionMenuGrp(label=' Selection Options ', columnWidth=(1, 90))
test1 = cmds.menuItem(label='Export using item selection range', test1_func())
test2 = cmds.menuItem(test2_func(), label='Export using time slide range', test2_func())
startLbl = cmds.text( label='Start' )
start = cmds.textField(startLbl, w = 100, h = 20)
endLbl = cmds.text( label='End' )
end = cmds.textField(endLbl, w = 100, h = 20)
cmds.formLayout(form, edit=True, attachForm=[\
(exportSelection, 'top', 5),\
(exportSelection, 'left', 5),\
(startLbl, 'top', 40),\
(startLbl, 'left', 7),
(start, 'top', 35),\
(start, 'left', 45),
(endLbl, 'top', 60),\
(endLbl, 'left', 7),
(end, 'top', 60),\
(end, 'left', 45)])
def test1_func(*args):
print "option 1 is selected"
def test2_func(*args):
print "option 2 is selected"
cmds.showWindow()
You are seeing that error because you are trying to pass a “non-keyword arg after keyword arg”:
test1 = cmds.menuItem(label='Export using item selection range', test1_func())
test2 = cmds.menuItem(test2_func(), label='Export using time slide range', test2_func())
When you start using keyword args (label=”foo”), you cannot then pass non-keyword args (x, y ,z)
In addition, you are actually executing your functions directly instead of trying to pass the reference to them:
# calling the function
foo(test2_func())
# passing a reference
foo(test2_func)
With those issues aside, you should be able to just pass your function object directly to the command parameter for each menuItem:
test1 = cmds.menuItem(label="foo", command=test1_func)
--
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/64b66ab8-a585-4b25-8322-f62e431daced%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
def __init__(self, transform, startAnimation, endAnimation, cameraObj):
self.fileExport = []
self.initialWindow()
mayaGlobal = OpenMaya.MGlobal()
mayaGlobal.viewFrame(OpenMaya.MTime(1))
for i in range(startAnimation, (endAnimation + 1)):
focalLength = cameraObj.focalLength()
vFilmApp = cameraObj.verticalFilmAperture()
focalOut = 2* math.degrees(math.atan(vFilmApp * 25.4/ (2* focalLength)))
myEuler = OpenMaya.MEulerRotation()
spc = OpenMaya.MSpace.kWorld
trans = transform.getTranslation(spc)
rotation = transform.getRotation(myEuler)
rotVector = OpenMaya.MVector(myEuler.asVector())
self.fileExport.append((str(i) + '\t' + str(trans[0]) + "\t" + str(trans[1]) + "\t" + str(trans[2]) + "\t" + str(math.degrees(rotVector[0])) + "\t" + str(math.degrees(rotVector[1])) + "\t" + str(math.degrees(rotVector[2])) + "\t" + str(focalOut) + "\n"))
mayaGlobal.viewFrame(OpenMaya.MTime(i+1))
def optionMenuCallback(*args):
fn = cmds.menuItem (args[0], q=True, c=True)
if fn:
fn()
def menu1Callback():
print 'menu 1 fired'
startAnimation = cmds.playbackOptions(query=True, minTime=True)
endAnimation = cmds.playbackOptions(query=True, maxTime=True)
def menu2Callback():
print 'menu 2 fired'
startAnimation = cmds.findKeyframe(which='first')
endAnimation = cmds.findKeyframe(which='last')
def initialWindow(self, *args):
w = cmds.window(w=150, h=100, title = "Export Selection" )
cmds.columnLayout(adjustableColumn=True)
form = cmds.formLayout(numberOfDivisions=100)
exportSelection = cmds.optionMenuGrp(label='example', cc=optionMenuCallback)
test1 = cmds.menuItem('item1', c = menu1Callback)
test1 = cmds.menuItem('item2', c= menu2Callback)
cmds.showWindow(w)
def __call__(self):
return self.fileExport
I have kind of manage to get it to work.
This is actually an exporting object plugin but I have got 2 problems.
1. My initial window aren't popping up when I select my object >> File >> Export selection
2. Based on the selection, will it be possible for me to grab the different values based on the menu selection and used it in my __init__ function?
--
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/c63319d6-8853-41be-9277-560018daf3f4%40googlegroups.com.
def __init__(self, transform, startAnimation, endAnimation, cameraObj):
self.fileExport =[]
mayaGlobal = OpenMaya.MGlobal()
mayaGlobal.viewFrame(OpenMaya.MTime(1))
for i in range(startAnimation, (endAnimation + 1)):
focalLength = cameraObj.focalLength()
vFilmApp = cameraObj.verticalFilmAperture()
focalOut = 2* math.degrees(math.atan(vFilmApp * 25.4/ (2* focalLength)))
myEuler = OpenMaya.MEulerRotation()
spc = OpenMaya.MSpace.kWorld
trans = transform.getTranslation(spc)
rotation = transform.getRotation(myEuler)
rotVector = OpenMaya.MVector(myEuler.asVector())
self.fileExport.append((str(i) + '\t' + str(trans[0]) + "\t" + str(trans[1]) + "\t" + str(trans[2]) + "\t" + str(math.degrees(rotVector[0])) + "\t" + str(math.degrees(rotVector[1])) + "\t" + str(math.degrees(rotVector[2])) + "\t" + str(focalOut) + "\n"))
mayaGlobal.viewFrame(OpenMaya.MTime(i))
def __call__(self):
return self.fileExport
You may need to post more of your plugin (and also I probably have a lack of experience with the specific plugin type you are writing), but the structure seems strange to me. I wouldn't expect that you should be doing so much work within the constructor of the class. Is that how the plugin is meant to be written?
Ideally you would show a UI before the plugin executes, and then your plugin would run with the desired parameters being passed. It would be backwards to think that other methods of your class should run first and then supply information to your constructor.
--
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/0a1ae55d-2511-4bc4-8b2e-3bf5f304e226%40googlegroups.com.
class customNodeTranslator(OpenMayaMPx.MPxFileTranslator):
def __init__(self):
OpenMayaMPx.MPxFileTranslator.__init__(self)
def haveWriteMethod(self):
return True
def haveReadMethod(self):
return True
def filter(self):
return "*.chan"
def defaultExtension(self):
return "chan"
def writer( self, fileObject, optionString, accessMode ):
try:
fullName = fileObject.fullName()
fileHandle = open(fullName,"w")
selectList = OpenMaya.MSelectionList()
OpenMaya.MGlobal.getActiveSelectionList(selectList)
node = OpenMaya.MObject()
depFn = OpenMaya.MFnDependencyNode()
path = OpenMaya.MDagPath()
iterator = OpenMaya.MItSelectionList(selectList)
animationTime = OpenMayaAnim.MAnimControl()
maxTime = int(animationTime.maxTime().value())
minTime = int(animationTime.minTime().value())
while (iterator.isDone() == 0):
iterator.getDependNode(node)
depFn.setObject(node)
iterator.getDagPath(path, node)
cameraObject = OpenMaya.MFnCamera(path)
transform = OpenMaya.MFnTransform(path)
chanMe = fileExporter(transform, minTime, maxTime, cameraObject)
...
...
class fileExporter():
""" module for exporting chan files from application. arguments: object, startFrame, endFrame """
fileExport = []
def __init__(self, transform, startAnimation, endAnimation, cameraObj):
mayaGlobal = OpenMaya.MGlobal()
--
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/3ce88cb8-1fc9-4fab-ac69-cc40c143466c%40googlegroups.com.
Did you have a look at the documentation?
http://download.autodesk.com/us/maya/2011help/CommandsPython/optionMenuGrp.html#flagchangeCommand
You can attach a callback to the changeCommand and then use a query flag to get the value of the optionMenuGrp selected item. The callback may pass you the selected value but I don't remember
--
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/27ba17c4-a696-43e2-b5c1-fa50f244d2cf%40googlegroups.com.
import math, sys, string, os
import maya.OpenMaya as OpenMaya
import maya.OpenMayaMPx as OpenMayaMPx
import maya.OpenMayaAnim as OpenMayaAnim
import maya.cmds as cmds
import maya.mel as mel
kPluginTranslatorTypeName = "chan Export/Import"
kVersionNumber = "0.5a"
camSel = []
start = []
end = []
win_name = "chan_window"
class CustomNodeTranslator(OpenMayaMPx.MPxFileTranslator):
def __init__(self):
OpenMayaMPx.MPxFileTranslator.__init__(self)
def haveWriteMethod(self):
return True
def haveReadMethod(self):
return True
def filter(self):
return "*.chan"
def defaultExtension(self):
return "chan"
def writer( self, fileObject, optionString, accessMode ):
self.exportWin()
try:
fullName = fileObject.fullName()
fileHandle = open(fullName,"w")
selectList = OpenMaya.MSelectionList()
OpenMaya.MGlobal.getActiveSelectionList(selectList)
node = OpenMaya.MObject()
depFn = OpenMaya.MFnDependencyNode()
path = OpenMaya.MDagPath()
iterator = OpenMaya.MItSelectionList(selectList)
animationTime = OpenMayaAnim.MAnimControl()
maxTime = int(animationTime.maxTime().value())
minTime = int(animationTime.minTime().value())
while (iterator.isDone() == 0):
iterator.getDependNode(node)
depFn.setObject(node)
iterator.getDagPath(path, node)
cameraObject = OpenMaya.MFnCamera(path)
transform = OpenMaya.MFnTransform(path)
chanMe = fileExporter(transform, minTime, maxTime, cameraObject)
for all in chanMe():
fileHandle.write(all)
iterator.next()
fileHandle.close()
except:
sys.stderr.write( "Failed to write file information\n")
raise
def test1On(self, *args):
print "User checked option1"
cmds.checkBox(self.chk2, edit = True, enable = False)
startAnimation = cmds.playbackOptions(query=True, minTime=True)
endAnimation = cmds.playbackOptions(query=True, maxTime=True)
start.append(startAnimation)
end.append(endAnimation)
def test1Off(self, *args):
print "User un-checked option1"
cmds.checkBox(self.chk2, edit = True, enable = True)
del start[:]
del end[:]
def test2On(self, *args):
print "User checked option2"
cmds.checkBox(self.chk1, edit = True, enable = False)
startAnimation = cmds.findKeyframe(which='first')
endAnimation = cmds.findKeyframe(which='last')
start.append(startAnimation)
end.append(endAnimation)
def test2Off(self, *args):
print "User un-checked option2"
cmds.checkBox(self.chk1, edit = True, enable = True)
del start[:]
del end[:]
def test3(self, *args):
chkVal1 = cmds.checkBox(self.chk1, query=True, value=True)
chkVal2 = cmds.checkBox(self.chk2, query=True, value=True)
if chkVal1 == 1:
print "opt1 Pressed!"
print start
print end
elif chkVal2 == 1:
print "opt2 Pressed!"
print start
print end
else:
cmds.warning("Check an option")
def exportWin(self):
w = cmds.window(w=150, h=100, title = "Export Selection" )
cmds.columnLayout( adjustableColumn=True )
form = cmds.formLayout(numberOfDivisions=100)
self.chk1 = cmds.checkBox( label='option1', onc = self.test1On, ofc = self.test1Off )
self.chk2 = cmds.checkBox( label='option2', onc = self.test2On, ofc = self.test2Off )
self.okayBtn = cmds.button(label='okay!', command=self.test3, width=150, height=35)
cmds.formLayout(form, edit=True, attachForm=[\
(self.chk1, 'top', 15),\
(self.chk1, 'left', 15),\
(self.chk2, 'top', 30),\
(self.chk2, 'left', 15),\
(self.okayBtn, 'top', 50),\
(self.okayBtn, 'left', 15)])
cmds.showWindow( w )
def processLine( self, lineStr ):
self.importTheChan.writeFrameData(lineStr)
def reader(self, fileObject, optionString, accessMode):
self.initialWindow()
try:
# Empty out any existing captured info in camSel list to have a clean import
camSelClear = camSel
del camSelClear[:]
fullPath = fileObject.fullName()
self.fileHandle = open(fullPath,"r")
camHandle = self.fileHandle
camBaseName = os.path.basename(camHandle.name)
camName = os.path.splitext(camBaseName)[0]
# Imported camera will not have any animation unless Rotation Order is selected
cameraName, cameraShape = cmds.camera(n=str(camName))
camSel.extend((cameraName, cameraShape))
cmds.scale(0.5, 0.5, 0.5)
except:
sys.stderr.write( "Failed to read file information\n")
raise
self.fileObject = fileObject
self.optionString = optionString
self.accessMode = accessMode
class fileExporter():
""" module for exporting chan files from application. arguments: object, startFrame, endFrame """
def __init__(self, transform, startAnimation, endAnimation, cameraObj):
print ">>> Exporting..."
self.fileExport = []
mayaGlobal = OpenMaya.MGlobal()
mayaGlobal.viewFrame(OpenMaya.MTime(1))
# Capture the animation keyframes within the selection instead of the range from time slider
#startAnimation = cmds.findKeyframe(which='first')
#endAnimation = cmds.findKeyframe(which='last')
# Converts the float arguement into integer
for i in range(int(startAnimation), int(endAnimation + 1)):
focalLength = cameraObj.focalLength()
vFilmApp = cameraObj.verticalFilmAperture()
focalOut = 2* math.degrees(math.atan(vFilmApp * 25.4/ (2* focalLength)))
myEuler = OpenMaya.MEulerRotation()
spc = OpenMaya.MSpace.kWorld
trans = transform.getTranslation(spc)
rotation = transform.getRotation(myEuler)
rotVector = OpenMaya.MVector(myEuler.asVector())
self.fileExport.append((str(i) + '\t' + str(trans[0]) + "\t" + str(trans[1]) + "\t" + str(trans[2]) + "\t" + str(math.degrees(rotVector[0])) + "\t" + str(math.degrees(rotVector[1])) + "\t" + str(math.degrees(rotVector[2])) + "\t" + str(focalOut) + "\n"))
mayaGlobal.viewFrame(OpenMaya.MTime(i+1))
def __call__(self):
return self.fileExport
def radianToDegree(self, radians):
outDegrees = 0.0
outDegrees = (float(radians) / (math.pi))*180
return outDegrees
# creator
def translatorCreator():
return OpenMayaMPx.asMPxPtr( CustomNodeTranslator() )
# initialize the script plug-in
def initializePlugin(mobject):
mplugin = OpenMayaMPx.MFnPlugin(mobject)
try:
mplugin.registerFileTranslator(kPluginTranslatorTypeName, None, translatorCreator)
except:
sys.stderr.write( "Failed to register translator: %s" % kPluginTranslatorTypeName )
raise
# uninitialize the script plug-in
def uninitializePlugin(mobject):
mplugin = OpenMayaMPx.MFnPlugin(mobject)
try:
mplugin.deregisterFileTranslator( kPluginTranslatorTypeName )
except:
sys.stderr.write( "Failed to deregister translator: %s" % kPluginTranslatorTypeName )
raise
I'm pretty sure it is because you are calling showWindow() in your exportWin, which shows the dialog but does not block. So the rest of your export happens right away.
What you probably want to do is one of two options:
Either have exportWin be the last line of your writer method, and allow it to actually trigger the export command when the user accepts the dialog
Or use a layoutDialog to launch your UI so that it actually blocks. Then it can collect your options, and continue in the writer method with your parameters.
In both of these cases, the fact that you are doing all of your work within the constructor of your fileExport class isn't really related. The problem at this stage is that you are immediately jumping past your shown dialog.
...
Your exportWin function creates a window and shows it, right? Once that window is shown, your exportWin will return and the execution will continue through the rest of your writer. I think you are thinking the window should wait to collect input, but it does not.
If you want to use a dialog to collect input then you have to somehow wait until the input is collected before the rest of the writer logic occurs
--
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/61b71a2b-463e-4b33-86af-b18db58c7402%40googlegroups.com.
import math, sys, string, os
import maya.OpenMaya as OpenMaya
import maya.OpenMayaMPx as OpenMayaMPx
import maya.OpenMayaAnim as OpenMayaAnim
import maya.cmds as cmds
import maya.mel as mel
kPluginTranslatorTypeName = "chan Export/Import"
kVersionNumber = "0.5a"
class CustomNodeTranslator(OpenMayaMPx.MPxFileTranslator):
def __init__(self):
OpenMayaMPx.MPxFileTranslator.__init__(self)
def haveWriteMethod(self):
return True
def haveReadMethod(self):
return True
def filter(self):
return "*.chan"
def defaultExtension(self):
return "chan"
def writer( self, fileObject, optionString, accessMode ):
try:
fullName = fileObject.fullName()
fileHandle = open(fullName,"w")
selectList = OpenMaya.MSelectionList()
OpenMaya.MGlobal.getActiveSelectionList(selectList)
node = OpenMaya.MObject()
depFn = OpenMaya.MFnDependencyNode()
path = OpenMaya.MDagPath()
iterator = OpenMaya.MItSelectionList(selectList)
animationTime = OpenMayaAnim.MAnimControl()
maxTime = int(animationTime.maxTime().value())
minTime = int(animationTime.minTime().value())
while (iterator.isDone() == 0):
iterator.getDependNode(node)
depFn.setObject(node)
iterator.getDagPath(path, node)
cameraObject = OpenMaya.MFnCamera(path)
transform = OpenMaya.MFnTransform(path)
chanMe = fleExporter(transform, minTime, maxTime, cameraObject)
for all in chanMe():
fileHandle.write(all)
iterator.next()
fileHandle.close()
except:
sys.stderr.write( "Failed to write file information\n")
raise
def processLine( self, lineStr ):
self.importTheChan.writeFrameData(lineStr)
class fileExporter():
def __init__(self, transform, startAnimation, endAnimation, cameraObj):
self.start = ""
self.end = ""
self.fileExport = []
self.exportWin()
def exportWin(self):
print ">>> Running Exporting UI"
self.expWindow = cmds.window(w=150, h=100, title = "Export Selection" )
cmds.columnLayout( adjustableColumn=True )
form = cmds.formLayout(numberOfDivisions=100)
cmds.radioCollection()
self.chk1 = cmds.radioButton( label='option1', onc = self.opt1On, ofc = self.opt1Off )
self.chk2 = cmds.radioButton( label='option2', onc = self.opt2On, ofc = self.opt2Off )
self.okayBtn = cmds.button(label='okay!', command=self.runSel, width=150, height=35)
cmds.formLayout(form, edit=True, attachForm=[\
(self.chk1, 'top', 15),\
(self.chk1, 'left', 15),\
(self.chk2, 'top', 30),\
(self.chk2, 'left', 15),\
(self.okayBtn, 'top', 50),\
(self.okayBtn, 'left', 15)])
cmds.showWindow( self.expWindow )
def opt1On(self, *args):
print "User checked option1"
startAnimation = cmds.playbackOptions(query=True, minTime=True)
endAnimation = cmds.playbackOptions(query=True, maxTime=True)
self.start = startAnimation
self.end = endAnimation
def opt1Off(self, *args):
print "User un-checked option1"
cmds.radioButton(self.chk2, edit = True, enable = True)
self.start = ""
self.end = ""
def opt2On(self, *args):
print "User checked option2"
startAnimation = cmds.findKeyframe(which='first')
endAnimation = cmds.findKeyframe(which='last')
self.start = startAnimation
self.end = endAnimation
def opt2Off(self, *args):
print "User un-checked option2"
self.start = ""
self.end = ""
def runSel(self, *args):
chkVal1 = cmds.radioButton(self.chk1, query=True, sl=1)
chkVal2 = cmds.radioButton(self.chk2, query=True, sl=1)
if chkVal1 == 1:
print "opt1 Pressed!"
print self.start
print self.end
self.test()
elif chkVal2 == 1:
print "opt2 Pressed!"
print self.start
print self.end
self.test()
else:
cmds.warning("Check an option")
def test(self):
# NameError: global name 'transform' is not defined #
self.actualExp(transform, self.start, self.end, cameraObj)
def actualExp(self, transform, startAnimation, endAnimation, cameraObj):
mayaGlobal = OpenMaya.MGlobal()
mayaGlobal.viewFrame(OpenMaya.MTime(1))
# Converts the float arguement into integer
sys.stderr.write( "Failed to deregister translator: %s" % kPluginTranslatorTypeName )
raise
This should be a pretty easy fix. In your constructor to the fileExporter class, you accept 4 arguments, but you don't save any of them, so they are lost:
#---------
class fileExporter():
def __init__(self, transform, startAnimation, endAnimation, cameraObj):
self.start = ""
self.end = ""
self.fileExport = []
self.exportWin()
#---------
But if you saved them, then your gui can still update some of them, and, you will have saved the transform to reference later:
#---------
class fileExporter():
def __init__(self, transform, startAnimation, endAnimation, cameraObj):
self.transform = transform
self.start = startAnimation
self.end = endAnimation
self.cameraObj = cameraObj
self.fileExport = []
self.exportWin()
...
def test(self):
self.actualExp(self.transform, self.start, self.end, self.cameraObj)
#---------
Once you had fixed the transform, you would have seen the same error about the cameraObj
--
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/9c278912-ebec-427e-be9b-43741a99c7ef%40googlegroups.com.
I don't see in your last example where your custom fileExporter class supports iteration, where you loop over it and write something to a file. Seems your example contains bits and pieces of things that are either not used or not defined.
What are you expecting retuning that self.fileExport to do?
Your question is unclear.
--
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/6337db5c-3b48-4932-848f-c9230ce1e1f8%40googlegroups.com.
I don't see in your last example where your custom fileExporter class supports iteration, where you loop over it and write something to a file. Seems your example contains bits and pieces of things that are either not used or not defined.
What are you expecting retuning that self.fileExport to do?
Your question is unclear.
On 21/10/2014 11:34 PM, "likage" <dissid...@gmail.com> wrote:
Thanks, turns out I also need to retweak a few stuff in my other functions.--
However, while the information capturing and all seems to be working, rather I got issues with the exporting.
It does creates a file but it is of zero bytes size and I noticed that the following function wasn't exactly being used in any events
I tried adding it into the __init__, though it is 'reading' but it is not doing much of anything...
def __call__(self):
return self.fileExport
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.
I don't know man. If you want to post another full updated version of your code on pastebin and point out lines, I am sure someone will take a look. But I don't think you will get much more detailed help at this point because no one really knows your code but you.
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/cb22bc6a-4a69-4cab-9327-134fc78a737f%40googlegroups.com.