Hi Aviraj, I think your error is occurring because you are using an integer in line 5 instead of a float
code should be : import maya.cmds as mc pdStatus = mc.promptDialog(message="Merge Threshold", button="OK") if pdStatus == "OK": numThresh = mc.promptDialog(query=True, text=True) numThresh = float(numThresh) mc.polyMirrorFace(mt=numThresh) hope this helps - Ben On 27/02/2013, at 7:35 PM, Aviraj Mahadik <[email protected]> wrote: > I am trying to create tool using python. I am completely new to python. > please help. > Code is: > > import maya.cmds as mc > pdStatus = mc.promptDialog(message="Merge Threshold", button="OK") > if pdStatus == "OK": > numThresh = mc.promptDialog(query=True, text=True) > numThresh = int(numThresh) > mc.polyMirrorFace(mt=numThresh) > > And following error occurs: > > # Error: ValueError: file <maya console> line 5: invalid literal for int() > with base 10: '0.01' > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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 [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
