Thanks for the replay guys: @Adam, I am not sure, will give it a try..
@Chad, the reason I am doing this is hoping if I can have some better call back if hit "ctrl-Z" in maya. I could just run the python command directly, but the ctrl+z would only undo the last step defined in the customClass().doIt() @C. B. Esquire: currently the customClass is in the same file as the caller functions, but I will try to make it a separate file and see how it works, thanks for the suggestion! thanks again! will report after try it in the morning! -ling On Feb 7, 8:27 pm, "C. B. Esquire" <[email protected]> wrote: > if youre in a python module, which is overriding mel procs, this is a > perfectly good reason to use python calls in the proc override > if this is the case, you you can import the module in the same call, to > throw to maya.mel to eval ~ > > cmd = 'python("import > sys;sys.path.append(\'/the/path/to/your/script\');import yourModule; > mayaString=customClass();mayaString.doit()");' > mm.eval(cmd) > > On Tue, Feb 8, 2011 at 4:59 PM, Chad Dombrova <[email protected]> wrote: > > > > cmd = 'python(\"mayaString = customClass()\");' > > > cmd += 'python(\"mayaString.doit()\");' > > > > maya.mel.eval(cmd) > > > wait, i don't get it. why are you using maya.mel.eval to run python code? > > > -chad > > > -- > >http://groups.google.com/group/python_inside_maya > > -- http://groups.google.com/group/python_inside_maya
