Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D parent/child select without going to the object manager

  • parent/child select without going to the object manager

    Posted by Daniel Tegeland on May 18, 2015 at 8:58 pm

    Hi

    I am looking for some script/function to select child/parent with multiple objects selected. Basically going up or down in a hierarchy mapped to a shortcut. I have found one script for selecting parents without having to go to the object manager. Look below

    Now I need one with the same functionality but that works on children. Can anybody help me out?

    var parent, obj;
    var i;

    doc->StartUndo();
    for (i = 0; object(i); i++)
    {
    obj = object(i);
    doc->AddUndo(UNDOTYPE_CHANGE,obj);
    if(obj->GetUp()) {
    parent = obj->GetUp();
    doc->AddUndo(UNDOTYPE_CHANGE,parent);
    parent->SetBit(BIT_AOBJ);
    obj->DelBit(BIT_AOBJ);
    }
    }
    doc->EndUndo()

    Daniel Tegeland replied 10 years, 12 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy