From c52a81a2c20af56d7eb09648ac46b4b05f2744ec Mon Sep 17 00:00:00 2001 From: VisualSj Date: Mon, 17 Aug 2015 17:25:17 +0800 Subject: [PATCH] Update JS parser --- .../js-bindings/script/studio/parsers/action-2.x.js | 9 +++++++++ .../script/studio/parsers/timelineParser-2.x.js | 9 +++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cocos/scripting/js-bindings/script/studio/parsers/action-2.x.js b/cocos/scripting/js-bindings/script/studio/parsers/action-2.x.js index dcf168a218..6c203a54f1 100644 --- a/cocos/scripting/js-bindings/script/studio/parsers/action-2.x.js +++ b/cocos/scripting/js-bindings/script/studio/parsers/action-2.x.js @@ -260,6 +260,15 @@ return frame; } + }, + { + name: "BlendFunc", + handle: function(options){ + var frame = new ccs.BlendFuncFrame(); + var blendFunc = options["BlendFunc"]; + if(blendFunc) + frame.setBlendFunc(new cc.BlendFunc(blendFunc["Src"], blendFunc["Dst"])); + } } ]; diff --git a/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js b/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js index 614e9c508b..d584097b6f 100644 --- a/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js +++ b/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js @@ -41,10 +41,11 @@ }, getNodeJson: function(json){ - var result = json["Content"]["Content"]["ObjectData"]; - if(undefined === result) - result = json["Content"]["ObjectData"]; - return result; + var content = json["Content"]; + if(content["ObjectData"]) + return content["ObjectData"]; + + return content["Content"]["ObjectData"]; }, getClass: function(json){