From a4fec3a5e05cf1b3017377e4da767d7ad6825126 Mon Sep 17 00:00:00 2001 From: VisualSj Date: Thu, 20 Aug 2015 17:02:41 +0800 Subject: [PATCH] Update Studio js parser --- .../js-bindings/script/studio/parsers/action-2.x.js | 1 + .../js-bindings/script/studio/parsers/timelineParser-2.x.js | 6 ++++++ 2 files changed, 7 insertions(+) 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 6c203a54f1..34e435a8d0 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 @@ -268,6 +268,7 @@ var blendFunc = options["BlendFunc"]; if(blendFunc) frame.setBlendFunc(new cc.BlendFunc(blendFunc["Src"], blendFunc["Dst"])); + return frame; } } ]; 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 d584097b6f..1ecc5a070b 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 @@ -1312,12 +1312,18 @@ node.setBlendFunc(new cc.BlendFunc(blendFunc["Src"] || 0, blendFunc["Dst"] || 0)); parser.generalAttributes(node, json); + var color = json["CColor"]; + if(color && (color["R"] !== undefined || color["G"] !== undefined || color["B"] !== undefined)) + node.setColor(getColor(color)); return node; }; parser.initSkeletonNode = function(json){ var node = new ccs.SkeletonNode(); parser.generalAttributes(node, json); + var color = json["CColor"]; + if(color && (color["R"] !== undefined || color["G"] !== undefined || color["B"] !== undefined)) + node.setColor(getColor(color)); return node; };