Add copy paste audio files onto LoadAudio nodes or canvas (#2716)

This commit is contained in:
bymyself
2025-02-24 14:37:03 -07:00
committed by GitHub
parent 7f98342492
commit aabd409bf7
3 changed files with 27 additions and 2 deletions

View File

@@ -27,6 +27,10 @@ export function isVideoNode(node: LGraphNode | undefined): node is VideoNode {
return node.previewMediaType === 'video' || !!node.videoContainer
}
export function isAudioNode(node: LGraphNode | undefined): boolean {
return !!node && node.previewMediaType === 'audio'
}
export function addToComboValues(widget: IComboWidget, value: string) {
if (!widget.options) widget.options = { values: [] }
if (!widget.options.values) widget.options.values = []