[Closed] paramWire > morph channels tracks ?
how can i access a morph chanel and get each track name to use in a paramWire ??
for example,
i want to wire the value of a morph channel with the X_Position of an object…
my messing code :
a = $foo_1
b = $foo_2.modifiers[#morpher] CHANNEL ??? TRACK NAME ???
paramWire connect a.position[#X_position] b "xpos = X_Position xpos*20"
print (a ;b)
thanks for any help
It is just an array, you just ask for it by channel id, for example channel 1:
b = $foo_2.modifiers[#morpher][1]
If you need the channel name:
bname = $foo_2.modifiers[#morpher][1].name
Hi Renato!
Mihai already pointed out that you have to address morph and other object's transform using subanims which work like arrays.
I don't know if you already have your parameter wire working but there seems to be some errors.
Your code:
a = $foo_1
b = $foo_2.modifiers[#morpher] CHANNEL ??? TRACK NAME ???
You should use subanims for parameter wires. Something like this:
controlObj = $Torus01[3][1][1]
mtarget = $Teapot01.modifiers[1][1]
And then you have a mistake in paramwire:
paramWire connect a.position[#X_position] b "xpos = X_Position xpos*20"
Here is paramwire.connect from manual:
<bool>paramWire.connect <value>fromParam <value>toParam <string>toExpr
You have to write "paramwire.connect". Then previous variables with subanims and finally your code which will be in paramwire box:
paramWire.connect controlObj mtarget "X_Position * 20"
...And there is no need to put anything extra like "xpos =".
Hope this helps!
thanks a lot guys, now i got the point …
EDIT :::
but i still hanving problems with a bad message – conection requires subanim
=/… help ?
oh, sorry …
i did some freeze transforms and forgot to implement the correct sub anim in my code…
now it ´s working !
check :
seL1 = selection[1]
seL2 = selection[2]
/*
--list morphs
show seL2.modifiers[#moprher]
--
*/
/*
--test 1
controlObj = seL1[3][1][2][3]
Mtarget = seL2.modifiers[2][4]
paramWire.connect controlObj Mtarget "Z_Position * 50"
*/
--test 2
controlObj = seL1[3][1][2][1]
Minor_target = seL2.modifiers[2][12]
Major_target = seL2.modifiers[2][8]
--Minor
paramWire.connect controlObj Minor_target " (s = X_Position) if s < 0 then s*-50 else 0"
--Major
paramWire.connect controlObj Major_target " (s = X_Position) if s > 0 then s*50 else 0"
thanks a lot folks !
=)
Hi I am trying to folow this thread and do simlir thing
bu keep on getting :
Unable to convert: undefined to type: Float
this is the code I am using
controlObj = $Character_BrowL_Ctrl__SA[3][1][2][2][1]
mtarget = $kopie_head.modifiers[2][25]
paramWire.connect controlObj mtarget "eyelid_upper_down_right"
What do i need to change so the subanim will work?
Cheers,
Asa
found a way to do this
controlObj = $Character_BrowL_Ctrl__SA[3][1][2][2][1]
mtarget = $ringmaster_head.modifiers[2][16]
paramWire.connect controlObj mtarget "Limited_Controller__Bezier_Float*10"
this seems to work
Cheers,
asa