diff --git a/cocos2d/core/components/CCAnimation.js b/cocos2d/core/components/CCAnimation.js index c2b38bf0a8..c707ab6985 100644 --- a/cocos2d/core/components/CCAnimation.js +++ b/cocos2d/core/components/CCAnimation.js @@ -112,12 +112,8 @@ var Animation = cc.Class({ get: function () { return this._currentClip; }, - set: function (value, force) { + set: function (value) { this._currentClip = value; - - if (CC_EDITOR && force && value) { - this._updateClip(value); - } }, type: AnimationClip, visible: false @@ -503,7 +499,7 @@ var Animation = cc.Class({ } }, - _updateClip: (CC_TEST || CC_EDITOR) && function (clip, clipName) { + _updateClip: (CC_TEST || CC_EDITOR) && function (clip, clipName, notReload) { this._init(); clipName = clipName || clip.name; @@ -535,8 +531,10 @@ var Animation = cc.Class({ oldState._name = clipName; } - oldState._clip = clip; - this._animator._reloadClip(oldState); + if (!notReload) { + oldState._clip = clip; + this._animator._reloadClip(oldState); + } } });