Browse Source

Enable to update AnimationAction._effectiveWeight by mixer even if its .enabled is false

Takahiro 8 years ago
parent
commit
ca9c3fb2c8
2 changed files with 11 additions and 5 deletions
  1. 10 0
      src/animation/AnimationAction.js
  2. 1 5
      src/animation/AnimationMixer.js

+ 10 - 0
src/animation/AnimationAction.js

@@ -327,6 +327,16 @@ Object.assign( AnimationAction.prototype, {
 	// Interna
 
 	_update: function( time, deltaTime, timeDirection, accuIndex ) {
+
+		if ( ! this.enabled ) {
+
+			// call ._updateWeight() to update ._effectiveWeight
+
+			this._updateWeight( time );
+			return;
+
+		}
+
 		// called by the mixer
 
 		var startTime = this._startTime;

+ 1 - 5
src/animation/AnimationMixer.js

@@ -610,11 +610,7 @@ Object.assign( AnimationMixer.prototype, EventDispatcher.prototype, {
 
 			var action = actions[ i ];
 
-			if ( action.enabled ) {
-
-				action._update( time, deltaTime, timeDirection, accuIndex );
-
-			}
+			action._update( time, deltaTime, timeDirection, accuIndex );
 
 		}