Dmxconvert

From Valve Developer Community
Jump to: navigation, search

DMXconvert is a command-line SDK tool which converts DMX files. It can be found in all Source 2013 Source 2013 games, Counter-Strike: Global Offensive Counter-Strike: Global Offensive Authoring Tools , Left 4 Dead 2 Left 4 Dead 2 Authoring Tools , Source Filmmaker Source Filmmaker , as well as in various Source 2 Source 2 Workshop Tools.

An example usage is: converting regular DMX files using "encoding binary 3 format model 15" into others, such as plain text "encoding keyvalues2 1 format dmx 15".
This new Keyvalues 2 DMX 15 version could then be used in Blender Source Tools advanced Flex properties tab to copy the face flex rules from.

Usage

 dmxconvert -i <in file> [-ie <in encoding hint>] [-o <out file>] [-oe <out encoding>] [-of <out format>]

If no output file is specified, dmx to dmx conversion will overwrite the input


Supported DMX file encodings:

  • keyvalues
  • keyvalues2
  • keyvalues2_flat
  • binary
  • actbusy
  • commentary
  • entitylayer
  • vmt
  • vmf

Supported DMX file formats:

  • dmx
  • movieobjects
  • sfm
  • sfm_session
  • sfm_trackgroup
  • pcf
  • gui
  • schema
  • preset
  • facial_animation
  • model
  • ved
  • mp_preprocess
  • mp_root
  • mp_model
  • mp_anim
  • mp_physics
  • mp_hitbox
  • mp_materialgroup
  • mp_keyvalues
  • mp_eyes
  • mp_bonemask

Simple Drag and Drop bat file

As is the case with many Command-Line only tools, usage might be confusing. So here is a simple Drag and Drop .bat file script which automatically converts whatever DMX you drop into the bat into a Keyvalues 2 DMX 15 version, creating a new DMX file with the _Keyvalues2 suffix.

::Game location that has the DMXconvert you want to use. Just main game folder.
SET Game_path=d:\programme\steam\steamapps\common\left 4 dead 2
::Don't change anything below here
"%Game_path%\bin\dmxconvert.exe" -i %1 -of dmx -oe keyvalues2 -o "%~dpn1_Keyvalues2.dmx"