Set the node name

This commit is contained in:
liuliang 2014-09-03 15:55:11 +08:00
parent 278a3441ce
commit c167ed17ee
1 changed files with 1 additions and 1 deletions

View File

@ -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())
{
@ -385,7 +386,6 @@ void Sprite3D::createNode(NodeData* nodedata, Node* root, const MaterialDatas& m
auto sprite = createSprite3DNode(nodedata,it,matrialdatas);
if (sprite)
{
sprite->setName(nodedata->id);
if(root)
{
root->addChild(sprite);