From 92d948307549ce1d69ec4e41e42b442360b9bade Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Tue, 12 Jun 2012 21:23:51 +0000 Subject: patch #31794 Added new function BKE_object_relational_superset() --- source/blender/blenkernel/BKE_object.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source/blender/blenkernel/BKE_object.h') diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 890fc40c284..29979f62d60 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -158,6 +158,26 @@ void BKE_object_relink(struct Object *ob); struct MovieClip *BKE_object_movieclip_get(struct Scene *scene, struct Object *ob, int use_default); +/* this function returns a superset of the scenes selection based on relationships */ + +typedef enum eObRelationTypes { + OB_REL_NONE = 0, /* just the selection as is */ + OB_REL_PARENT = (1<<0), /* immediate parent */ + OB_REL_PARENT_RECURSIVE = (1<<1), /* parents up to root of selection tree*/ + OB_REL_CHILDREN = (1<<2), /* immediate children */ + OB_REL_CHILDREN_RECURSIVE = (1<<3), /* All children */ + OB_REL_MOD_ARMATURE = (1<<4), /* Armatures related to the selected objects */ + OB_REL_SCENE_CAMERA = (1<<5), /* you might want the scene camera too even if unselected? */ +} eObRelationTypes; + +typedef enum eObjectSet { + OB_SET_SELECTED, /* Selected Objects */ + OB_SET_VISIBLE, /* Visible Objects */ + OB_SET_ALL /* All Objects */ +} eObjectSet; + +struct LinkNode *BKE_object_relational_superset(struct Scene *scene, eObjectSet objectSet, eObRelationTypes includeFilter); + #ifdef __cplusplus } #endif -- cgit v1.2.3