diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_layer.h')
-rw-r--r-- | source/blender/blenkernel/BKE_layer.h | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_layer.h b/source/blender/blenkernel/BKE_layer.h index 52d5405ec0a..1585742729c 100644 --- a/source/blender/blenkernel/BKE_layer.h +++ b/source/blender/blenkernel/BKE_layer.h @@ -57,7 +57,7 @@ struct WorkSpace; void BKE_layer_exit(void); struct SceneLayer *BKE_scene_layer_from_scene_get(const struct Scene *scene); -struct SceneLayer *BKE_scene_layer_from_workspace_get(const struct WorkSpace *workspace); +struct SceneLayer *BKE_scene_layer_from_workspace_get(const struct Scene *scene, const struct WorkSpace *workspace); struct SceneLayer *BKE_scene_layer_add(struct Scene *scene, const char *name); /* DEPRECATED */ @@ -65,8 +65,6 @@ struct SceneLayer *BKE_scene_layer_context_active_PLACEHOLDER(const struct Scene void BKE_scene_layer_free(struct SceneLayer *sl); -void BKE_scene_layer_engine_set(struct SceneLayer *sl, const char *engine); - void BKE_scene_layer_selected_objects_tag(struct SceneLayer *sl, const int tag); struct SceneLayer *BKE_scene_layer_find_from_collection(const struct Scene *scene, struct LayerCollection *lc); @@ -167,6 +165,10 @@ void BKE_visible_objects_iterator_begin(BLI_Iterator *iter, void *data_in); void BKE_visible_objects_iterator_next(BLI_Iterator *iter); void BKE_visible_objects_iterator_end(BLI_Iterator *iter); +void BKE_renderable_objects_iterator_begin(BLI_Iterator *iter, void *data_in); +void BKE_renderable_objects_iterator_next(BLI_Iterator *iter); +void BKE_renderable_objects_iterator_end(BLI_Iterator *iter); + void BKE_selected_bases_iterator_begin(BLI_Iterator *iter, void *data_in); void BKE_selected_bases_iterator_next(BLI_Iterator *iter); void BKE_selected_bases_iterator_end(BLI_Iterator *iter); @@ -248,6 +250,29 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *iter); ITER_END \ } +typedef struct ObjectsRenderableIteratorData { + struct Scene *scene; + + struct { + struct SceneLayer *scene_layer; + struct Base *base; + struct Scene *set; + } iter; +} ObjectsRenderableIteratorData; + +#define FOREACH_OBJECT_RENDERABLE(scene_, _instance) \ + ObjectsRenderableIteratorData data_ = { \ + .scene = (scene_), \ + }; \ + ITER_BEGIN(BKE_renderable_objects_iterator_begin, \ + BKE_renderable_objects_iterator_next, \ + BKE_renderable_objects_iterator_end, \ + &data_, Object *, _instance) + + +#define FOREACH_OBJECT_RENDERABLE_END \ + ITER_END + #ifdef __cplusplus } #endif |