diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-03 00:56:52 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-03 00:56:52 +0400 |
commit | 723e129252f82cc81faa8834a68c79e4439ee8fa (patch) | |
tree | 9c1c1e2aa9265e33702007da68b28b3159766aac /source/blender/blenkernel/BKE_scene.h | |
parent | ac52c79cb19ac85e06651a7b9af2e54efcd45a97 (diff) |
Depsgraph/Python: callbacks and properties to detect datablock changes
* Adds two new python handlers: scene_update_pre() and scene_update_post()
These run before and after Blender does a scene update on making modifications
to the scene.
* Datablocks now have an is_updated property. This will be set to true in the
above callbacks if the datablock was tagged to be updated. This works for the
most common datablocks used for rendering: object, material, world, lamsp,
texture, mesh, curve.
* Datablock collections also have an is_updated property. If this is set, it
means one datablock of this type was added, removed or modified. It's also
useful as a quick check to avoid looping over all datablocks.
* RenderEngine.view_update() can also check these properties, for interactive
viewport rendering.
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/UpdateAPI
Diffstat (limited to 'source/blender/blenkernel/BKE_scene.h')
-rw-r--r-- | source/blender/blenkernel/BKE_scene.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index 45ee6fd4ebd..4806a288cee 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -88,6 +88,8 @@ int scene_check_setscene(struct Main *bmain, struct Scene *sce); float BKE_curframe(struct Scene *scene); void scene_update_tagged(struct Main *bmain, struct Scene *sce); +void scene_clear_tagged(struct Main *bmain, struct Scene *sce); + void scene_update_for_newframe(struct Main *bmain, struct Scene *sce, unsigned int lay); void scene_add_render_layer(struct Scene *sce); |