Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-12-28 21:10:24 +0300
committerTon Roosendaal <ton@blender.org>2008-12-28 21:10:24 +0300
commit9b2dec96317d067ecca0d010d0ae72a20223ad63 (patch)
tree3839d06074944329a74161ebceb20e6e632e15bb /source/blender/blenkernel
parent7209837f2eb0c3943a7b0e2fafff2182ad50f96b (diff)
2.5
Recode of 'select all objects by type' to show how to use itterators.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_context.h3
-rw-r--r--source/blender/blenkernel/intern/context.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h
index e8bd72ac3f3..791d7251ef5 100644
--- a/source/blender/blenkernel/BKE_context.h
+++ b/source/blender/blenkernel/BKE_context.h
@@ -137,6 +137,9 @@ void CTX_data_scene_set(bContext *C, struct Scene *bmain);
int CTX_data_selected_objects(const bContext *C, ListBase *list);
int CTX_data_selected_bases(const bContext *C, ListBase *list);
+int CTX_data_visible_objects(const bContext *C, ListBase *list);
+int CTX_data_visible_bases(const bContext *C, ListBase *list);
+
struct Object *CTX_data_active_object(const bContext *C);
struct Base *CTX_data_active_base(const bContext *C);
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index 703bb4c2b00..fa5740f74e9 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -365,6 +365,16 @@ int CTX_data_selected_bases(const bContext *C, ListBase *list)
return ctx_data_collection_get(C, CTX_data_selected_bases, list);
}
+int CTX_data_visible_objects(const bContext *C, ListBase *list)
+{
+ return ctx_data_collection_get(C, CTX_data_visible_objects, list);
+}
+
+int CTX_data_visible_bases(const bContext *C, ListBase *list)
+{
+ return ctx_data_collection_get(C, CTX_data_visible_bases, list);
+}
+
struct Object *CTX_data_active_object(const bContext *C)
{
return ctx_data_pointer_get(C, CTX_data_active_object);