From 1bd85d7518a216b52640b03c4bdfd62229963e87 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Tue, 29 Apr 2003 16:24:56 +0000 Subject: [PATCH] I know were in a freeze but this ones really small and I figured were not quite frozen yet ;) Anyway this was submitted by intrr and its just a small patch to allow you to select all children of an object with shift-p. Kent --- source/blender/src/space.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 8968c9c0580..ae30d69ddb3 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -417,6 +417,17 @@ static void align_view_to_selected(View3D *v3d) } } +void select_children(Object *ob) +{ + Base *base; + + for (base= FIRSTBASE; base; base= base->next) + if (ob == base->object->parent) { + base->flag |= SELECT; + select_children(base->object); + } +} + void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) { unsigned short event= evt->event; @@ -862,6 +873,10 @@ void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) else if(G.obedit->type==OB_MESH) separate_mesh(); else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) separate_nurb(); } + else if (G.qual == LR_SHIFTKEY) { + select_children(OBACT); + allqueue(REDRAWVIEW3D, 0); + } else if(G.qual & LR_CTRLKEY) make_parent(); else if(G.qual & LR_ALTKEY) clear_parent(); else {