Skip to content

Commit 7f4ff9f

Browse files
authored
Merge pull request #3338 from SIsilicon/patch-1
Update condition check in animator channel bar
2 parents 9cd07af + 951b5f1 commit 7f4ff9f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

js/animations/timeline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1778,7 +1778,7 @@ Interface.definePanels(() => {
17781778
<div class="animator_channel_bar"
17791779
v-bind:style="{width: (size*length + head_width)+'px'}"
17801780
v-for="(channel_options, channel) in animator.channels"
1781-
v-if="animator.expanded && channels[channel] != false && Condition(channel_options.condition) && (!channels.hide_empty || animator[channel].length)"
1781+
v-if="animator.expanded && channels[channel] != false && Condition(channel_options.condition, animator) && (!channels.hide_empty || animator[channel].length)"
17821782
>
17831783
<div class="channel_head"
17841784
:class="{selected: graph_editor_open && animator.selected && graph_editor_channel == channel}"

types/custom/animation.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,15 @@ interface AddChannelOptions {
174174
transform?: boolean
175175
mutable?: boolean
176176
max_data_points?: number
177-
condition?: ConditionResolvable
177+
condition?: ConditionResolvable<GeneralAnimator>
178178
displayFrame?: (animator: GeneralAnimator, multiplier: number) => void
179179
}
180180
interface Channel {
181181
name: string
182182
transform: boolean
183183
mutable: boolean
184184
max_data_points: number
185+
condition?: ConditionResolvable<GeneralAnimator>
185186
}
186187
declare class GeneralAnimator {
187188
constructor(uuid: string | null, animation: _Animation, name: string)

0 commit comments

Comments
 (0)