Interface: paramWire

Parameter Wiring

This class represents the interface that provides general access to the parameter wiring functions.

<void>start()

This method will launch the parameter wiring UI mode on the currently selected object. Only works if there is a single object selected in the viewport. It will move the cursor to the pivot point of the node.

Example:

It might be used in a macroScript like this:

macroScript paramWire

category:"Tools"

buttonText:"Wire Parameters"

tooltip:"Start Param Wiring"

Icon:#("MAXScript",1)

(

on execute do paramWire.start()

on isEnabled return selection.count == 1

)

 

<void>openEditor()

This method will open up the parameter wiring dialog on the selected objects with no track selected in either tree view.

 

<void>editParams <value>leftParam <value>rightParam

Opens the parameter wiring editor dialog on the parameters specified. The parameter is specified as a SubAnim in MAXScript, via the index [] operator on a 3ds Max object.

<value>leftParam: The sub-animatable of the left-hand reference target.

<value>rightParam: The sub-animatable of the right-hand reference target.

Note:

The subanim index operator can also take number indexes.

 

<void>editParam <value>param

Opens the parameter wiring editor dialog on the parameter specified. The parameter is specified as a SubAnim in MAXScript, via the index [] operator on a 3ds Max object.

<value>param: The sub-animatable of the left-hand reference target.

Example:

-- The radius parameter in a sphere node

paramWire.editParam $sphere01.baseObject[#radius]

-- The angle parameter in a bend modifier would be

paramWire.editParam $foo.bend[#angle]

-- The position parameter in node would be

paramWire.editParam $foo[#transform][#position], etc.

 

<void>editControllers <control>leftController <control>rightController

Opens the parameter wiring editor dialog on the two given existing wire controllers.

<control>leftController: A pointer to the controller for the left-hand wire.

<control>rightController: A pointer to the controller for the right-hand wire.

 

<void>editController <control>controller

Opens the parameter wiring editor dialog on the given existing wire controller.

<control>controller: A pointer to the controller being edited.

Example:

paramWire.editController $foo.radius.controller

 

<bool>connect <value>fromParam <value>toParam <string>toExpr

This method allows you to set up a one-way parameter wire from the 'fromParam' subAnim to the 'toParam' subAnim, using the 'toExpr' as the expression for the controlled parameter. Returns true if the connection can be made, otherwise false.

<value>fromParam: The sub-animatable to wire from.

<value>toParam: The sub-animatable to wire to.

<string>toExpr: A string containing the expression on the "to wire".

Example:

paramWire.connect $foo.baseObject[#radius] $baz.bend[#angle] "radius / 2"

 

<bool>connect2Way <value>leftParam <value>rightParam <string>leftExpr <string>rightExpr

This method allows you to set up a two-way parameter wire between the 'leftParam' parameter and the 'rightParam’ parameter, with the given expression strings. Returns true if the connection can be made, otherwise false.

<value>leftParam: The sub-animatable of the left-hand reference target.

<value>rightParam: The sub-animatable of the right-hand reference target.

<string>leftExpr: A string containing the expression for the left-hand target.

<string>rightExpr: A string containing the expression for the right-hand target.

Example:

paramWire.connect2Way $foo.baseObject[#radius] $baz.bend[#angle] \ "angle / 2" "radius * 2"

 

<bool>disconnect <control>controller

This method allows you to disconnect a one-way wireController from its current parameter, replacing it with either the wire's existing animation track or a default controller for the parameter. Returns true if the disconnect was successful, otherwise false.

<control>controller: A pointer to the wire controller you wish to disconnect.

 

<bool>disconnect2Way <control>leftController <control>rightController

This method allows you to disconnect a two-way wire between ‘leftcontroller’ and ‘rightController’. If this is the last two-way wire for either controller, replace it with either the the wire's existing animation track or a default controller for the parameter. Returns true if the disconnect was successful, otherwise false.

<control>leftController: A pointer to the first wire controller you wish to disconnect.

<control>rightController: A pointer to the second wire controller you wish to disconnect.

See also Class IparamWireMgr, in the SDK Help file accompanying this product.

See also

Parameter Wiring

Float_Wire : FloatController

Point3_Wire : Point3Controller

Position_Wire : PositionController

Rotation_Wire : RotationController

Scale_Wire : ScaleController