Enum defining how animation layers blend with the base animation.
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel; const scene = model.project?.scene; if (!scene) { console.log('No scene loaded.'); return; } // Walk scene objects and switch Additive clips to Default blending let switched = 0; function walk(obj: Editor.Model.SceneObject): void { const players = obj.getComponents('AnimationPlayer'); for (const player of players) { for (const clip of player.animationClips) { if (clip.blendMode === Editor.AnimationLayerBlendMode.Additive) { clip.blendMode = Editor.AnimationLayerBlendMode.Default; switched++; } } } for (const child of obj.children) walk(child); } for (const root of scene.rootSceneObjects) walk(root); console.log(`Switched ${switched} Additive clip(s) to Default`); Copy
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel; const scene = model.project?.scene; if (!scene) { console.log('No scene loaded.'); return; } // Walk scene objects and switch Additive clips to Default blending let switched = 0; function walk(obj: Editor.Model.SceneObject): void { const players = obj.getComponents('AnimationPlayer'); for (const player of players) { for (const clip of player.animationClips) { if (clip.blendMode === Editor.AnimationLayerBlendMode.Additive) { clip.blendMode = Editor.AnimationLayerBlendMode.Default; switched++; } } } for (const child of obj.children) walk(child); } for (const root of scene.rootSceneObjects) walk(root); console.log(`Switched ${switched} Additive clip(s) to Default`);
Additive blending mode that adds the animation on top of existing animations.
Base blending mode that replaces the animation.
Enum defining how animation layers blend with the base animation.
Example