From 160d0460303a6920294ce0bab9246343beb1abe4 Mon Sep 17 00:00:00 2001 From: flamefox Date: Tue, 27 Jan 2015 10:31:38 +0800 Subject: [PATCH 1/6] =?UTF-8?q?when=20bindings-generator=20on=20windows?= =?UTF-8?q?=EF=BC=8Cit=20need=20this?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/cocos2dx_files.json | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index c262b095c0..32fea78e48 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -5843,6 +5843,7 @@ "tools/bindings-generator/tools/win32/cygiconv-2.dll", "tools/bindings-generator/tools/win32/cygintl-8.dll", "tools/bindings-generator/tools/win32/cygwin1.dll", + "tools/bindings-generator/tools/win32/dos2unix.exe", "tools/tolua/README.mdown", "tools/tolua/cocos2dx.ini", "tools/tolua/cocos2dx_3d.ini", From f81a2a8990383b045b4d0d5d1750254ded8c2508 Mon Sep 17 00:00:00 2001 From: flamefox Date: Tue, 27 Jan 2015 10:31:38 +0800 Subject: [PATCH 2/6] =?UTF-8?q?when=20bindings-generator=20on=20windows?= =?UTF-8?q?=EF=BC=8Cit=20need=20this?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/cocos2dx_files.json | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index c262b095c0..8aab44c83a 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -5843,6 +5843,7 @@ "tools/bindings-generator/tools/win32/cygiconv-2.dll", "tools/bindings-generator/tools/win32/cygintl-8.dll", "tools/bindings-generator/tools/win32/cygwin1.dll", + "tools/bindings-generator/tools/win32/dos2unix.exe", "tools/tolua/README.mdown", "tools/tolua/cocos2dx.ini", "tools/tolua/cocos2dx_3d.ini", From 25d7dc9dfbc030ea39e27520400cc96c105c118e Mon Sep 17 00:00:00 2001 From: flamefox Date: Wed, 4 Feb 2015 10:24:29 +0800 Subject: [PATCH 3/6] getAttachNode should failed when there is no bone with name --- cocos/3d/CCSprite3D.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index fdf69f6aef..da06a4155e 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -578,10 +578,13 @@ AttachNode* Sprite3D::getAttachNode(const std::string& boneName) if (_skeleton) { auto bone = _skeleton->getBoneByName(boneName); - auto attachNode = AttachNode::create(bone); - addChild(attachNode); - _attachments[boneName] = attachNode; - return attachNode; + if (bone) + { + auto attachNode = AttachNode::create(bone); + addChild(attachNode); + _attachments[boneName] = attachNode; + return attachNode; + } } return nullptr; From c2e17d6b1d230006f7fdc59cb27362f9755ea139 Mon Sep 17 00:00:00 2001 From: flamefox Date: Wed, 4 Feb 2015 10:24:29 +0800 Subject: [PATCH 4/6] getAttachNode should failed when there is no bone with name --- cocos/3d/CCSprite3D.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index fdf69f6aef..5cf5ef8d8d 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -578,10 +578,13 @@ AttachNode* Sprite3D::getAttachNode(const std::string& boneName) if (_skeleton) { auto bone = _skeleton->getBoneByName(boneName); - auto attachNode = AttachNode::create(bone); - addChild(attachNode); - _attachments[boneName] = attachNode; - return attachNode; + if (bone) + { + auto attachNode = AttachNode::create(bone); + addChild(attachNode); + _attachments[boneName] = attachNode; + return attachNode; + } } return nullptr; From 4b405db77da1b42708081d0ad7699843946c6209 Mon Sep 17 00:00:00 2001 From: flamefox Date: Wed, 4 Feb 2015 10:36:16 +0800 Subject: [PATCH 5/6] fix tab to space --- cocos/3d/CCSprite3D.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index 5cf5ef8d8d..b387796338 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -579,7 +579,7 @@ AttachNode* Sprite3D::getAttachNode(const std::string& boneName) { auto bone = _skeleton->getBoneByName(boneName); if (bone) - { + { auto attachNode = AttachNode::create(bone); addChild(attachNode); _attachments[boneName] = attachNode; From ac37ed3a4c7bd4b86b4cd7973c090d013b4a79de Mon Sep 17 00:00:00 2001 From: flamefox Date: Wed, 4 Feb 2015 10:37:32 +0800 Subject: [PATCH 6/6] revert this file --- templates/cocos2dx_files.json | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index bfd35096b3..a05606ec79 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -5845,7 +5845,6 @@ "tools/bindings-generator/tools/win32/cygiconv-2.dll", "tools/bindings-generator/tools/win32/cygintl-8.dll", "tools/bindings-generator/tools/win32/cygwin1.dll", - "tools/bindings-generator/tools/win32/dos2unix.exe", "tools/tolua/README.mdown", "tools/tolua/cocos2dx.ini", "tools/tolua/cocos2dx_3d.ini",