Hi,
I'm trying list an object with a specific type using the recursive code from the documentation. But currently, it crashes/freezes the program.
Here's the code so far:
def recurse_hierarchy(op):
obj_list = []
while op:
if op.GetType() == c4d.Ospline: # the line where it freezes
obj_list.append(op)
obj_list+= recurse_hierarchy(op.GetDown())
op = op.GetNext()
return obj_list
all_spline_objects = recurse_hierarchy(doc.GetFirstObject())
Is there a way around this?