vMix Forums
»
General
»
General Discussion
»
Script to assign an input from a preview to a multiview of another input
Rank: Member
Groups: Registered
Joined: 11/6/2020(UTC) Posts: 21 Location: Saint-Petersburg Thanks: 6 times Was thanked: 1 time(s) in 1 post(s)
|
Has anyone encountered the problem of assigning an input from a preview to a multiview of another input? Code:dim xml = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
'writes the input from the preview to the WhatIsOnPreview variable
dim WhatIsOnPreview = (x.SelectSingleNode("//preview").InnerText)
'replaces the title text with the WhatIsOnPreview value. And it works
API.Function("SetText", Input:="TextHD.xaml", SelectedIndex:="0", Value:=WhatIsOnPreview)
'should assign WhatIsOnPreview to the first layer of the ColorBars's multiview. But it does not! instead, the layer gets the value None
API.Function("SetMultiViewOverlay",Input:="Colour Bars",Value:="1,WhatIsOnPreview")
Thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,221 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
You are trying to embed a string within a string in the function! that's a coding nono you need to Concatenate them Code:API.Function("SetMultiViewOverlay",Input:="Colour Bars",Value:="1," & WhatIsOnPreview )
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 11/6/2020(UTC) Posts: 21 Location: Saint-Petersburg Thanks: 6 times Was thanked: 1 time(s) in 1 post(s)
|
still not working Originally Posted by: doggy You are trying to embed a string within a string in the function! that's a coding nono you need to Concatenate them Code:API.Function("SetMultiViewOverlay",Input:="Colour Bars",Value:="1," & WhatIsOnPreview )
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,221 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
|
|
|
|
Rank: Member
Groups: Registered
Joined: 11/6/2020(UTC) Posts: 21 Location: Saint-Petersburg Thanks: 6 times Was thanked: 1 time(s) in 1 post(s)
|
Sorry, my typo) Yes it works. Thank you very much! Originally Posted by: doggy well it is here !
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/11/2020(UTC) Posts: 31
Thanks: 4 times
|
Originally Posted by: svetotehnik Has anyone encountered the problem of assigning an input from a preview to a multiview of another input?
Thanks! To answer that directly, yes. It's one of the early things I was looking to do. But, scripting is not in intermediate vMix versions and eats into valuable evaluation time, so I had to go another route. Is this possible, without scripting? On a related note (this one may be basic, but I'm not finding it either), is there a shortcut/non-script way to assign "None" (no input) to a multiview layer that already has positioning and an input in it's place? I've just made a transparent input and used a shortcut to assign that in the mean time.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,221 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: mark2020 Originally Posted by: svetotehnik Has anyone encountered the problem of assigning an input from a preview to a multiview of another input?
Thanks! To answer that directly, yes. It's one of the early things I was looking to do. But, scripting is not in intermediate vMix versions and eats into valuable evaluation time, so I had to go another route. Is this possible, without scripting? one can always use external ways of scripting :-) Check the API XML for the input that is in preview and replace the layer of the MV with it Quote:
On a related note (this one may be basic, but I'm not finding it either), is there a shortcut/non-script way to assign "None" (no input) to a multiview layer that already has positioning and an input in it's place? I've just made a transparent input and used a shortcut to assign that in the mean time.
SetLayer : value layernumber,blank
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/11/2020(UTC) Posts: 31
Thanks: 4 times
|
Quote:
On a related note (this one may be basic, but I'm not finding it either), is there a shortcut/non-script way to assign "None" (no input) to a multiview layer that already has positioning and an input in it's place? I've just made a transparent input and used a shortcut to assign that in the mean time.
Quote:
SetLayer : value layernumber,blank
Input,None seems more obvious to me, but I'll have to check if that can be done in Companion or need to change the shortcuts involved.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,221 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: mark2020
Input,None seems more obvious to me
Blank, or leave it empty (= none lol) or any not specific reference to an input doesn't really matter does it ? They seem logical enough to quickly test with and find out if the word None didn't work
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/11/2020(UTC) Posts: 31
Thanks: 4 times
|
Originally Posted by: doggy Originally Posted by: mark2020
Input,None seems more obvious to me
Blank, or leave it empty (= none lol) or any not specific reference to an input doesn't really matter does it ? They seem logical enough to quickly test with and find out if the word None didn't work Turns out it was from doing it by way of Companion. Preview = 0 and PGM = -1. But it would have been nice that the documentation for that shortcut specifically notes a null input is permissible to narrow it down. Incidentally, that also solves the issue assigning the PVW input to a queued set/multiview, then previewing the set without scripts or shortcuts.
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Script to assign an input from a preview to a multiview of another input
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close