Thank you Ilia,
Let me digest your extremely kind advice and example, learn from it, and come back tom you.
Kind regards,
James.
J
Posts made by jrpmedia
-
RE: My goal is to Export all the Child objects in a Cloner as individual STL files.
-
My goal is to Export all the Child objects in a Cloner as individual STL files.
My goal is to Export all the Child objects (or the top group) in a Cloner as individual STL files.
Here is my initial code to simply list the Child items.
But I get syntax errors for lines 32, 29 and 4 even at this early stageimport c4d def list_cloner_children(obj): if obj is None or obj.GetType() != c4d.Ocloner: print("Please select a Cloner object.") return children = obj.GetChildren() if not children: print("The selected Cloner has no children.") else: print("Children of selected Cloner:") for child in children: print(" ", child.GetName()) def main(): # Get the active document doc = c4d.documents.GetActiveDocument() if doc is None: return # Get the first selected object selection = doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_SELECTIONORDER) if not selection: print("No objects selected.") return selected_obj = selection[0] # List the children of the selected object list_cloner_children(selected_obj) if __name__ == '__main__': main()