PDA

View Full Version : [C++] Creating simple window without using MEL and Qt libs


SzyK
12-16-2010, 11:06 AM
Hello everyone!

I'm new to Maya API and I'd be thankful for some piece of advice.

I used to script using MEL and in further work it appears that I'll need more complex custom window with my own UI elements.

I have started to get to know with Maya API specification and OpenGL and as far, as I understood:

-In maya API I can only create windows and UI elements using MEL commands or Qt libraries


My questions is:


Do I really need to buy Qt commercial license (plugin will be used by a company in which I work) or is there another way to go with my problem?

I have created simple window by executing MEL commands in code:

#include <maya/MSimple.h>
#include <maya/MGlobal.h>
DeclareSimpleCommand( ApiWindow, "", "2011");
MStatus ApiWindow::doIt( const MArgList& args )
{
MString okienko("window");
MString rezultat;

MGlobal::executeCommand(okienko,rezultat,true,false);
MGlobal::executeCommand(("showWindow "+rezultat),true,false);

MStatus stat = MS::kSuccess;
setResult( "ApiWindow command executed!\n" );
return stat;
}

So, is it possible to achieve the same thing without MEL and Qt?

greets Szymon K.

zoharl
12-21-2010, 11:10 AM
When you write a plug-in you can use whatever you like. For example if you use C++ on windows, you can use glut, winapi, mfc, even the open source QT for opening windows or do whatever is on your mind. Basically you are not limited only to maya environment.

CGTalk Moderation
12-21-2010, 11:10 AM
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.