Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 06/10/2015 at 15:16, xxxxxxxx wrote:
HI, I was looking for a solution to remove children of null object with python, I tried using GetChildren() and obj.Remove() and it gave me this:
c4d file: remove_children_object_python.c4d
On 06/10/2015 at 19:57, xxxxxxxx wrote:
import c4d #Welcome to the world of Python
def main() : obj_parent=doc.SearchObject("Parent") childList=obj_parent.GetChildren() print(childList) for child in childList: child.Remove()
When you get a list of objects, you have to go through it and Remove() every single object.
On 06/10/2015 at 20:38, xxxxxxxx wrote:
Originally posted by xxxxxxxx import c4d #Welcome to the world of Python def main() : obj_parent=doc.SearchObject("Parent") childList=obj_parent.GetChildren() print(childList) for child in childList: child.Remove() When you get a list of objects, you have to go through it and Remove() every single object.
Originally posted by xxxxxxxx
Oh Nice!
Thanks a lot for your time and for this useful information.