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:
Diffstat (limited to 'intern/cycles/render/scene.h')
-rw-r--r--intern/cycles/render/scene.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h
index 0e32a70952b..6686327dc49 100644
--- a/intern/cycles/render/scene.h
+++ b/intern/cycles/render/scene.h
@@ -59,6 +59,7 @@ class Progress;
class BakeManager;
class BakeData;
class RenderStats;
+class SceneUpdateStats;
class Volume;
/* Scene Device Data */
@@ -260,6 +261,9 @@ class Scene : public NodeOwner {
/* mutex must be locked manually by callers */
thread_mutex mutex;
+ /* scene update statistics */
+ SceneUpdateStats *update_stats;
+
Scene(const SceneParams &params, Device *device);
~Scene();
@@ -280,6 +284,8 @@ class Scene : public NodeOwner {
void collect_statistics(RenderStats *stats);
+ void enable_update_stats();
+
bool update(Progress &progress, bool &kernel_switch_needed);
/* This function is used to create a node of a specified type instead of
@@ -316,6 +322,18 @@ class Scene : public NodeOwner {
(void)owner;
}
+ /* Remove all nodes in the set from the appropriate data arrays, and tag the
+ * specific managers for an update. This assumes that the scene owns the nodes.
+ */
+ template<typename T> void delete_nodes(const set<T *> &nodes)
+ {
+ delete_nodes(nodes, this);
+ }
+
+ /* Same as above, but specify the actual owner of all the nodes in the set.
+ */
+ template<typename T> void delete_nodes(const set<T *> &nodes, const NodeOwner *owner);
+
protected:
/* Check if some heavy data worth logging was updated.
* Mainly used to suppress extra annoying logging.
@@ -375,6 +393,16 @@ template<> void Scene::delete_node_impl(ParticleSystem *node);
template<> void Scene::delete_node_impl(Shader *node);
+template<> void Scene::delete_nodes(const set<Light *> &nodes, const NodeOwner *owner);
+
+template<> void Scene::delete_nodes(const set<Geometry *> &nodes, const NodeOwner *owner);
+
+template<> void Scene::delete_nodes(const set<Object *> &nodes, const NodeOwner *owner);
+
+template<> void Scene::delete_nodes(const set<ParticleSystem *> &nodes, const NodeOwner *owner);
+
+template<> void Scene::delete_nodes(const set<Shader *> &nodes, const NodeOwner *owner);
+
CCL_NAMESPACE_END
#endif /* __SCENE_H__ */