View Full Version : wire parameters via maxscript

12 December 2007, 08:50 PM
hi there,
i am trying to wire the movement from an object in z axis to the morph value of another object, i can do that easily with the wire parameters, but i want to do that via maxscript, when i do it by hand with the wire parameters i get this line from the listener:

paramWire.connect $.pos.controller[#Z_Position] $Box01.modifiers[#Morpher][#_1__Box02___Target_Available_] "Z_Position"

but when i copy that to a script and I try to run it it gives me the following message:

-- Runtime error: connect requires subAnims

Any ideas on how to do that? im pretty new to maxscript and i have actually no idea so im looking for a easy solution...


12 December 2007, 11:31 PM
Hey, dude, try this:

paramWire.connect $.pos.controller[#Z_Position] $Box01.modifiers[#Morpher][1] "Z_Position"

It should work fine ;)

p.s.: I'm wondering what you want to do with this ;););)

12 December 2007, 08:38 AM
hey duuude :)

how are things going? hope everything is fine, and merry chirstmas, thanks for the pos, I will check it out right now :)

take care matey

12 December 2007, 05:55 PM
what the hell are you guys doing working....... its christmas.. :)
feliz navidad tios!

12 December 2007, 06:09 PM
My dear mono friend: knowledge does not know about holidays. Also, I prefer to stick with scripting rather than with the family :deal:

Merry Scriptsmas to you, dudes :)

12 December 2007, 01:17 PM
Merry Scriptsmas to you, dudes :)

Hahah that made my day, I will celebrate next year with Scriptsmas presents in a box()

12 December 2007, 05:18 PM
I'm trying to this too at the moment and I'm getting a "system error" message in the loop - I'm using it as a way to control hundreds of morph from one slider (also why cant manipulators be made via maxscript?)

Anyone any ideas?

base = "sphere"
theTarget = "Sphere_morph_"

theRectCont = rectangle width:100 height:30
theRectCont.objectOffsetPos = [50,0,0]

TheLabel = text text:"Morpher percentage" size:10 alignment:1
theLabel.pos = [40,15,0]
theLabel.parent = theRectCont

theCont = circle radius:10 wirecolor:green
theCont.parent = theRectCont

theCont.pos.controller.Y_Position.controller = Float_Expression ()
theCont.pos.controller.Z_Position.controller = Float_Expression ()
theCont.pos.controller.X_Position.controller = float_limit ()
theCont.pos.controller.X_Position.controller.upper_limit = 100
theCont.pos.controller.X_Position.controller.lower_limit = 0

i = undefined

for i = 1 to 1 do
theObj = execute("$" + base + i as string)
theTargetObj = execute("$" + theTarget + i as string)

theMorph = copy (morpher())
addmodifier theObj theMorph

WM3_MC_BuildFromNode theObj.morpher 1 theTargetObj

paramWire.connect theCont.pos.controller[#X_Position] theObj.modifiers[#Morpher][1] "X_Position"

12 December 2007, 07:08 PM
Never mind, I changed to a script controller and we're all good - is there anything odd about the morpher mod from a script point of view that makes it a special case?

CGTalk Moderation
12 December 2007, 07:08 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.