Notifications
Clear all

[Closed] paramwire.disconnect troubles

Hey there folks, I’m having trouble with disconnecting parameter wires. I’ve taken this back to basics and am still struggling with it though.

I have one object’s rotation that is wired to another’s rotation.

Neither:

paramwire.disconnect $.rotation.controller[#Rotation_Wire]

Or:

paramwire.disconnect $.rotation.controller[#Euler_XYZ]

Work on either object, and the error I get is “** system exception**”.

Am I missing something simple here? Thanks.

36 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

 -- if one-way conection:
  paramWire.disconnect <master>.rotation.controller
  -- if two-way conection:
  paramWire.disconnect2Way <one_node>.rotation.controller <another_node>.rotation.controller
  

paramWire connects subAnims but disconnects controllers… it doesn’t make sense for me, but it’s how it works.

Saved my ass again! Thanks man!

 lo1

If you ask me, the sooner you ditch parameter wiring the better. It’s slow, clumsy and unstable.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

what is an alternative?

 lo1

script controller, unless you positively must have 2 way linking…

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

almost all script controllers are leaking badly. the wiring system is a newer than script/expression controllers, and it causes less memory leaking.

script controller about 2-3 times slower than wired…

 lo1

I remember conducting a test with opposite results, but I will have to test again…

2 Replies
(@denist)
Joined: 11 months ago

Posts: 0

script VS wire


(
	delete objects
	
	b1 = box name:"s_target" width:10 length:10 height:10 pos:[-12,-12,0] wirecolor:yellow
	b2 = box name:"s_source" width:10 length:10 height:10 pos:[12,-12,0] wirecolor:orange
	
	sc = b1.rotation.controller = Rotation_Script()
	sc.addtarget "source_rotation" b2.rotation.controller
	sc.setexpression "source_rotation"

	b3 = box name:"w_target" width:10 length:10 height:10 pos:[-12,12,0] wirecolor:red
	b4 = box name:"w_source" width:10 length:10 height:10 pos:[12,12,0] wirecolor:brown
	
	paramWire.connect b4.controller[#Rotation] b3.controller[#Rotation] "Rotation"
	
	gc()
	t1 = timestamp()
	m1 = heapfree
	for k=1 to 10000 do b1.rotation
	format "script >> time:% memory:%
" (timestamp() - t1) (m1 - heapfree)

	gc()
	t1 = timestamp()
	m1 = heapfree
	for k=1 to 10000 do b3.rotation
	format "  wire >> time:% memory:%
" (timestamp() - t1) (m1 - heapfree)
)


 lo1
(@lo1)
Joined: 11 months ago

Posts: 0

excuse me I have a pipeline to rebuild 😮

script controllers are weakest link in any rig. wiring is not perfect but it’s better than script.

there is a difference in setting a value and getting a value, and how you get it
$.transform –uses the matrix already evaluated
$.rotation.controller.value –forces evaluations
$.pos = – forces more…

which controller is evaluated could force other controllers eval… a matrix thing…

there is difference when the user manipulates an objec vs when he plays the animation:
try your example using random slidertime ,and redundancy is lost.

there is differences in evaluations, related to the active Transform gizmo,
if I remember right, scale is the most expensive, then rotation, then translation.

there is also the issue of weak references(custom), not the one integrated inside a script_controller…

working with script controllers and evaluations is very complicated in 3dsmax
wires are faster for when the user interact with an object

I was testing. .but max crashed, …

speed, speed… is that the most important?
(for me) script controller == less troubles

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

for me script controller is always headache.

Seeing as this thread is already active, does anyone happen to know how to find out what’s on the other end of a controller that is set-up via wire parameter?

I have some joystick controllers that are driving morph targets, that also have float_limits to lock their positions. It’d be useful to be able to find out which morph target each one (broken down into its four components: -x, +x, -y, +y) was controlling; so I can then break the connection and add a new one via MAXScript.

8 Replies
(@denist)
Joined: 11 months ago

Posts: 0

you can find wired controllers using refs.dependson and refs.dependents… in case of one-way connection refs.dependencylooptest is true in one direction and false in another.

(@mackinder)
Joined: 11 months ago

Posts: 0

Ah thanks! I was looking at the paramWire stuff.

So I’ve been looking into this and I can’t just supply the same thing I’ve supplied for parameter creation?

refs.dependents $.pos.controller.Y_Position.controller.upper_limit[#Limited_Controller__Bezier_Float]

That contains my first argument for paramWire.connect but it doesn’t give me the results I’d expect.

(@denist)
Joined: 11 months ago

Posts: 0

$.pos.controller.Y_Position.controller.upper_limit[#Limited_Controller__Bezier_Float] is subanim.
you have to ask its controller for dependents. <subanim>.controller

(@mackinder)
Joined: 11 months ago

Posts: 0

Oh I see, so:

refs.dependson $.pos.controller.Y_Position.controller.upper_limit.controller

Is what I’m after? After executing that I’m given:

#(ReferenceTarget:ParamBlock2, Controller:Float_Limit, Controller:Position_XYZ, Controller:Position_Rotation_Scale, $Circle:JoystickNameCircleController @ [0.000000,0.000000,0.000000], ReferenceTarget:NodeSelection, ReferenceTarget:ReferenceTarget)

I can’t see anything that indicates its attachment to a morph target.

I really appreciate the help, man; you’ve helped me no end over the last couple of days.

(@denist)
Joined: 11 months ago

Posts: 0

no… you are looking again in wrong place. you have to check


  refs.dependents $.pos.controller.Y_Position.controller.[b]upper_limit[/b]  [#Limited_Controller__Bezier_Float].controller 
  

ps. in my code there is no space after upper_limit. it’s this forum bug.

(@mackinder)
Joined: 11 months ago

Posts: 0

Hum… that doesn’t seem to work for me, I get this in the listener:

-- No ""get"" function for 5.0
(@denist)
Joined: 11 months ago

Posts: 0

i repeat: there is no space after …_limit. the code is:
refs.dependents $.pos.controller.Y_Position.controller.upper_limit[#Limited_Controller__Bezier_Float].controller

(@mackinder)
Joined: 11 months ago

Posts: 0

Aye I’ve not got a space.

Here’s a shot of exactly how I’m executing that line:

Page 1 / 2