Browse Source

Remove harcoded LOD0, use hmd/Data.hx method instead

clementlandrin 5 months ago
parent
commit
6f3867e7c2
2 changed files with 5 additions and 1 deletions
  1. 1 1
      hxd/fmt/fbx/HMDOut.hx
  2. 4 0
      hxd/fmt/hmd/Data.hx

+ 1 - 1
hxd/fmt/fbx/HMDOut.hx

@@ -1345,7 +1345,7 @@ class HMDOut extends BaseLibrary {
 				model.props.push(HasLod);
 			} else if ( lodsDecimation != null && model.skin == null ) {
 				var modelName = model.name;
-				model.name = modelName + "LOD0";
+				model.name = model.toLODName(0);
 				if( model.props == null ) model.props = [];
 				model.props.push(HasLod);
 				model.lods = [];

+ 4 - 0
hxd/fmt/hmd/Data.hx

@@ -170,6 +170,10 @@ class Model {
 		return name != null && StringTools.contains(name, modelName) && StringTools.contains(name, "LOD0");
 	}
 
+	public function toLODName(i : Int) {
+		return name + "LOD" + i;
+	}
+
 	public function getLODInfos() : { lodLevel : Int , modelName : String } {
 		var keyword = "LOD";
 		if ( name == null || name.length <= keyword.length )