I want to get all objects which are related to specific character by passing single part as input:
(
fn FindDependencies Obj Objs =
(
for o in objects where
finditem Objs o == 0 and
(refs.DependencyLoopTest Obj o or refs.DependencyLoopTest o Obj)
do
(
appendifunique Objs o
FindDependencies o Objs
)
)
if isvalidnode (Sel = selection[1]) do
(
Objs = #()
FindDependencies Sel Objs
select Objs
)
)
That Works on simple hierarchy. But When the rig become more complex with custom attributes and connections, It will crash the Max. I don’t know why this happen.