Ver Fonte

return def value if model not found

ncannasse há 10 anos atrás
pai
commit
309cffd3df
1 ficheiros alterados com 3 adições e 1 exclusões
  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 {