mirror of https://github.com/axmolengine/axmol.git
Set the node name
This commit is contained in:
parent
278a3441ce
commit
c167ed17ee
|
@ -231,6 +231,7 @@ Sprite3D* Sprite3D::createSprite3DNode(NodeData* nodedata,ModelData* modeldata,c
|
||||||
auto sprite = new (std::nothrow) Sprite3D();
|
auto sprite = new (std::nothrow) Sprite3D();
|
||||||
if (sprite)
|
if (sprite)
|
||||||
{
|
{
|
||||||
|
sprite->setName(nodedata->id);
|
||||||
auto mesh = Mesh::create(nodedata->id, getMeshIndexData(modeldata->subMeshId));
|
auto mesh = Mesh::create(nodedata->id, getMeshIndexData(modeldata->subMeshId));
|
||||||
if (modeldata->matrialId == "" && matrialdatas.materials.size())
|
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);
|
auto sprite = createSprite3DNode(nodedata,it,matrialdatas);
|
||||||
if (sprite)
|
if (sprite)
|
||||||
{
|
{
|
||||||
sprite->setName(nodedata->id);
|
|
||||||
if(root)
|
if(root)
|
||||||
{
|
{
|
||||||
root->addChild(sprite);
|
root->addChild(sprite);
|
||||||
|
|
Loading…
Reference in New Issue