From 27f771744a9237defb1d5f54a56f12ded8bc8a5c Mon Sep 17 00:00:00 2001 From: lvlong Date: Tue, 2 Sep 2014 17:33:22 +0800 Subject: [PATCH] static model load problem of old version . --- cocos/3d/CCBundle3D.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cocos/3d/CCBundle3D.cpp b/cocos/3d/CCBundle3D.cpp index c28351046b..6a2a74efd2 100644 --- a/cocos/3d/CCBundle3D.cpp +++ b/cocos/3d/CCBundle3D.cpp @@ -760,7 +760,17 @@ bool Bundle3D::loadNodes(NodeDatas& nodedatas) if (_version == "0.1" || _version == "1.2" || _version == "0.2") { SkinData skinData; - loadSkinData("", &skinData); + if (!loadSkinData("", &skinData)) + { + auto node= new (std::nothrow) NodeData(); + auto modelnode = new (std::nothrow) ModelData(); + modelnode->matrialId = ""; + modelnode->subMeshId = ""; + node->modelNodeDatas.push_back(modelnode); + nodedatas.nodes.push_back(node); + return true; + } + auto nodeDatas = new (std::nothrow) NodeData*[skinData.skinBoneNames.size() + skinData.nodeBoneNames.size()]; int index = 0; size_t i;