PDA

View Full Version : paramWire > morph channels tracks ?


Polimeno
10-24-2008, 04:36 PM
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

mcernusca
10-25-2008, 04:25 PM
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

S-S
10-26-2008, 11:55 AM
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!

Polimeno
10-26-2008, 07:19 PM
thanks a lot guys, now i got the point ......

EDIT :::

but i still hanving problems with a bad message - conection requires subanim


=/..... help ?

Polimeno
10-27-2008, 01:59 AM
listener :
CONNECTION REQUIRES SUB ANIM ....


i´m a bit lost now.......

mcernusca
10-27-2008, 02:42 AM
can you re-post the code you are using now?

Polimeno
10-30-2008, 01:19 PM
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 !
=)

AsaMovshovitz
10-08-2009, 12:29 PM
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

AsaMovshovitz
10-08-2009, 04:18 PM
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

CGTalk Moderation
10-08-2009, 04:18 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.