ProxyParameter.MasterParameter operator

Introduced

v3.0

Description

Returns the master Parameter property, which is only available on proxy parameters, provides access to the real (master) parameter that the proxy parameter represents.

Examples

1. VBScript Example

'MasterParameter property
dim oRoot, oPSet, oPrxyPSet
set oRoot = Application.ActiveProject.ActiveScene.Root
set oPSet = oRoot.AddProperty("Custom_parameter_list",,"RealParams")                                                    
oPSet.AddParameter3 "B", siInt4, 5, 0, 10 
set oPrxyPSet = oRoot.AddProperty("Custom_parameter_list",,"ProxyParams")                                                       
oPrxyPSet.AddProxyParameter oPSet.Parameters( "B" )
'Also add some proxy parameters to other parameters in the scene
oPrxyPSet.AddProxyParameter "light.LightShader.out.color.red"
oPrxyPSet.AddProxyParameter "Camera.camdisp.camdispgenpage.antialias"
logmessage IsProxyParam( oPSet.Parameters( "B" ) )
logmessage IsProxyParam( oPrxyPSet.Parameters( "Scene_Root_RealParams_B" ) )
logmessage IsProxyParam( oPrxyPSet.Parameters( "light_light_soft_light_color_red" ) )
logmessage IsProxyParam( oPrxyPSet.Parameters( "Camera_antialias" ) )
logmessage oPrxyPSet.Parameters( "Camera_antialias" ) & " is a proxy parameter to " & _
oPrxyPSet.Parameters( "Camera_antialias" ).MasterParameter
function IsProxyParam( in_oParam )
        IsProxyParam = ( typename( in_oParam ) = "ProxyParameter" )
end function
'Output of this example is the following:
'INFO : "False"
'INFO : "True"
'INFO : "True"
'INFO : "True"
'INFO : "ProxyParams.Camera_Antialias is a proxy parameter to Camera.camdisp.antialias"

2. JScript Example

//JScript example - MasterParameter property
var oRoot, oPSet, oPrxyPSet ;
oRoot = Application.ActiveProject.ActiveScene.Root ;
oPSet = oRoot.AddProperty("Custom_parameter_list",false,"RealParams") ;
oPSet.AddParameter3( "B", siInt4, 5, 0, 10 ) ;
oPrxyPSet = oRoot.AddProperty("Custom_parameter_list",false,"ProxyParams") ;
oPrxyPSet.AddProxyParameter( oPSet.Parameters( "B" ) ) ;
//Also add some proxy parameters to other parameters in the scene
oPrxyPSet.AddProxyParameter( "light.LightShader.out.color.red" ) ;
oPrxyPSet.AddProxyParameter( "Camera.camdisp.camdispgenpage.antialias" ) ;
logmessage( IsProxyParam( oPSet.Parameters( "B" ) ) ) ;
logmessage( IsProxyParam( oPrxyPSet.Parameters( "Scene_Root_RealParams_B" ) ) ) ;
logmessage( IsProxyParam( oPrxyPSet.Parameters( "light_light_soft_light_color_red" ) ) );
logmessage( IsProxyParam( oPrxyPSet.Parameters( "Camera_antialias" ) ) ) ;
logmessage( oPrxyPSet.Parameters( "Camera_antialias" ) + 
                        " is a proxy parameter to " +
                        oPrxyPSet.Parameters( "Camera_antialias" ).MasterParameter ) ;
function IsProxyParam( in_oParam )
{
        return ( Application.ClassName( in_oParam ) == "ProxyParameter" ) ;
}
//Output of this example is the following:
//INFO : "False"
//INFO : "True"
//INFO : "True"
//INFO : "True"
//INFO : "ProxyParams.Camera_Antialias is a proxy parameter to Camera.camdisp.antialias"

See Also

CustomProperty.AddParameter CustomProperty.AddProxyParameter AddProxyParam