ScriptSpot home

Forum topic · General Scripting

Get Information about wiring of an object

By Max · 2018-11-13

Description

Hallo, I hope somebody can help me with my question!
I want to know, is it possible with a script to find out if an object has wire connections to some other object and if it has then which object(s) exactly is it and which (I’m speaking from wiring transformations and not any other parameters) controllers (Pos/Rot/Scale - X/Y/Z) have this connections?

Comments (2)
Panteleev Sergey

mxs reference example


wc = $.rotation.controller.z_rotation.controller -- get pos X controller
if classOf wc == Float_Wire do
(-- list out its connections
	for i in 1 to wc.numWires do
	(
	parent = wc.getWireParent i
	parentNode = refs.dependentNodes parent
	parent_owner = (refs.dependents parent)[1]
	param_name = getSubAnimName parent (wc.getWireSubnum i)
	format "wire %: % in %  %\n" i param_name parent_owner parentNode 
	)
)