Skip to content

Commit a765b54

Browse files
committed
🛠️ Fix Renderer Not Excluding Non-Bone Nodes
1 parent 6dc7737 commit a765b54

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/components/animationProperties.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts" , context="module">
2-
import Checkbox from './dialogItems/checkbox.svelte'
32
import NumberSlider from './dialogItems/numberSlider.svelte'
43
import LineInput from './dialogItems/lineInput.svelte'
54

src/systems/animationRenderer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ let lastFrameCache = new Map<string, ILastFrameCacheItem>()
9494
* Map of node UUIDs to a map of times to keyframes
9595
*/
9696
let keyframeCache = new Map<string, Map<number, _Keyframe | undefined>>()
97-
let excludedBonesCache = new Set<string>()
97+
let excludedNodesCache = new Set<string>()
9898
export function getAnimationNodes(
9999
animation: _Animation,
100100
nodeMap: IRenderedRig['nodeMap'],
@@ -109,13 +109,13 @@ export function getAnimationNodes(
109109
const keyframeMap = new Map(animator.keyframes.map(kf => [kf.time, kf]))
110110
keyframeCache.set(uuid, keyframeMap)
111111
}
112-
excludedBonesCache = new Set(animation.excluded_nodes.map(b => b.value))
112+
excludedNodesCache = new Set(animation.excluded_nodes.map(b => b.value))
113113
}
114114
const nodes: IAnimationNode[] = []
115115

116116
for (const [uuid, node] of Object.entries(nodeMap)) {
117117
if (!node.node.export) continue
118-
if (excludedBonesCache.has(uuid)) continue
118+
if (excludedNodesCache.has(uuid)) continue
119119
const keyframes = keyframeCache.get(uuid)
120120
if (!keyframes) continue
121121
const keyframe = keyframes.get(time)

0 commit comments

Comments
 (0)