Notifications
Clear all

[Closed] Wire in 3ds max

Hi
Consider 2 or more objects are linked together with wire parameter.
Is there any way to collect the master and slave in selected objects, or for whole objects.

2 Replies
delete objects

b1 = box name:#box1 pos:[-50,0,0]
b2 = box name:#box2 pos:[50,0,0]

paramWire.connect b1.baseObject[#Width] b2.baseObject[#Length] "Width"
paramWire.connect2way b1.baseObject[#Height] b2.baseObject[#Height] "Height" "Height"

w1 = b2.length.controller
w2 = b2.height.controller

showinterfaces w1

wireController methods >>

  Interface: wireController
   Properties:
    .numWires : integer : Read
    .isMaster : boolean : Read
    .isSlave : boolean : Read
    .isTwoWay : boolean : Read
    .slaveAnimation : control : Read|Write
   Methods:
    <maxObject>getWireParent <index>index
    <index>getWireSubnum <index>index
    <control>getCoController <index>index
    <string>getExprText <index>index
    <void>setExprText <index>index <string>text
   Actions:
OK

find all float wire controllers:

cc = getclassinstances Float_Wire

Thanks for reply
Actually I’m looking for this

delete objects
b1 = box name:#Big_Master pos:[-50,0,0] wirecolor:red
b2 = box name:#Master pos:[50,0,0] wirecolor:orange
b3 = box name:#slave pos:[150,0,0] wirecolor:blue

paramWire.connect b1.baseObject[#Width] b2.baseObject[#Length] "Width"
paramWire.connect b2.baseObject[#height] b3.baseObject[#height] "height"

In b3 , the height is wired to b2 height,
so b2 control the b3 height

I like to know, in a heavy scene, if i select B3
Is it possible to find B2 (The master of b2 height controller)

cc = getclassinstances Float_Wire	--#(Controller:Float_Wire, Controller:Float_Wire)
cc[1].isSlave	--true
cc[2].isSlave	--true
cc[1].isMaster
cc[2].isMaster

Slv_Controller = b3.height.controller
Slv_Controller.isSlave
Slv_Controller.isMaster
Slv_Controller.getWireParent 1

Slv_Controller = b2.height.controller
Slv_Controller.isSlave		--error
Slv_Controller.isMaster	--error
Slv_Controller.getWireParent 1