Skip to content

Commit

Permalink
Feat: Support for title variables using name instead of index
Browse files Browse the repository at this point in the history
  • Loading branch information
thedist committed Nov 30, 2024
1 parent 8df2aea commit 3ddc5fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ This module now supports Companions HTTP API, providing endpoints that can be us
- `output_X_source`, `output_X_ndi`, `output_X_srt` (X = 1 to 4)
- `stream_4_active`, `stream_5_active`
- `input_X_volume_f1`, `input_X_volume_f1_db`, `input_X_volume_f1_linear`, `input_X_volume_f2`, `input_X_volume_f2_db`, `input_X_volume_f2_linear` (volume_f1 and volume_f2 variables are for inputs with separate mono enabled)
- `input_X_layer_NAME_titletext` (Previously the titletext variables only used layer Index, now they can also use Layer Name instead. Note: Some special characters in the name may not be supported)
- Updated `Overlay - Functions` Action to include options to select Mix for the Overlay
- Updated `Output - MultiCorder / Recording / Streaming` Action, and `vMix - Status` Feedback, to support up to 5 streams
- Updated `Transition - Set Auto Transition Effect` Action to support setting a GT Input to a Stinger transition
Expand Down
1 change: 1 addition & 0 deletions docs/PATCH_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- `output_X_source`, `output_X_ndi`, `output_X_srt` (X = 1 to 4)
- `stream_4_active`, `stream_5_active`
- `input_X_volume_f1`, `input_X_volume_f1_db`, `input_X_volume_f1_linear`, `input_X_volume_f2`, `input_X_volume_f2_db`, `input_X_volume_f2_linear` (volume_f1 and volume_f2 variables are for inputs with separate mono enabled)
- `input_X_layer_NAME_titletext` (Previously the titletext variables only used layer Index, now they can also use Layer Name instead. Note: Some special characters in the name may not be supported)
- Updated `Overlay - Functions` Action to include options to select Mix for the Overlay
- Updated `Output - MultiCorder / Recording / Streaming` Action, and `vMix - Status` Feedback, to support up to 5 streams
- Updated `Transition - Set Auto Transition Effect` Action to support setting a GT Input to a Stinger transition
Expand Down
11 changes: 11 additions & 0 deletions src/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ export class Variables {
name: `Dynamic Input ${dynamic + 1} layer ${textLayer.index} Title Text`,
variableId: `dynamic_input_${dynamic + 1}_layer_${textLayer.index}_titletext`,
})
variables.add({
name: `Dynamic Input ${dynamic + 1} layer ${textLayer.name} Title Text`,
variableId: `dynamic_input_${dynamic + 1}_layer_${textLayer.name}_titletext`,
})
})
}

Expand Down Expand Up @@ -699,6 +703,11 @@ export class Variables {
name: `Input ${title} layer ${textLayer.index} Title Text`,
variableId: `input_${type}_layer_${textLayer.index}_titletext`,
})

inputSet.add({
name: `Input ${title} layer ${textLayer.name} Title Text`,
variableId: `input_${type}_layer_${textLayer.name}_titletext`,
})
})
}

Expand Down Expand Up @@ -1479,6 +1488,7 @@ export class Variables {
if (input.text) {
input.text.forEach((textLayer) => {
newVariables[`dynamic_input_${dynamic + 1}_layer_${textLayer.index}_titletext`] = textLayer.value
newVariables[`dynamic_input_${dynamic + 1}_layer_${textLayer.name}_titletext`] = textLayer.value
})
}

Expand Down Expand Up @@ -1733,6 +1743,7 @@ export class Variables {
if (input.text) {
input.text.forEach((textLayer) => {
newVariables[`input_${type}_layer_${textLayer.index}_titletext`] = textLayer.value
newVariables[`input_${type}_layer_${textLayer.name}_titletext`] = textLayer.value
})
}

Expand Down

0 comments on commit 3ddc5fa

Please sign in to comment.