Skip to content

Commit

Permalink
return null if no obj and mats
Browse files Browse the repository at this point in the history
  • Loading branch information
deakcor committed Oct 11, 2021
1 parent 6fe4e9b commit d6fb7f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion obj-parse/ObjParse.gd
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,4 @@ static func parse_obj(obj_path:String, mtl_path:String="")->Mesh:
mtl_path=obj_path.get_base_dir().plus_file(obj_path.get_file().split(".")[0]+".mtl")
var obj := get_data(obj_path)
var mats := _create_mtl(get_data(mtl_path),get_mtl_tex(mtl_path))
return _create_obj(obj,mats)
return _create_obj(obj,mats) if obj and mats else null

0 comments on commit d6fb7f1

Please sign in to comment.