Float Limit Controller multiple objects.

Float Limit Controller multiple objects.

saqibhussain88
Contributor Contributor
724 Views
3 Replies
Message 1 of 4

Float Limit Controller multiple objects.

saqibhussain88
Contributor
Contributor

Hi Guys is there any Scrip that i can Apply Flaot Limit Controller to multiple Objects?

i am Using this Script but i need to Select my All Object one by one to Apply this Script i was Wondering if Anyone Can Change the Script for Mutiple Objects. or i can Add All the names in this Script so that it Can Apply Float Limit Controller to All Objects.this is the Script i Record With Macro Recorder. 

 

select $CTRL_R_eye_blink
$.pos.controller.X_Position.controller = float_limit ()
$.pos.controller.X_Position.controller.upper_limit = 0
$.pos.controller.X_Position.controller.lower_limit = 0
$.pos.controller.Y_Position.controller = float_limit ()
$.pos.controller.Y_Position.controller.upper_limit = 1
$.pos.controller.Y_Position.controller.lower_limit = -1
$.pos.controller.Z_Position.controller = float_limit ()
$.pos.controller.Z_Position.controller.upper_limit = 0
$.pos.controller.Z_Position.controller.lower_limit = 0

 

0 Likes
Accepted solutions (3)
725 Views
3 Replies
Replies (3)
Message 2 of 4

leeminardi
Mentor
Mentor
Accepted solution

There's probably a more elegant way to do this but this will work.  First select the objects to which you want to assign the limit controllers.

for i=1 to selection.count do ( 
selection[i].pos.controller.X_Position.controller = float_limit ()
selection[i].pos.controller.X_Position.controller.upper_limit = 0
selection[i].pos.controller.X_Position.controller.lower_limit = 0
selection[i].pos.controller.Y_Position.controller = float_limit ()
selection[i].pos.controller.Y_Position.controller.upper_limit = 1
selection[i].pos.controller.Y_Position.controller.lower_limit = -1
selection[i].pos.controller.Z_Position.controller = float_limit ()
selection[i].pos.controller.Z_Position.controller.upper_limit = 0
selection[i].pos.controller.Z_Position.controller.lower_limit = 0
)
lee.minardi
0 Likes
Message 3 of 4

saqibhussain88
Contributor
Contributor
Accepted solution

Wow its work Like Charm.in more thing

how can i Assign Moprh Target to my Controlers by Script i also Tried Same way Using Wiring Parameter and Record with macro Script and i am getting this,i was Wondering if i can Assign my All Controlers names With Morpher Modifier Target Number.so i can assign Automaticaly instead of Doing Manualy?do you think is it Possible?

 

select $CTRL_R_brow_raiseIn
macros.run "Parameter Wire" "paramWire"
paramWire.connect $.pos.controller.Y_Position.controller.Limited_Controller__Float_Limit.controller
[#Limited_Controller__Bezier_Float] $Nuetral.modifiers[#Morpher][#_2__BS002___No_Target_] "Limited_Controller__Bezier_Float*100"

0 Likes
Message 4 of 4

leeminardi
Mentor
Mentor
Accepted solution

@saqibhussain88 I'm glad the script worked for you.

 

I suggest you mark this thread as solved and start a new post on the 3ds Max Programming forum with your morph-target quesion.  Be specific about what is given before the script is executued and what the final result would be.

lee.minardi
0 Likes