Wiring Parameter for Morpher

Wiring Parameter for Morpher

saqibhussain88
Contributor Contributor
473 Views
4 Replies
Message 1 of 5

Wiring Parameter for Morpher

saqibhussain88
Contributor
Contributor

hello i have a one Slider object with Float Limit and one object with Morpher modifier.i want to make a Conenction through script.ive tried using macro recorder but when i run the samescript ,the Wiring parameter popups then need to Do all again. here is the scritpt i am recording.is there a wa y to automate this process i have Couple of Slider and Morpher Targets.i wanted to make them Work with Script.

 

select $Slider
macros.run "Parameter Wire" "paramWire"
paramWire.connect2way $.pos.controller.Z_Position.controller[#Limited_Controller__Bezier_Float] $Box.modifiers[#Morpher][#_1__test___Target_Available_] "_1__test___Target_Available_" "Limited_Controller__Bezier_Float*100"

0 Likes
474 Views
4 Replies
Replies (4)
Message 2 of 5

denisT.MaxDoctor
Advisor
Advisor
delete objects
gc()

ss = cone name:#cone_source pos:[0,0,0] radius1:10 radius2:0 height:20 sides:18 heightsegs:7 wirecolor:orange smooth:off
ct = cylinder name:#cylinder_target pos:[40,0,0] radius:10 sides:18 height:20 heightsegs:5 capsegs:2 wirecolor:green smooth:off

resetXform objects
converttomesh objects

_morph = morpher()
addmodifier ss _morph
WM3_MC_BuildFromNode ss.morpher 1 ct	
	
_morph[1].controller = bezier_float()

try(destroydialog rol) catch()
rollout rol "Bind Morph with denisT" width:191
(
	label lb align:#center
	slider sp type:#float range:[0,100,0] scale:0.1 width:176 align:#left offset:[0,0] 
	
	on rol open do
	(
		lb.text = ct.name
		sp.controller = _morph[1].controller
	)
)
createdialog rol
0 Likes
Message 3 of 5

saqibhussain88
Contributor
Contributor

Hi Thanks for your Script but.this is not waht exactlyy i am looking for,i already have Setup all the Controlers and Morpher Mesh.i am looking for something where i can Mention the name of Slider with X and Y value and the target fo Morpher modifer.i just want automate the process

0 Likes
Message 4 of 5

denisT.MaxDoctor
Advisor
Advisor

 

 

delete objects
gc()

ss = cone name:#cone_source pos:[-40,0,0] radius1:10 radius2:0 height:20 sides:18 heightsegs:7 wirecolor:orange smooth:off
ct = cylinder name:#cylinder_target pos:[40,0,0] radius:10 sides:18 height:20 heightsegs:5 capsegs:2 wirecolor:green smooth:off

resetXform objects
converttomesh objects

_morph = morpher()
addmodifier ss _morph
WM3_MC_BuildFromNode ss.morpher 1 ct	
	
_morph[1].controller = bezier_float()


b = point name:#slider cross:on box:on size:10 pos:[0,0,0] wirecolor:red isselected:on 
	
setTransformLockFlags b #{2..9}
b.pos.controller[1].controller = float_limit lower_limit:-25 upper_limit:25  
paramWire.connect b.pos.controller[1] _morph[1] "(X_Position + 25)*2.0"

max move

 

 

0 Likes
Message 5 of 5

saqibhussain88
Contributor
Contributor

@denisT.MaxDoctor  Hi Denish Sorry for again,just wondering,

is it possible to have a reverse or a two way connection.in the last script you Shared? now the Slider is Connect to morpher only.

i want it to be two way connection,or the Slider pos move by morpher.

0 Likes