How can I assign multiple objects with wire parameters?

How can I assign multiple objects with wire parameters?

Anonymous
Not applicable
3,280 Views
6 Replies
Message 1 of 7

How can I assign multiple objects with wire parameters?

Anonymous
Not applicable

I want one object to control many object's rotation, all on the same axis.

I'v noticed the "wire parameter" option is grayed out when selecting multiple objects.

I'm new to 3Ds max and if can someone provide me with a script with a little explanation of how to make it on multiple objects?

0 Likes
3,281 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Fairly easy. No need for script.

 

Select one taget (at the time)> Go to Motion panel > Click on Rotation (make it blue)> find the box on above called Assign Controller> Assign a Orientation Constraint> In that rollout choose Taget (Sometimes you need the 'Keep initial offset' on, but not always). Done. Repeat.

0 Likes
Message 3 of 7

Anonymous
Not applicable

Thanks. but isn't there wiring you can do with wireParameters that can't be done with constraints? I would really like to know how to do it with wireparameters using MAXScript too.

0 Likes
Message 4 of 7

Steve_Curley
Mentor
Mentor
You can control multiple objects (parameters) from a single source (parameter) with the Parameter Wire dialog very easily, but what you can't do is create those control links all at the same time. Use the Wire Parameters dialog and just keep selecting the same source on one side and different destinations on the other side, make sure the direction is correct and click Connect, then move on to the next object/parameter. Even with a script they would have to be done individually AFAIK - things like this (in Maxscript) tend not to have parameters which are collections (arrays) of controllers to deal with. They're mostly one-to-one relationships.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 5 of 7

Anonymous
Not applicable

Thanks.

 

I guess I will have to learn more on MAXScript to know what it can do.

 

0 Likes
Message 6 of 7

Swordslayer
Advisor
Advisor

Well, individually in a loop, which is still much easier (and a one-liner, anyway). For example in this scene setup

 

delete objects
master = dummy prefix:#master pos:[0,10,0] boxSize:[5,5,5]
for x = -5 to 5 do for y = -5 to 5 do box prefix:#slave width:0.5 length:0.5 height:0.5 pos:[x,y,0]

connecting the dummy rotation divided by two to all the boxes would be

 

for obj in $slave* do paramWire.connect master[#transform][#rotation][#z_rotation] obj[#transform][#rotation][#z_rotation] "z_rotation / 2"

In some cases, a better solution might be to use script controller or expression controller, or even instance the original controller if you don't want to change the value, i.e.:

 

for obj in $slave* do obj.rotation.controller[3].controller = master.rotation.controller[3].controller

 

0 Likes
Message 7 of 7

Anonymous
Not applicable

@Anonymous wrote:

Well, individually in a loop, which is still much easier (and a one-liner, anyway). For example in this scene setup

 

delete objects
master = dummy prefix:#master pos:[0,10,0] boxSize:[5,5,5]
for x = -5 to 5 do for y = -5 to 5 do box prefix:#slave width:0.5 length:0.5 height:0.5 pos:[x,y,0]

connecting the dummy rotation divided by two to all the boxes would be

 

for obj in $slave* do paramWire.connect master[#transform][#rotation][#z_rotation] obj[#transform][#rotation][#z_rotation] "z_rotation / 2"

In some cases, a better solution might be to use script controller or expression controller, or even instance the original controller if you don't want to change the value, i.e.:

 

for obj in $slave* do obj.rotation.controller[3].controller = master.rotation.controller[3].controller

 


 

Thank you! 🙂

0 Likes