I have a joint chain of
shoulder_jnt > elbow_jnt > wrist_jnt
I want it to store it in a list. Here is the code so far:
def GetObjects(obj): objList = [obj] for kid in obj.GetChildren(): GetObjects(kid) objList += kid return objList # should return the parent/selected obejct and all its chidlren test = doc.SearchObject("shoulder_jnt") ikJointChain = GetObjects(test)
It gives me an error of
Traceback (most recent call last): File "scriptmanager", line 9, in <module> File "scriptmanager", line 4, in GetObjects File "scriptmanager", line 5, in GetObjects TypeError: 'c4d.modules.character.CAJointObject' object is not iterable
The code is modified from this post:
There is also another code in that post, but I can't really understand it.
So I chose the most simpler one.
Thank you for looking at the problem.