Skip to content

Instantly share code, notes, and snippets.

@xDShot
Created April 10, 2020 12:17
Show Gist options
  • Save xDShot/35c0380f829204439e70d515cbec31e4 to your computer and use it in GitHub Desktop.
Save xDShot/35c0380f829204439e70d515cbec31e4 to your computer and use it in GitHub Desktop.
Alright, I've found a workaround. You just need to run this script with dmxedit from SourceFilmmaker. Create lua-file in any folder, put the code below (don't forger to change names of the files), put dmx mesh with hwm flexes in the same folder and .pre preset file and any dmx that contains l4d2 facs controllers.
Load( "./christie_head_rel.dmx", "relative" ); -- our dmx model with hwm flexes
print("We have loaded that crap. What we got for now:");
ListDeltas( );
CreateDeltasFromPresets( "./game_presets.pre", true ); -- 'true' purges all HWM flexes.
ImportComboRules( "./mechanic_model_merged.dmx", true, true ); -- any dmx that contains l4d2 facs controllers. First 'true' replaces the current rules with those from the file. Second 'true' purges any delta states which are no longer referred to by any combination rule or control.
ResetState( );
print( "And what we got now:" );
ListDeltas( );
ComputeNormals();
ComputeWrinkles();
Save( "./christie_head_facs.dmx" );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment