Interface: paramWire

Interfaces > Core Interfaces > paramWire

 

   

Core Interfaces - Quick Navigation

Parameter Wiring

The paramWire Core Interface provides general access to the parameter wiring functions introduced in 3ds Max 4.

   

Methods:

<void>paramWire.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 can 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>paramWire.openEditor() 

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

   

<void>paramWire.editParams <value>leftParam <value>rightParam 

Opens the parameter wiring editor dialog on the parameters specified. The parameter is specified as a SubAnim in MAXScript using 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>paramWire.editParam <value>param 

Opens the parameter wiring editor dialog on the parameter specified. The parameter is specified as a SubAnim in MAXScript using 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
s = sphere()
paramWire.editParam $sphere001.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>paramWire.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>paramWire.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>paramWire.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>paramWire.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>paramWire.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>paramWire.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 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