0.10.4: button still-frames render only on their own state

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.7 committed 2026-04-22 18:32:18 +02:00
1 parent fcb8edbb88
commit 8895fc76ef
8 files changed
+311 -23

No files matched your search

+8 -2
View File
@@ -13,7 +13,7 @@ import {
PhTrash,
} from '@phosphor-icons/vue'
import { useSceneStore } from '@/stores/scene'
import { isLayerActiveAt, sampleLayer } from '@/lib/interpolate'
import { isButtonLayerActiveAt, isLayerActiveAt, sampleLayer } from '@/lib/interpolate'
import { importImageFile, loadImage } from '@/lib/fileLoader'
import { useClipartStore } from '@/stores/clipart'
import { drawButtonFrame, drawSceneFrame, loadSceneImages } from '@/lib/render'
@@ -501,6 +501,9 @@ function buttonStackForTime(
const layers = asset.layers.slice().reverse()
for (const l of layers) {
if (!l.visible) continue
// Button-state visibility: still-frame kfs render only on their
// own state, not held into neighbouring states.
if (!isButtonLayerActiveAt(l, stateTime)) continue
const a = assetMap.value.get(l.assetId)
if (!a) continue
out.push({ layer: l, asset: a, props: sampleLayer(l, stateTime) })
@@ -754,7 +757,9 @@ function applyLivePose(props: AnimatableProps, layerId: string): AnimatableProps
const stackItems = computed<StackItem[]>(() => {
// Button-asset edit: show only the active state's layer stack. In the
// 'hit' cell show the normal state's layers as an onion-skin
// underneath the hit-area gizmos.
// underneath the hit-area gizmos. Visibility follows the
// button-specific rule: a still-frame kf renders only on its own
// state, not held into subsequent states.
if (store.activeButtonAssetId) {
const out: StackItem[] = []
const ba = store.activeButtonAsset
@@ -764,6 +769,7 @@ const stackItems = computed<StackItem[]>(() => {
for (const layer of layers) {
if (!layer.visible) continue
if (layer.editorHidden) continue
if (!isButtonLayerActiveAt(layer, store.playhead)) continue
const asset = assetMap.value.get(layer.assetId)
if (!asset) continue
const props = applyLivePose(sampleLayer(layer, store.playhead), layer.id)