|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| How to Write a Simple Maya Model Exporter |
|
![]() mokermachine Member since: 2/20/2003 From: Canada |
||||
|
|
||||
| This is a great article. But I just started programming, and was wondering what programming language this is. Some things resemble C++. Or is this a MAYA programming language (MEL). If somebody could tell me I would appreciate it. |
||||
|
||||
![]() Avengr Member since: 8/16/2002 |
||||
|
|
||||
| Im pretty sure its C++ using Maya functions (hence the Maya API) Maya supports both a C++ like Mel scripting and C++ as far as I have heard |
||||
|
||||
![]() Myopic Rhino Staff Member since: The dawn of time
From: Temecula, CA, United States |
||||
|
|
||||
| It's using C++. All of the types proceded with M are just C++ classes definied by the Maya API. Mel scripts look quite a bit different. |
||||
|
||||
![]() talsit Member since: 4/22/2003 |
||||
|
|
||||
| As far as I know, maya included a standalone program with source code to be able to process animation data. I can't quite remember the format it was in, I think it was .Mov, but you can export animation data straight from maya into a seperate file, and then use this program to evaluate the data over time, exactly like maya does it. I got that code, modified it, and put it in my engine to be able to read and evaluate maya animation curves exactly the way it happens in maya, with all the features, like loops, ping-pong, relative, etc, etc.. With an exporter, you can grab all the keyframes and save their data directly. Then, within you engine, you load the keyframes, and construct the animation curve, and you're ready to evaluate the curve at whatever time you wish. The only drawback is that's optimized for forward playback only, going back is slower, hardly noticable, but still. Oh, and the maya code is a bloody nightmare!! :D I got the code somewhere, if anyone wants it. // talsit de cod |
||||
|
||||
![]() Maki Member since: 11/29/2002 From: Canada |
||||
|
|
||||
| There appears to be an undeclared variable 'comp' in extractPolygons() MItMeshPolygon piter( dagPath, comp ); The components list should be retrieved with a call to "MFnMesh:: getConnectedSetsAndMembers" first, comp is an element in the MObjectArray BTW, great article, it's about time someone wrote a tutorial on exporting game art from Maya! |
||||
|
||||
![]() nitzan Member since: 10/16/2001 From: Palo Alto, California |
||||
|
|
||||
| I am trying to compile this example but I get an error on getFileNameToLoad() function. Where is this function located ? Do I have to write it myself ? Thank you Nitzan |
||||
|
||||
![]() tris Member since: 1/9/2004 From: Brisbane, Australia |
||||
|
|
||||
| Does anyone have any info on what this error means? ***** Error: line 1: Could not make connection; could not find source plug 'ikRPsolver.msg' I did have something working but then when I started fresh and tried to write an exporter I started to get this error message. I don't get it in my old project (using the same .mb) just my new one even though the new one has the exact same code copied over. I just tried to create a project using the "Simple Example" from the article and I get the same error. It happens somewhere in this code: MStatus stat = MLibrary::initialize ( "myExporter" ); if ( !stat ) return false; // figure out the file name to open char* fileName = "C:/dude walk.mb"; // prepare Maya to read a new scene file MFileIO::newFile( true ); // read the scene file stat = MFileIO::open( fileName ); if ( !stat ) return false; // remove any temporary data created by Maya while loading // things like the undo list which we won't be using stat = MGlobal::executeCommand( "delete -ch" ); if ( !stat ) return false; Any help would be GREATLY appreciated. Great article by the way, I probably wouldn't have attempted to look at the Maya API otherwise. Thanks again. Edited: OK, I've compiled the app "asciiToBinary" that comes with maya and passed it the same file, I get the same errors. I would say file corruption but it opens fine in maya in the first place and I also have another app i wrote that can open it fine. Who knows? [edited by - tris on May 25, 2004 6:30:59 AM] |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|