Debugging Maya plug-ins: can't get output or debugger to engage

Posted by brainjam on Stack Overflow See other posts from Stack Overflow or by brainjam
Published on 2010-04-23T16:23:22Z Indexed on 2010/04/23 17:43 UTC
Read the original article Hit count: 411

Filed under:
|
|
|
|

I'm not a total beginner at Maya, but this is my first time trying to write a plug-in for it. I've downloaded the 30-day eval version of Maya2011 (32bit version on 64bit Windows 7), and have tried building a couple of plug-ins with VC 2008 Express.

The first one is helloWorldCmd from the sample directory ..\devkit\plug-ins, and it basically doesn't work until you convert the line cout<<"Hello World"<<endl; to cerr<<"Hello World"<<endl;, but I can live with that.

The second one is the SelectRingContext2 example from David Gould's book. The plug-in works as advertised, but I cannot get any debugging output from it. I've tried putting cout, cerr,printf, and MGlobal::displayInfo into the doIt() method, and can't get a peep. I also haven't figured out how to run the plug-in in a debugger.

I'm afraid I'm missing something easy but slightly obscure, like a flag somewhere. Anybody out there have any hints?

Edit: Turns out the action is happening in the redoIt() method. So I can get MGlobal::displayInfo and cerr producing output. Still don't know why cout and printf don't work, and I'm not sure how to run in the debugger. When I run maya -d (which some of the online advice says I should do) it just shows the output window but never loads the rest.

© Stack Overflow or respective owner

Related posts about maya

Related posts about plugins