public List <WeightedHdMorph> LoadActiveHdMorphs(ChannelOutputs channelOutputs) { List <WeightedHdMorph> hdMorphs = new List <WeightedHdMorph>(); foreach (var morph in morphs) { float weight = (float)morph.Channel.GetValue(channelOutputs); if (weight == 0) { continue; } var hdFile = morph.HdFile; if (hdFile == null) { continue; } var hdMorph = HdMorphSerialization.LoadHdMorph(hdFile); hdMorphs.Add(new WeightedHdMorph(hdMorph, weight)); } return(hdMorphs); }
public void Run() { //FileInfo file = CommonPaths.SourceAssetsDir.File("daz-assets/FWSAAdalineHDforVictoria7/Content/data/DAZ 3D/Genesis 3/Female/Morphs/FWSA/Adaline/FBM-FWSAAdaline.dhdm"); //FileInfo file = CommonPaths.SourceAssetsDir.File("daz-assets/FWSAAdalineHDforVictoria7/Content/data/DAZ 3D/Genesis 3/Female/Morphs/FWArt/FW_PBMNails.dhdm"); FileInfo file = CommonPaths.SourceAssetsDir.File("daz-assets/Rune7HDAddOn/Content/data/DAZ 3D/Genesis 3/Female/Morphs/Daz 3D/Rune 7/FBMRune7HD.dhdm"); HdMorph hdMorph = HdMorphSerialization.LoadHdMorph(file); ValidateHdMorph(hdMorph); PrintHdMorph(hdMorph); }