Explorar o código

return def value if model not found

ncannasse %!s(int64=10) %!d(string=hai) anos
pai
achega
309cffd3df
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      hxd/fmt/hmd/Library.hx

+ 3 - 1
hxd/fmt/hmd/Library.hx

@@ -318,7 +318,9 @@ class Library {
 							return pr.getParameters()[0];
 				return def;
 			}
-		throw 'Model ${objName} not found';
+		if( def == null )
+			throw 'Model ${objName} not found';
+		return def;
 	}
 
 	public function makeObject( ?loadTexture : String -> h3d.mat.Texture ) : h3d.scene.Object {