PDA

View Full Version : helloWorld & helloWorldCmd plugins load, don't get the expected output though


nyiotis
05-27-2012, 01:21 PM
I'm testing my new plug-in development environment maya2011, mac os x 10.6.8.
I successfully compile and load the
helloWorldCmd and helloCmd plug-ins (found in /Autodesk/maya2011/devkit/plug-ins)

When I run helloWorld in MEL I get no output (should get "Hello World" based on the helloWorldCmd.cpp) and no error either.

Same result (neither output, nor error) If I go with
from maya.cmds import *
helloWorld() in Python.


Any ideas?
thanks!

earlyworm
05-27-2012, 02:30 PM
I believe the helloWorld example used in the devkit Maya outputs to standard output rather than the script editor history. In Windows standard output would be the Output Window and in Linux this would be the shell from where you launched Maya, I'm not sure where you'd look for this Mac.

nyiotis
05-27-2012, 03:05 PM
I believe the helloWorld example used in the devkit Maya outputs to standard output rather than the script editor history. In Windows standard output would be the Output Window and in Linux this would be the shell from where you launched Maya, I'm not sure where you'd look for this Mac.

sure. the standard output is the one at the bottom and the right hand side of the Maya window (at the bottom and the left hand side of the Maya window is the script editor, I cannot attach the image). the standard output is empty though..

zeroeffect
05-27-2012, 03:31 PM
If you want to try outputting to the script editor output window change:
cout<<"Hello World"<<endl;
to
MGlobal::displayInfo("Hello World");
don't forget your include
#include <maya/MGlobal.h>

nyiotis
05-27-2012, 04:12 PM
If you want to try outputting to the script editor output window change:
cout<<"Hello World"<<endl;
to
MGlobal::displayInfo("Hello World");
don't forget your include
#include <maya/MGlobal.h>

thanks, that's it

CGTalk Moderation
05-27-2012, 04:12 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.