Export (decl)

Export declarations defining a group of files and the arguments to use during conversion from Maya Binary to MD5 format. Essentially you are defining a batch of files and parameters to process.

Syntax

export  [name] {
  options     [arguments]
  addoptions  [arguments]
  mesh        [file]   [arguments]
  anim        [file]   [arguments]
  camera      [file]   [arguments]
  ...
}

Export declarations begin with a header which consists of the keyword “export” followed by the name of the batch. This name can referenced when using the exportModels command to restrict the conversion process to the specified files.

The header is followed by the body of the declaration which is enclosed in curly brackets.

The body is composed of a series of keywords and their parameters.

Keywords

options
Defines the default options that will be used for all future export actions. Each iteration of this keyword overides the effects of previous instances.

options [parms]
  • [parms] - a single parameter or a list of the parameters from the following section.

addoptions
Appends a default option to the current set of default options. This keyword functions in the same way as the options keyword with the exception that it does not override any settings that are not explictly redefined.

addoptions [parms]
  • [parms] - a single parameter or a list of the parameters from the following section.

mesh
Exports an MD5mesh from a .mb file. Any options specified here will be appended to the previously specified options.

mesh [filename] [parms]
  • [filename] - The name of the maya binary file.
  • [parms] - a single parameter or a list of the parameters to apply from the following section.

anim
Exports an MD5anim from a .mb file. Any options specified here will be appended to the previously specified options.

anim [filename] [parms]
  • [filename] - The name of the maya binary file.
  • [parms] - a single parameter or a list of the parameters to apply from the following section.

camera
Exports an MD5camera from a .mb file. Any options specified here will be appended to the previously specified options.

camera [filename] [parms]
  • [filename] - The name of the maya binary file.
  • [parms] - a single parameter or a list of the parameters to apply from the following section.

Parameters

-force
Ignored

-game
Specify the mod name, which is where the relative paths are defined from. This should get set automatically in 1.2

-game [name]
  • [name] - The name of the working mod folder

-rename
Rename a joint

-rename [joint name] [new name]
  • [joint name] - The name of the joint in Maya.
  • [new name] - The name you would like to assign this joint in the MD5mesh.

-prefix
A string used to filter a scene so that only objects with a matching prefix are exported.

-prefix [prefix]
  • [prefix] - The string to match objects against.

-parent
Reparent a joint

-parent [joint name] [new parent]
  • [joint name] - The name of the joint to parent.
  • [new parent] - The name of the joint to parent to.

-sourcedir
Defines the source directory where the exporter will search for files.

-sourcedir [directory]
  • [directory] - The directory to be used

-destdir
Defines the destination directory where the exporter will save files.

-destdir [directory]
  • [directory] - The directory to be used

-dest
Defines the name to assign to the file currently being exported

-dest [filename]
  • [filename] - The filename to be used

-range
The range of frames to export from the timeline

-range [start frame] [end frame]
  • [start frame] - The starting frame
  • [end frame] - The ending frame

-cycleStart
Shift the cycle to start on a different frame. For example, say frame 1 has the left foot forward and frame 10 has the right foot forward. If you would like your cycle to start with right foot forward you would use “-cycleStart 10” and it will shift the cycle forward 10 frames.

-cycleStart [shift]
  • [shift] - The number of frames to shift the sequence

-scale
Scale your character up or down from the origin during export. For example, “-scale 2” will double the size of the character.

-scale [scalar]
  • [scalar] - The scale multiplier (similar to percent where 1 = 100%, 2 = 200%, 0.5 = 50%)

-align
Will align your animation to a certain bone.

-align [joint name]
  • [joint name] - The name of the joint to align to

-rotate
Changes the orientation of your animation along the Z axis (up/down).

-rotate [yaw]
  • [yaw] - The angle to rotate the animation in degrees

-nomesh

-clearorigin

-clearoriginaxis

-ignorescale
Ignore any scales you may have on some bones.

-xyzprecision
This setting adjusts the threshold for translational sensitivity. By default the exporter will try and compress down the animations getting rid of tiny movements. By lowering the threshold the resulting animation mimicks the original more closely.

-xyzprecision [precision]
  • [precision] - The cutoff threshold

-quatprecision
This setting adjusts the threshold for rotational sensitivity. By default the exporter will try and compress down the animations getting rid of tiny movements. By lowering the threshold the resulting animation mimicks the original more closely.

-quatprecision [precision]
  • [precision] - The cutoff threshold

-jointthreshold
This setting adjusts the threshold for joint weight or the amount of influence a bone has over surrounding vertices. By default the exporter will try and compress down the animations getting rid of tiny movements. By lowering the threshold the resulting animation mimicks the original more closely.

-jointthreshold [weight]
  • [weight] - The cutoff threshold

-skipmesh
Allows you to skip certain models during export (can only be used by itself)

-skipmesh [name]
  • [name] - The name of the mesh

-keepmesh
Allows you to keep only a certain model during export (can only be used by itself)

-keepmesh [name]
  • [name] - The name of the mesh

-jointgroup
Defines a group of joints for reference with the group keyword

-jointgroup [name] [joint1] [joint2]...[jointX]
  • [name] - The name to assign to the group
  • [joint1],[joint2],[jointX] - The joints contained in the group

-group
Define a group to export (these don’t affect the hierarchy)

-group [name]
  • [name] - The name of a group

-keep
Define a joint that should be exported irrespective of whether it’s used by a mesh or not

-keep [name]
  • [name] - The name of a joint