Vizrt Code: Visual Basic Scripting
Example Code
Viz-Copilot Template Manager
Instead of having your News Team writing the name you can code it to save to the naming convention you want. Having them only typing what is needed if anything else. Saving editing time for each template in the newsroom. "You see this working when you click the template save button in the viz co-pilot plugin in the newsroom's editing system or on your test viz co-pilot web page."
Change the text to what you want that is this color. You can also add more code to make it better for your needs.
​
'------------Save Name
Function SC_SaveName
Dim saveName
saveName = "THE NAME"
SC_SaveName = saveName
End Function
Sub btnSaveClick(Sender)
MsgBox(SC_SaveName)
End Sub
'------------End Save Name
Viz-Director Macro
Instead of having your News Team and Production place a commonly used scene in the rundown have it hot keyed! With a toggle button and scene. For this to work you must use a scene with a reset built into it's time line. Also if you do not know the layering system of Vizrt do not use this marco or just use MAIN_LAYER instead of FRONT_LAYER in the macro, so the next graphic will kick out this one.
'Type the path to the scene you want to playout where "SCENE PATH" text is at.
viz:send_cmd_program RENDERER*FRONT_LAYER SET_OBJECT SCENE*SCENE PATH
viz:send_cmd_program RENDERER*FRONT_LAYER*STAGE CONTINUE
Viz-Trio Macro
Instead of having your News Team and Production place a commonly used Wipe scene in the rundown have it hot keyed! With a play button and scene. For this to work you must use a scene with a reset built into it's time line. Also if you do not know the layering system of Vizrt do not use this marco or just use MAIN_LAYER instead of FRONT_LAYER in the macro, so the next graphic will kick out this one.
'Type the path to the scene you want to playout where "SCENE PATH" text is at.
trio:send_vizcmd_to_channel Viz2 RENDERER*FRONT_LAYER SET_OBJECT SCENE*SCENE PATH;
trio:send_vizcmd_to_channel Viz2 RENDERER*FRONT_LAYER*STAGE START;
Viz Artist - Scripting Node
What this code does is to allow a change of the dynamic texture though the use of the database and tells it to start as soon as it is changed. This can be useful when you are trying to save memory use in your show you are running to help prevent errors. Caused less stress on the server. With the help of this script and some others I have made I took a 124 mb file to a 14 mb file. Might not sound like much but you be surprised of the differences when ran.
​
SUB DynamicSceneC()
dim CC as Container = Scene.findcontainer("BG_T_TXT_CTL1")
dim CCLOC as string
CCLOC = CC.geometry.text
println CCLOC
dim dynId as string = System.SendCommand("#" & Scene.FindContainer("BACKGROUND").Texture.VizId & "*IMAGE*OBJECT_ID GET")
System.SendCommand(dynId & "*DYNAMIC*SUBSCENE*SCENE SET " & CCLOC)
dim SceneName as string = SendCommand("SCENE*" & CCLOC & "*STAGE START")
SendCommand(SceneName)
end sub
sub OnGeometryChanged(geom As Geometry)
DynamicSceneC()
end sub
sub OnInit()
dim CC as Container = Scene.Findcontainer("BG_T_TXT_CTL1")
CC.geometry.RegisterTextChangedCallback
end sub