Viz Arc Script Guide
Version 1.7 | Published November 15, 2022 ©
Action Properties
All Actions in the project can be accessed and modified via scripting. Use the GetAction function to get a reference to the action:
-
BaseAction GetAction(string actionName)
Note: It's possible for a project to contain multiple actions that have the same name. If that is the case for your project, the first Action created with a name is returned. Make sure to use unique names when accessing actions through scripting.
Every Action type has these generic properties:
Action type |
Description |
string Name |
The title of the action. |
string Description |
By default this is the type of action (for example, "Key", "Chroma", "Image" etc.). When assigned to a TransformationAction and visible on the SET view, this field is used as a tooltip when the mouse hovers over the element. |
int ExecutionDelay |
Expressed in milliseconds, minimum delay is 0 (default), maximum delay is 10000 (10 seconds). |
Every Action type has these generic methods:
-
void Execute(): Executes the action.
-
void Preview(): Executes the action on the preview channel.
-
void QueryState(): Queries the current state of the action from the Editing Engine. For example, if the action is a transformation action, it retrieves the current transformation from the editing engine's scene tree and updates the UI accordingly.
The example below shows how to set the alpha value to 75% of an Alpha Action called AlphaText and execute the action from scripting:
var
alphaAction = GetAction(
"AlphaText"
);
alphaAction.Alpha = 75.0;
alphaAction.Execute();
There are specific properties/functions for each action type:
Alpha
Properties:
-
double Alpha
Chroma
Properties:
-
ChromaPrecisionContent Precision
-
double hueAdjust
-
double saturationAdjust
-
int edgeBlur
-
double despillScale
-
double backingPlateR
-
double backingPlateR
-
double backingPlateR
-
double yellowGain
-
double cyanGain
-
int denoiseRadius
-
int denoiseSharpen
-
double opacityPoint
-
doube transparencyPoint
-
double bgEdgeGain
-
double bgSpillGain
-
double bgLWBlur
-
double colorEdgeGain
-
double colorSpillGain
-
double colorLightwrapR
-
double colorLightwrapG
-
double colorLightwrapB
-
bool addShadows
-
double innerShadows
-
double shadowsGain
-
bool addHighlights
-
double innerHighlights
-
double highlightsGain
-
double masterLiftR
-
double masterLiftG
-
double masterLiftB
-
double masterGammaR
-
double masterGammaG
-
double masterGammaB
-
double masterGainR
-
double masterGainG
-
double masterGainB
-
double masterSaturation
-
var
action = GetAction(
"Chroma"
);
// sample for setting some color Precision Keyer settings
action.Precision.hueAdjust = -1140;
action.Precision.saturationAdjust = 2.0;
Command
Properties:
-
string Command
ControlObject
Director
Properties:
-
string DirectorType
-
Possible values: START, STOP, CONTINUE, CONTINUE_REVERSE, PLAY_FROM, PLAY_FROM_REVERSE, FROM_TO, GO_TO, PAUSE
-
Group
This action has no additional public properties.
Image
Properties:
-
string Image
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
bool IsBuiltin
-
string Builtin
-
Possible values: LIVE1, LIVE2, CLIP1, etc.
-
-
double PosX
-
double PosY
-
double RotX
-
double RotY
-
double RotZ
-
double ScaX
-
double ScaY
The Image parameter can be assigned to a Graphic Hub path when the string starts with "IMAGE*"; when it starts with "http" it will be assumed to be a web link (or a Media Service link), otherwise it will be interpreted as a local file path, see the samples below:
var
imageAction = GetAction(
"Image"
);
imageAction.Image =
"IMAGE*/VizArc/arcLogo"
;
// or
imageAction.Image =
"http://127.0.0.1:21099/serve/original/AR_03.jpg"
;
// or
imageAction.Image =
"C:/Users/admin/Desktop/CAKE.jpg"
;
Light
Properties:
-
string LightType [read only]
-
Possible values: NONE, SPOTLIGHT, DIRECTIONAL, AREA, POINT
-
-
string LightColor
-
double LightIntensity
-
double DiffuseIntensity
-
double SpecularIntensity
-
double LightRadius
-
double OuterConeAngle
-
double InnerConeAngle
-
int LightLayer
-
double DirectionalSpread
-
double RadiosityMultiplier
Key
Properties:
-
bool KeyEnabled
-
bool CombineBackground
-
bool DepthInfoOnly
-
bool DrawKey
-
bool DrawRGB
Material
Properties:
-
string ColorHex [#RRGGBB]
-
string Diffuse [#RRGGBB]
-
string Emission [#RRGGBB]
-
string Specular [#RRGGBB]
-
string Ambient [#RRGGBB]
-
double Alpha [0…100]
-
double Shiniess [0…100]
-
bool UseSimpleColor
Functions:
-
SetColorRBG(int r, int g, int b)
MSE
Properties:
-
string Page
-
string DirectorType
-
Possible values: TAKE, CONTINUE, TAKE_OUT
-
Multizone Chroma Key
Properties:
-
string ZoneName
-
double Height
-
double Altitude
-
double Luminance
-
double MinLuminance
-
double MinGrad
-
double MaxLuminance
-
double MaxGrad
-
double Blend
-
double U
-
double V
-
double UVDiameter
-
double UVGradient
-
bool IsFullscreen
-
bool PickLuma
-
bool PickChroma
-
bool PickInViz
NDI
Properties:
-
int Preset
-
Value must be between 0 and 99
-
-
float Velocity
-
Value must be between 0 and 1
-
Omo
Properties:
-
int ElementIndex
-
bool ShowUntil
PBR
Properties:
-
Modes
-
bool IsPreload
-
bool IsGHMode
-
-
GH Mode
-
string PhongMaterialAsset
-
Value should be a Graphic Hub path that starts with "MATERIAL_DEFINITION*"
-
-
-
Values Mode
-
Material Settings
-
string ColorTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
|string ColorTint
-
bool ColorIsSRGB
-
string EmissiveTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
string EmissiveColor
-
double EmissiveIntensity
-
string NormalTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
string RoughnessTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
double RoughnessFactor
-
string MetallicTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
double MetallicFactor
-
string AmbientOcclusionTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
string HeightTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
double HeightDepth
-
string EnvironmentTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
double EnvironmentRotation
-
-
Texture Settings
-
double TillingU
-
double TillingV
-
double UvAngle
-
double UvScaleU
-
double UvScaleV
-
double UvOffsetU
-
double UvOffsetV
-
-
Phong
Properties:
-
Modes
-
bool IsPreload
-
bool IsGHMode
-
-
GH Mode
-
string PbrMaterialAsset
-
Value should be a Graphic Hub path that starts with "MATERIAL_DEFINITION*"
-
-
-
Values Mode
-
Material Settings
-
string ColorTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
|string ColorTint
-
bool ColorIsSRGB
-
string AmbientTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
string AmbientColor
-
For example: "#FF00A0"
-
-
double AmbientIntensity
-
string DiffuseTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
string DiffuseColor
-
For example: "#FF00A0"
-
-
double DiffuseIntensity
-
string SpecularTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
string SpecularColor
-
For example: "#FF00A0"
-
-
double SpecularIntensity
-
string EmissiveTexture
-
Value should be a Graphic Hub path that starts with "IMAGE*"
-
-
string EmissiveColor
-
For example: "#FF00A0"
-
-
double EmissiveIntensity
-
double Shininess
-
bool Lit
-
Whether the material should be lit
-
-
-
Texture Settings
-
double UvAngle
-
double UvScaleU
-
double UvScaleV
-
double UvOffsetU
-
double UvOffsetV
-
-
Scene Loader
Properties:
-
bool UseGUID
-
string FrontUUID
-
string MainUUID
-
string BackUUID
-
string GfxUUID
-
string SubSceneUUID
-
bool FrontClear
-
bool MainClear
-
bool BackClear
-
bool GfxClear
-
bool SubSceneClear
-
bool FrontResetStage
-
bool MainResetStage
-
bool BackResetStage
-
bool GfxResetStage
-
int GfxLayerNumber [0,…,17]
-
bool SubSceneResetStage
Script
Functions:
-
dynamic GetParameterValue(string name)
-
Returns the value of a Script UI element. The name is the name of the UI parameter as specified in the viz script by the RegisterParameter* function.
-
-
bool SetParameterValue(string name, dynamic value)
-
Sets the value for a UI parameter. The name is the name of the UI parameter as specified in the viz script by the RegisterParameter* function. Returns true on success.
-
// get the script action with the name "scriptA"
let action = GetAction(
"scriptA"
)
// set some parameter values
action.SetParameterValue(
"aDouble"
, 3.3)
action.SetParameterValue(
"aInteger"
, 2)
action.SetParameterValue(
"aString"
,
"another string"
)
action.SetParameterValue(
"aMultiString"
,
"another\\nmultistring"
)
action.SetParameterValue(
"aBool"
,
false
)
action.SetParameterValue(
"aImage"
,
"c:/tmp/test.jpg"
)
// read the parameter values
Console.WriteLine(
"aDouble value is "
+ action.GetParameterValue(
"aDouble"
))
Telemetrics
Properties:
-
int Program
-
int Scene
Text
Properties:
-
string Text
Tracking Hub Command
Properties:
-
string Command
Transformation
Properties:
-
double PosX
-
double PosY
-
double PosZ
-
bool PosEnabled
-
double RotX
-
double RotY
-
double RotZ
-
bool RotEnabled
-
double ScaX
-
double ScaY
-
double ScaZ
-
bool ScaEnabled
Utah Router
Properties:
-
int Source
-
int Desitnation
Unreal Animation
Properties:
-
string AnimationMode
-
Possible values: LOAD, CONTINUE, PAUSE
-
-
bool IsLooping
-
double PlayRate
-
double BlendTime
-
string SelectedAnimation
Unreal Blueprint
Unreal Dispatcher
This action has no additional public properties.
Unreal Scene Loader
This action has no additional public properties.
Unreal Sequencer
Properties:
-
string DirectorType
-
Possible values: START, STOP, CONTINUE, START_REVERSE, CONTINUE_REVERSE, PLAY_FROM, PLAY_FROM_REVERSE, GO_TO, PAUSE
-
-
int LoopCount
-
double PlayRate
Unreal Text
Properties:
-
string Text
-
double ScaleX
-
double ScaleY
Vinten
This action has no additional public properties.
Virtual Studio
Properties:
-
int SelectedSceneIndex
-
bool SendPosition
-
string SetName
-
double PosX
-
double PosY
-
double PosZ
-
double RotY
Visibility
Properties:
-
bool Visibility
-
string VisibilityMode
-
Possible values: ON, OFF, ONOFF, DUAL_MODE
-
Viz Camera
Properties:
-
int SelectedCamera
-
bool RemoteEnabled
-
bool IsRemote
-
bool AngleEnabled
-
double Angle
-
bool PosEnabled
-
double PosX
-
double PosY
-
double PosZ
-
bool DirEnabled
-
double Pan
-
double Tilt
-
double Twist
Viz Clip
Properties:
-
string ClipName
-
bool IsLoader
-
string ControlType
-
possible values: START, STOP, CONTINUE, PAUSE
-
-
string SelectedClipChannel
-
bool PlayOnLoad
-
bool HasLoop
-
bool ShouldQueue
Viz PBR Material
Properties:
-
bool IsPreLoad
-
bool IsGHMode
-
string PbrMaterialAsset
-
string ColorTexture
-
string ColorTint
-
For example: "#FF00A0"
-
-
bool ColorIsSRGB
-
string EmissiveTexture
-
string EmissiveColor
-
For example: "#FF00A0"
-
-
double EmissiveIntensity
-
string NormalTexture
-
string RoughnessTexture
-
double RoughnessFactor
-
string MetallicTexture
-
double MetallicFactor
-
string AmbientOcclusionTexture
-
string HeightTexture
-
double HeightDepth
-
string EnvironmentTexture
-
double EnvironmentRotation
-
double TillingU
-
double TillingV
-
double UvAngle
-
double UvScaleU
-
double UvScaleV
-
double UvOffsetU
-
double UvOffsetV