logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
svetotehnik  
#1 Posted : Monday, February 8, 2021 6:43:49 PM(UTC)
svetotehnik

Rank: Member

Groups: Registered
Joined: 11/6/2020(UTC)
Posts: 21
Russian Federation
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")



UserPostedImage

Thanks!
doggy  
#2 Posted : Monday, February 8, 2021 6:53:29 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,221
Belgium
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 )
thanks 1 user thanked doggy for this useful post.
svetotehnik on 2/8/2021(UTC)
svetotehnik  
#3 Posted : Monday, February 8, 2021 7:02:27 PM(UTC)
svetotehnik

Rank: Member

Groups: Registered
Joined: 11/6/2020(UTC)
Posts: 21
Russian Federation
Location: Saint-Petersburg

Thanks: 6 times
Was thanked: 1 time(s) in 1 post(s)
still not working

Originally Posted by: doggy Go to Quoted Post
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 )


doggy  
#4 Posted : Monday, February 8, 2021 7:05:51 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,221
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
well it is here !
svetotehnik  
#5 Posted : Monday, February 8, 2021 7:09:23 PM(UTC)
svetotehnik

Rank: Member

Groups: Registered
Joined: 11/6/2020(UTC)
Posts: 21
Russian Federation
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 Go to Quoted Post
well it is here !


mark2020  
#6 Posted : Saturday, February 13, 2021 10:45:47 AM(UTC)
mark2020

Rank: Advanced Member

Groups: Registered
Joined: 12/11/2020(UTC)
Posts: 31

Thanks: 4 times
Originally Posted by: svetotehnik Go to Quoted Post
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.
doggy  
#7 Posted : Saturday, February 13, 2021 5:19:35 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,221
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: mark2020 Go to Quoted Post
Originally Posted by: svetotehnik Go to Quoted Post
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

thanks 1 user thanked doggy for this useful post.
mark2020 on 2/13/2021(UTC)
mark2020  
#8 Posted : Saturday, February 13, 2021 9:27:25 PM(UTC)
mark2020

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.
doggy  
#9 Posted : Saturday, February 13, 2021 9:41:18 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,221
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: mark2020 Go to Quoted Post


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
mark2020  
#10 Posted : Sunday, February 14, 2021 2:24:39 AM(UTC)
mark2020

Rank: Advanced Member

Groups: Registered
Joined: 12/11/2020(UTC)
Posts: 31

Thanks: 4 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: mark2020 Go to Quoted Post


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.
Users browsing this topic
Guest (4)
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.