- New M2L_MDD generic LScript. Converts existing M2L format into an MDD file to be used with LW's MD_Plug Displacement Plugin.
- Corrected major ommittance of how M2L_MDD writes the MDD format.
- Combined the two scripts into one. UI and export functions
are now in one script.
- Previous Maya2LW rotation transforms will not yield the correct rotation when importing to LW due to the difference in their rotation methods. Using the transformation matrix instead.
05.10.05 (rev 2.0.1)
- New proprietary binary format called *.m2md (Maya-to-MotionDesigner). However, this can be a little misleading. The file it outputs it NOT readily readable by LW's MD_Plug. This file must go through a converter to work. You might be wondering why this is so. Unfortunately, there is no direct way for MEL to write out four byte floats. It defaults at 8 bytes (doubles), and the order is Intel. The MDD file format requires not only four bytes, but is in Motorola order. I've opted to use LScript to rearrange the order and scale down the float values to four bytes.
- The new LScript is called M2MD_MDD_ConverterGN.ls
- *.m2l files are now binary. Obviously, this is a totally different format. Currently, the m2l format is designed to carry transform attributes and, in the next revision, cameraShape attributes (e.g. focal length, focal distance, etc). Again, cameraShape attributes are not exportable at the moment.
- Removed the object type Light from exportable items. This exclusion is part of the development vision I have for Maya2LW. Please refer to the Development Plan section for more information.
- Replaced the Light type with Transforms for export. Transforms carry only transform attributes, obviously. The interface mechanism to pinpoint valid transform nodes with parents is not fully tested. Hence, for this revision, export only transform nodes without parents. Only Translate, Rotation and Scaling attribs are exported. (As stated in entry 05.08.05, rotations are expressed in matrices to be recalculated back into LW's HPB.)
- Removed LW Scene file creation. See Development Plan for explanation.
- Removed previous Maya2LW LScripts that controlled displacement, channels, and motion. See Development Plan for explanation.
- Temporarily disabled OBJ export. Will add this back soon (e.g. next rev) as a separate export option when relevant interface mechanisms have been sorted out.
02.19.05 (rev 2.0.2)
- Maya2LW Scene Controller v1.0. Master-class LScript. Handles all M2L importation functions. See separate documentation for details.
- Added frame stepping for Maya export.
- M2MDD_MDD_CoverterGN can now batch convert multiple M2MDD files.
- M2L file format included under ..\_notes
02.30.05 (rev 2.0.3)
- Improved name handling. Previously, the MEL script could not handle nested nodes that contained "_" characters.
- Added Tutorial On Basic Export for animation with LightWave subdivision surfaces.
- Brought back the OBJ Export and added two options with it: Original or Deformed. With Original, the script attempts to locate the original mesh of the current shape node. Since shape nodes can be inputted by many deformers which can subsequently be inputted with different meshes, tracking down the intended original mesh is fraught with errors. The script will default by searching for a node containing the name of your shape node plus the word "Orig". If the script finds it, then it is this mesh that gets outputted as an OBJ file. With Deformed, the selected shape node, along with its current deformations is exported. This serves little use however. Please read tutorial on Tutorial On Basic Export for more info.
- If nothing is checked in the interface, the script will now get the currently selected items and process it. Items which do not fit the supported types will be ignored. As a tip: you may store a set of items in a Quick Select Set, or store a series of MEL commands into the toolbar. This way it will be easier to export a group of objects altogether.
- Maya2LW Scene Controller v1.0.1. Fixed importation problems regarding rotations.
- Sven Pampel has contributed a simple, but uber-useful M2MD > MDD converter (M2MD_M2L.exe), which is utitlised by the MEL script to automatically convert the generated M2MD files into MDD. The MEL script will now clean up the M2MD files, so all that is left are the usuable MDDs. Kudos to Sven for finally allowing MDD files to be generated directly out of Maya. (Source code included).
- You must put the M2MD_M2L.exe file into a system path. A safe bet would be the \bin directory of Maya.
- Short names are again now possible by checking the box under the Misc popdown. But I have not coded this with the possibility of non-unique names. Please be advised.
- Added a Generic LScript (ApplyMD_PlugGN.ls) that will batch apply MD_Plug on every object in the scene. The script will prompt you for a LightWave scene file to process, and will output a user-specified scene file.
- Added a Modeler LScript (SaveLWOsEnMasse.ls) that will take a series of OBJs (or any Modeler-loadable format) and automatically save them as LWOs (e.g. no prompts). Extensions are renamed.
03.02.05 (rev 22.214.171.124)
- released this patch due to a problem reported by Daniel Smith regarding cameraShape / transform export / import problems. This mainly due to file format changes that I failed to coordinate between the two. please use only rev 126.96.36.199 (and not versions before) with Maya2LW_SceneController_v102 only. I am putting the older revisions into a directory called oldstuffs just to keep it from confusing everyone.
- The transformation matrix method that I used did not hold up to rotations that go more than 360 degrees. I opted for a way, instead, to convert the rotation order into the LW standard. An important note: Maya defaults to the "xyz" rotation order. LW's standard is "zxy". While the MEL will try to resolve "xyz" rotations to "zxy", it will not always yield the best results. Before animating, please use the "zxy" rotational order to best comply with LightWave. The rotation order for the transform node is accessed via popdown in the Attribute Editor, or by using the Channel Editor, you can place the rotateOrder attribute in your Channel Box. The MEL exporter (rev 2.0.4) and the LW importer (rev 1.0.2) have been updated to reflect these changes. Please do not use older M2L files since the LScript will not grok it.
- However, there is an alternate way of getting camera transformation into LW regardless of what rotation order you have. Simply parent a locator to the camera and move it in front of the camera. Export this locator as a transform node. In LW use this as the target for the camera, whose transform node should also be exported.
- Added an option to keep the outputted M2MD files. Previously, by default, M2MD files were deleted after export.
- MEL script now checks if the output directory is valid. Should have done this a long time ago.
03.10.05 (rev 2.1)
- Maya2LW_SceneController_v203: initial source start and source end parameters are now automatically set based on the original data contained in the M2L file.
- Maya particles are now exportable (being a new feature, please treat this part as a beta). Just like M2MD files, particles first go through a proprietary particle file format called M2PX. After these files have been generated, the MEL automatically executes M2PX_PFX.exe, which converts the M2PX files into one PFX file. This PFX is then used by ParticleFX. You will have to option to automatically clean up the M2PX files after processing. Since the number of M2PX files will tally with the number of particles that would have existed during simulation, I highly recommend using this option (e.g. uncheck Keep M2PX).
- Particles will be exported to a /particles sub-directory. If this directory does not exist under your specified Export Directory, one will be created for it.
- By the way, M2PX files will be put in the particles directory under another subdirectory called /_maya2lw_a_very_temporary_directory/, which is named as such to lessen the chance of it writing into another directory. Make sure you have no such directory before exporting particles ;). Furthemore, on the off-chance you want to keep the M2PX files (which, in effect, does not remove the temp directory), make sure you relocate them to another directory before exporting again. The MEL simply appends existing files in that directory, and will generate bad PFX files if the data is mixed up from a previous export. The final PFX file will be saved into the /particles directory.
- M2PX_PFX.exe (my very first C program ;) )must be placed in a system directory. I recommend your Maya/bin directory.
- Note regarding Maya particle export: to acommodate ParticleFX's grokking behavior, particles that are born on the last frame of the export timeline are not exported.
- Added an interruptable progress window: you can now stop the MEL in mid-export. Frankly, my favorite addition. ;)
- In both particle and MDD export, a second processing takes place to convert it to their appropriate formats. The progress window has also been applied to those processes, which means you can abort those operations as well. Do note however that clean-up operations like M2MD and M2PX deletion will only happen if you had switched off Keep M2MD or Keep M2PX. M2L files, on the other hand, will not be cleaned up after an aborted operation. Be advised you must do this yourself.
- As per some suggestions by a couple of individuals who wanted to get LW camera / transformation data into Maya, I've added a MEL script called M2LImport.mel and an LScript called ExportM2LGN.ls. ExportM2LGN.ls exports LW camera and transformation data into a proprietary M2L file. Its Maya counterpart is M2LImport.mel, which applies the data to Maya objects.
- Some notes of usage on ExportM2LGN: when exporting from LW, you will be prompted for a subdirectory to place the M2L file. If no subdirectory is specified then it will automatically place it under the current content directory. The resulting filename is dependent upon the scene item's name, so make sure no invalid characters appear in your object name, and that they are unique. Existing files will be overwritten without warning. If you export a Null object (e.g. an item without camera settings) then the M2L file is only good for importing as a transformation. The range of export is determined by your timeline start and end frames.
- Notes of usage on M2LImport.mel: When importing from Maya you have to decide if you want to import transformation data, camera data or both. Suppose you exported a LW camera and want to apply all transformation data and camera data to a Maya camera. You must select both the camera's transform node and cameraShape node. An easy way of doing this is selecting the transform node first, execute a "pickDown -d down;" command and using the Hypergraph, add-select the transform node. It follows that if you only want to apply cameraShape attributes, select only the cameraShape node. The script will import the full time range recorded in the M2L file.
- Ultra-important reminder - if importing from LW to Maya, always set the transform node's Rotation Order (e.g. rotateOrder) to "zxy".
03.29.05 (rev 2.2)
- Added a menu item called Export OBJs only. You must specifiy a shape node.
- Added a menu item called Export Current Frame. Exports data of the current frame. Works with mesh, transform, and camera nodes. Will not work with particles, however.
- Changed behavior: Maya2LW can no longer clean up any file when aborting operations. Sorry.
- Maya2LW : ParticleFX to Maya PDC (ExportPFX2PDCGN.ls). Please treat this new feature as beta. This new LScript is what I've been dying to get done all this time since I prefer using LightWave's ParticleFX, but prefer the speed of Maya's instancer. It is a LightWave generic script that exports ParticleFX data and converts them into Maya's PDC (particle disk cache) files. Pretty straightforward. You get to choose on the output subdirectory (which will be created automatically for you in case the directory you specified does not exist), and how many emitters you want to export at a time. Note that they will be named based on their scene item names. Since particle objects in Maya refer to files with their same name, I advise renaming PFX emitters identically to the existing particles in your Maya scene. Moreover, remember to watch out for characters that are valid in filenames but invalid in Maya.
- Some technical information on the PFX2PDCGN.ls script: the following
attributes are exported to PDC,
At this point in time I am uncertain of the repercussions of omitting certain attributes and how it will affect overall control when they are exported to Maya. For instance lastPosition may or may not be used to be Maya to internally calculate velocity, and lastVelocity (in conjunction with velocity) to calculate for acceleration. One thing for sure, however, age is presented correctly in Maya only when birthTime is correct. Directly specifying the age attribute did not successfully force Maya to evaluate age as it was written. This is the reason why birthTime was included, and this the reason why lastPosition and lastVelocity were included too. I had also wished to use LScript's Particle Object buffer called PART_SIZE to retrieve the size of the particle (to be mapped to the mass attribute). Unfortunately, either PART_SIZE does not work, or refers to something else altogether, I have not been able to access that parameter in ParticleFX.
- Changed that ridiculously long temp directory for M2PX files from /_maya2lw_a_very_temporary_directory/ to /_maya2lwm2px_temp. ;)
- Bug fix: added some more bullet-proofing to Maya particle export to prevent exporting of particles whose lifespans is less two frames. ParticleFX chokes on single-frame particles.
- Added specifiable output directories.
- ImportM2LGN.ls for LightWave. Another way of importing M2L files directly to your objects like how you would import MOT files. You can only specify one M2L file, but you can select as many objects, to apply the M2L to, as you want.
- There's some "formal documentation" for Maya2LW. ;)
- Added frame stepping to speed up export.
- Modeler script: Maya2LW2_ExportOBJ.ls. This is a necessary script in the Maya2LW workflow, and this replaces the need for the original maya2lwOBJImport_102.mel, which was slower and could not handle larger OBJ files. When you have an object that is to be deformed in Maya, please use this script to get the LWO translated to OBJ. Do not use the native LightWave OBJ exporter for deformable meshes: the polygon-point ordering is not congruent with Maya.
- changed method of getting transformation (from translation to rotate pivot) for M2L exports. Previous method could not properly deal with objects whose transformations were "frozen" by the Freeze Transformation command.
- 11 months hence.
- I committed a huge oversight regarding the OBJ export LScript. I had delineated in the documentation that upon using the LScript, the user no longer needs to re-export the OBJ file from Maya. Regrettably, I did not rigorously test the workflow.
OBJ export from LightWave has turned into a non-option, due to the incompatibility of how Maya reads OBJs and thereafter assigns internal point indices and how LightWave arranges its own points. No matter how you format the OBJ, Maya will not import it in a manner that is at all similar with how a LWO is ordered. As usual, the best option is the the direct one: I've written a Maya ASCII Exporter LScript for Modeler only (Maya2LW2_ExportMA.ls). The exporter supports UV maps, though I recommend against using it unless it is absolutely necessary. The exporter is slow to begin with, and exporting UVs will add to the slowness by a lot. In a relatively fast system, a 3700+ point / polygon mesh exported in 15 seconds without UVs. With UV export turned on, it exports at 56 seconds. Pretty slow both ways.
It is not necessary to use the exporter, although it could save you a bit of time if you already have your LWO set up, or, if for some reason, you are unable to export an OBJ from Maya without extensive backtracking.
- The exporter also supports exporting multiple layers at once. However, the user must select the desired layers as foreground layers. The exporter will export them as separate meshes in Maya (each with their own transform nodes). If the layer is named in LightWave, the transform node will be named the same. If the layer is unnamed, then the layer number is used instead.
- To those curious why the exporter takes long: Maya defines a polygonal face using edges. Edges, in turn, are defined by two points. LightWave, on the other hand, defines a polygonal face by points only. A sizeable portion of code and processing power go to finding edges (and removing their redundancies), and then the subsequent searches for the indices of the edges to form the face. In the future, I will try experimenting on different processes to speed up the searches (or somehow minimise them).
12.15.05 (rev 2.3)
- Added some file organisational features to aid in exporting files into specific folders based on scene name. A checkbox has been added that denotes whether or not you want to create a sub-directory under a given output directory. The sub-directory will be named based on the currently-opened scene file. For example, if you have inputted that the output directory of all MDD files is "D:/PROJECTS/PROJ_A/M2L/MDD", and then you choose to create sub-directory for a scene file called "Scene01.mb", then Maya2LW will create a directory called "D:/PROJECTS/PROJ_A/M2L/MDD/Scene01/" and output the MDD files there.
- fixed single-frame export.
- Added a method of exporting heirarchial animation. In Maya2LW2, heirarchial animation only means independent axis rotation. Rotation order difficulties have been overcome by using locators to serve as axes. These locators are nested on top of one another, hence "heirarchial", and this "axes heirarchy" is recreated in LightWave automatically. Admittedly, it's a bit of a misnomer ;). Regardless, it is now possible to reliably export any of Maya's rotation orders to LightWave's default rotation order of ZXY. Maya2LW2_SceneControllerGN_v104.ls has been modified to create these locators (nulls in LightWave).
These three nulls have a naming convention:
"H" represents that that the M2L file was generated as an "heirarchial animation" and should be used as a singularly with the other M2L files of its group. the "A", "B", and "C" designations represent the three axes. The "CShape" designation represents a cameraShape M2L file. If you selected a transform node with a camera node as its leaf, Maya2LW2 automatically exports the camera node. The cameraShape M2L file will also contain the transform data of the last axis, hence "CShape". Furthermore, even if the "CShape" is a cameraShape M2L file, because it was generated as a heirarchial animation, it will be placed amongst the other M2L files in the user-specified M2L sub-directories.
The Maya2LW2_SceneControllerGN_v104 will create a rotation order heirarchy if you apply the M2L file as a heirarchial animation. Topmost in the heirarchy is the "A" null, which contains the animation of the last axis of the order, as well as the translation data of the whole group. "B" null contains the second axis animation. Lastly, the chosen Layout item itself will be applied the last axis animation, in addition to the camera data ("CShape") if it exists.
"Heirarchial animation" is distinguished from the original animation export for purposes of practicality. The original M2L export is simpler - it generates only one M2L file per node, and uses Maya's quaternion interpolation to convert between rotation orders. If the animation to be exported is very simple, the original export is the best solution.
Export as Heirarchial Animation is accessed in the File menu in the Maya2LW interface.
- Maya2LW2_SceneControllerGN_v1045.ls - I've converted the Master-Class LScript into a Generic type, due to the fact that ScreamerNet is not reliable with Master-Class plugins loaded into scenes. To avoid potential problems, I thought it best that a Generic should handle all the applying and updating of data of LightWave objects. A few important notes bear mentioning.
1.) this GN version "tags" objects with certain data that makes it possible to retrieve values across invocations. This tag is saved in the scene file under its specific object. Some plugins / LScripts also use this tagging system, but Maya2LW2 will make sure that it leaves those tag slots alone.
2.) I've added an "Update Objects" button which refreshes all M2L files that have been tagged and assigned to the objects.
3.) If you wish you can still use the Master-Class version, but its limitations still apply: an object's reference to an M2L file will be lost if you unload the script, because the script is the one tracking this information. Also the Master-Class version will no longer be updated / improved / supported in the future. I'll be focusing future development on the GN version (unless a good reason to do otherwise).
4.) "Heirarchial animation" data is processed by clicking on the "Apply as Heirarchy" checkbox. When you browse for the M2L file, select only the "H_[itemName]_A" M2L file of the series! The script is programmed to take that first file as a template and will automatically create the nulls and assign them the correct M2L files.
Example: in Maya, you have a camera that is attached to a bunch of locators, which are in an heirarchy. You intend to export the camera only.
You will see the nulls parented to each other and the camera parented in that heirarchy, too.
- I've brought back the idea of motion modifier LScripts. This is no re-hash: totally written by me to handle the binary M2L files. This came about in order to dynamically replace motions of cameras and / or nulls (locators), without the need to initiate an update to them. In previous cases, if an M2L file was changed, the user had to go to each scene and initiate an update in order that the keyframes were modified. But with this script, this is no longer necessary. This is useful if you have multiple pass scenes and rendering over ScreamerNet. The main motion LScript is Maya2LW_MotionIA.ls. Some main points about this script:
1. due to doubting the stability of LScript arrays, the script uses disk access instead of buffering it into memory. When the M2L is being accessed, it cannot be modified by Maya (or LightWave using ExportM2LGN.ls).
- To process camera-specific attributes (focal length, focal distance, f/stop, and shutter angle) you use Maya2LW2_CameraChannelsCF.ls. The script, when manually attached to one of the four listed attributes, will sense what channel it is supposed to follow. All the user has to do is to specify the M2L file. However, both this CF script, and the motion IA script above can be attached used the new Maya2LW2_SceneControllerGN_v104.
- Maya2LW2_SceneControllerGN_v104 facilitates the application of M2L data, heirarchially or normally, in the form of keyframes, or by attaching MotionIA or CameraChannelsCF scripts whose values will default according to the settings you have set them in the SceneControllerGN interface, so that you do not have to go in and do it yourself. It will likewise attach a CameraChannelsCF script (if the M2L file is of the camera type, and if the object being applied is a camera) with the M2L file automatically set. Other attributes that will be set by the SceneControllerGN is the Target Frame, Speed, PostBehavior (PreBehavior is not supported). PostBehavior settings include, First Frame (Reset), Last Frame (Constant), and Loop (Repeat) only, and setting something other than these will set the settings to First Frame.
- ExportM2LGN has undergone some minor revisions in terms of how a file is saved. The user now specifies a prefix and the script will append the prefix unto the object name and save it out as an M2L file.
02.15.06 (rev 2.4)
- fixed some single-frame export errors in maya2lw2_export_fm.mel.
- fixed heirarchial animation export regarding filenames.
- Scene Controller LScript will now store tagged filenames as separate names. Due to the likelihood of long path names, and the inability of the tagging system to write long strings, the path and filename are broken down as separate folders and stored in a sequence of tags. This is transparent to the user and is only mentioned FYI.
- ExportM2LGN has undergone some minor revisions in terms of how a file is saved. The user now specifies a prefix and the script will append the prefix unto the object name and save it out as an M2L file.
- fixed reading of M2L files that were exported from Maya with some attributes not keyframed.
- reorganised export animation choices into: [xform], [Heirarchial], and [Direct Attribute]. When exporting mesh nodes (e.g. MDD) either the three will export the deformations. These options are most meaningful when exporting transform or camera nodes. Direct Attribute export will take the actual attributes as seen from the Channel Box, unlike xform, which evaluates transforms in world coordinates.
- fixed the rest position data in the MDD export, which facilitates the use of a new technique I've developed to counteract the inherent (consequently, persistent) problems of flipping rotations. Explained below.
- new feature: MDD file stitching. This consists of an external prog called "mdd_stitch.exe" and this is to be placed where Windows can see it (in PATH environment variable). An LScript (MDDStitchGN.ls) has been written as a front-end for this program, which takes two MDD files together, and with a user-specified offset, will "stitch" MDD files together. The LScript will allow the user to stitch more than two files together at one go.
- mdd_stitch.exe will stitch two MDDs together. The point of overlap / replacement is dependent upon the absolute time indices as written in the MDD file. If you have one MDD ranging from 1-30 frames, and another from 13-40 frames, the second MDD will overwrite the first MDD from 13-30 and continue to "paste" its contents until frame 40. If you provide a non-zero offset of, say, 6 frames, then the second MDD file will overwrite the first MDD from 19-30 and continue to write the rest of its contents. In this case, the final MDD file will have a duration of 46 frames, due to the offset.
- the option of "Rest Position" originally referred to the export of OBJ files. This is no longer the case. The option has been trimmed and replaced with a more useful one and appropriately named "MDD Rest Position". This is explained more fully in the new documentation. Consequently all OBJ files are exported as 'deformed.'
- added incremental saving mainly for use with stitching, as this facilitates multiple passes of a timeline export at different ranges without overwriting previous data. Of course, incremental saving could be used for animation versioning as well. Incremental saving comes in two forms: Number increments (1, 2, 3, etc), and Data/Time stamps. Both forms will create a subdirectory of an appropriate name and place the new files there.
- added MDD application functionality in Maya2LW2_SceneControllerGN_V11.ls. The user assigns MDDs to objects in the same manner as he/she assigns M2L files. However, MDD application will be automatically done after M2L application because the script exports a scene file, which must reflect the M2L assignment as well as the MDD changes (since there is no way to change MD_Plug parameters inside LightWave). MD_MetaPlug is also supported in this application functionality - please read the documentation for more information on these new features.
- new behavior: I almost never use the checkboxes to select the nodes for export since it's easier to do it Hypergraph (or Outliner), and in scenes with many nodes (like transforms) initialising Maya2LW2 can take more than a second. Because of this Maya2LW2 will no longer gather the node lists if you have something selected when you run Maya2LW2. If you would rather use the checkboxes then you must have an empty selection before you run Maya2LW2.
- MotionIA scripts can now be configured to disregard certain channels from being applied to the object. With this ability, you can, for example, override Scale.X and Scale.Z of the M2L file and key them yourself in LightWave.
- Maya2LW2_CameraChannelsCF.ls have been replaced (e.g. rendered obsolete) with a more capable, and less-buggy Maya2LW2_GeneralChannelsCF.ls. GeneralChannels will work with Position, Rotation, and Scale channels of any M2L file. Just attach the script to any channel and the script will look for it's attribute in the M2L file and follow it. Please do not use CameraChannels in future applications as it will not be developed any further.
- Maya2LW2_GeneralChannelsCF.ls will now also allow you to remove the "auto-sensing" feature, which looks for the the same channel in the M2L file. By overriding this you can look for a specific channel in the file. This might be used as a way to use M2L files to export enveloped parameters without relating it to actual transform values.
- The current M2L format, designed along the same lines as the MDD format, is rather convoluted and is apparent to me because it's hard to develop for it. I will start to develop a more streamlined version. All scripts after Maya2LW v2.4, will support this new version, though I plan to keep older M2L versions useable.
- ExportM2LGN could not save out multiple files due to some file-naming bug. Fixed. Reported by Mikael Burman.
- Updated Maya2LW2_ExportMA.ls to handle Endomorphs. At the moment it does the export `brute force`, that is, it switches morph maps and then executes the usual export method. No user intervention is necessary. In the future, this will be replaced with something more elegant and will be considerably faster. Furthermore, the MA exporter now features a cache file called Edge Data File (EDF) which stores pre-calculated edge / polyedge data from a previous export. When exporting, a brand-new mesh, choose "Save" and specify a file. If you decide to export the mesh again, perhaps after some non-topological modifications, choose "Load". Instead of calculating the edges of the mesh, it will refer to this file. This saves a lot of export time. Remember that it will not work (reliably) if you change topology, or if you delete or add points or polygons. This is invaluable if you decide to export morph maps to Maya, or use poseDeformer in Maya and want to sculpt the mesh back in LightWave.
09.21.07 (rev 2.5)
- maya2lwExport_25_fm.mel has been updated to take advantage of Maya 8.0's geometry cache feature. Instead of the brute force pointPosition / xform call to determine positions of vertices, the script calls cacheFile, and converts the resulting PC2 file into MDD. You must place the new PC2_MDD.exe file into a Windows-accessible location, typically where you have placed your other Maya2LW2 executables (e.g. M2MD_MDD.exe). The same rules apply: you must select the shape node of the object, not the transform. The PC2 format is chosen, instead of the native MC format because of the suggestion by Jacobo Barreiro who cited the possiblility of interchanging data with 3dsmax. Since no interoperability issues were at stake with this idea, I decided to use the PC2 format for MDD conversion. The PC2_MDD file is called with three arguments: PC2_MDD.exe <input PC2 file> <output MDD file> <framesPerSecond>. PC2_MDD can be called like any Windows exe, possibly from a MAXScript, though, of course, that has not been tested.
- One main difference between the new cache feature, that is, in relation to Maya2LW2, is that the mesh must be deformed by either deformation clusters, or skin clusters. Simply parenting a sphere onto a locator, moving the locator, and then exporting the vertices of the sphere will not yield the same MDD as one that had the old export system will output.
- New MEL script called Maya2LW_ImportMDD.mel. This is a MEL that will take an MDD file, convert it to a Maya cache file (PC2 -> MC) and apply that cache to the currently selected mesh item in Maya. To facilitate this a new executable was created called MDD_PC2.exe and must be placed in a Maya-accessible directory (e.g. \bin).
Original Maya2LW : Markus Weiland
Many thanks to the members of LScript Mailing List, the best community around.