DisconnectFxOp
 
 
 

DisconnectFxOp

Introduced

v3.0

Description

Disconnects an input connection from the FxOperator.

Scripting Syntax

DisconnectFxOp( [Op], [Connection] );

Parameters

Parameter Type Description
Op String or FxOperator Object pointer or Object name of FxOperator to connect.

Default Value: Current selection.

Note: If the current selection is not a valid FxOperator, an error occurs.

Connection String Index or name of the connection.

Note: the index is 1-based (ie., the index starts at 1 instead of 0), and you must use quotation marks around the index value. For example, "1", "2", etc.

Examples

VBScript Example

' This example creates an FxTree, adds and connects the LowPassFilter and 
' HighPassFilter operators to it, and then disconnects them
set oTree = CreateFxTree()
set oSrc = AddFxOp( oTree, "LowPassFilter" )
set oDest = AddFxOp( oTree, "HighPassFilter" )
' This prints out a message that the operator is not connected
checkForCnxs oDest
' Connect the operator (so there is something to disconnect
ConnectFxOp oSrc, oDest, "Input"
' This prints out a list of three operators (Input, Obey Matte, and Output)
checkForCnxs oDest
' Now disconnect the operator
DisconnectFxOp oDest, "Input"
' This prints out a message that the operator is not connected
checkForCnxs oDest
function checkForCnxs( in_operator )
        ' Here you can use the object model 
        ' FxOperator.IsConnected method because the return value
        ' of the ConnectFxOp command is the FxOperator
        if in_operator.IsConnected(0) then
                Application.LogMessage "The " & in_operator.Name _
                        & " operator is connected to these operators:"
                for i = 0 to in_operator.ConnectionCount - 1
                        Application.LogMessage in_operator.GetConnectionName(i)
                next
        else
                Application.LogMessage "The " & in_operator.Name _
                        & " operator is not connected."
        end if
end function
' Output of above script...
' (before connecting the operators):
'INFO : "The HighPassFilter operator is not connected."
' (after connecting the operators):
'INFO : "The HighPassFilter operator is connected to these operators:"
'INFO : "Input"
'INFO : "Obey Matte"
'INFO : "Output"
' (after disconnecting the operators):
'INFO : "The HighPassFilter operator is not connected."