mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of https://github.com/super626/cocos2d-x into v3
This commit is contained in:
commit
e336a4c86c
|
@ -207,8 +207,14 @@ bool Bundle3D::loadObj(MeshDatas& meshdatas, MaterialDatas& materialdatas, NodeD
|
||||||
materialdatas.resetData();
|
materialdatas.resetData();
|
||||||
nodedatas.resetData();
|
nodedatas.resetData();
|
||||||
|
|
||||||
|
std::string mtlPath = "";
|
||||||
|
if (mtl_basepath)
|
||||||
|
mtlPath = mtl_basepath;
|
||||||
|
else
|
||||||
|
mtlPath = fullPath.substr(0, fullPath.find_last_of("\\/") + 1).c_str();
|
||||||
|
|
||||||
ObjLoader::shapes_t shapes;
|
ObjLoader::shapes_t shapes;
|
||||||
auto ret = ObjLoader::LoadObj(shapes, fullPath.c_str(), mtl_basepath);
|
auto ret = ObjLoader::LoadObj(shapes, fullPath.c_str(), mtlPath.c_str());
|
||||||
if (ret.empty())
|
if (ret.empty())
|
||||||
{
|
{
|
||||||
//fill data
|
//fill data
|
||||||
|
|
Loading…
Reference in New Issue