Notifications
Clear all

[Closed] wire parameters via maxscript

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? i´m pretty new to maxscript and i have actually no idea so i´m looking for a easy solution…

thanks!

7 Replies

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 ;);)

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

what the hell are you guys doing working… its christmas…
feliz navidad tios!

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

[size=2]Merry Scriptsmas to you, dudes
[/size]

Hahah that made my day, I will celebrate next year with [size=2]Scriptsmas presents in a box()[/size]

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"
)


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?