I’ve spent a lot of hours trying to figure this out, but can’t quite get the last bit to work. Anyone able to shed some light on my limited knowledge?
I’m trying to wire a few parameters together with maxscript. I have a character with animation on a morph modifier, and I need it to drive a morph modifier on a second character.
(The character is Harry.) The following script works just fine:
morphMaster = $Harry__moCap_head.modifiers[#Morpher][21]
morphSlave = $Harry__head.modifiers[#Morpher][1]
paramWire.connect morphMaster morphSlave “21__eyeBlinkLeft___No_Target”
However, I have a few different characters, many morph targets, and would like to use the same script, but with the name as a variable, received from a drop-down menu.
The drop-down menu works fine…
rollout charRollout “Character Selection”
(
dropdownlist character_dd “Select Character:” items:#(“Carl”, “Harry”, “Barry”) selection:2
)
… the name gets sent out, but when I’m trying to integrate it in to my script, I get errors.
charMaster = charRollout.character_dd.selected + “__moCap_head”
charSlave = charRollout.character_dd.selected + “__head”
morphMaster = charMaster.modifiers[#Morpher][21]
morphSlave = charSlave.modifiers[#Morpher][1]
paramWire.connect morphMaster morphSlave “21__eyeBlinkLeft___No_Target”
Error:
!!–Unknown property: “modifiers” in “Harry__moCap_head”
Any help is very much appreciated!
Kind regards,
Peter.