MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

parent/child select without going to the object manager

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
daniel tegeland
parent/child select without going to the object manager
on May 18, 2015 at 8:58:04 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()


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]