just wondering if any of the more technical maya users, know if there is a way to pass on a variable from your python script to a function your accessing through the maya.mel.eval() method.
haveing a problem with the "attributExists" mel function not being available in python, so im trying to get it doing something like.
import maya.cmds as cmds
import maya.mel as mel
mel.eval('attributeExists, "Tag", item' )
i just dont got anyway to get the needed information into the mel $item variable from the one that exists in my python script.
Replies
as 1 big string, not like arguments so all i had to do was drop in a ' before the item variable and add the variable to the string.
thanks anyways just me having a slow day and the syntax for running mel commands from python is pretty bad.
ya i looked up the mel code for that function, and will write myself a py version tomorrow morning when i get back to this.
im actully haveing a similar problem again, with FBXExport, there seems to be no python way expect mel.eval to get to it, and it's is supplied by a mll modual not a mel file so i cant just re-write it.
was thinking
would get me what i want but that doesn't work, only way i got it to work was just writing out my path, instead of using my variable that is set via my scripts UI.
aside from the mel.eval stuff im really loving python for maya scripts over mel, though. A lot cleaner code and very easy language to learn.