mirror of https://github.com/axmolengine/axmol.git
commit
139af3faa8
|
@ -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;
|
||||
|
|
|
@ -231,6 +231,7 @@ Sprite3D* Sprite3D::createSprite3DNode(NodeData* nodedata,ModelData* modeldata,c
|
|||
auto sprite = new (std::nothrow) Sprite3D();
|
||||
if (sprite)
|
||||
{
|
||||
sprite->setName(nodedata->id);
|
||||
auto mesh = Mesh::create(nodedata->id, getMeshIndexData(modeldata->subMeshId));
|
||||
if (modeldata->matrialId == "" && matrialdatas.materials.size())
|
||||
{
|
||||
|
@ -399,6 +400,7 @@ void Sprite3D::createNode(NodeData* nodedata, Node* root, const MaterialDatas& m
|
|||
node= Node::create();
|
||||
if(node)
|
||||
{
|
||||
node->setName(nodedata->id);
|
||||
node->setAdditionalTransform(&nodedata->transform);
|
||||
if(root)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue