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:
authorDalai Felinto <dfelinto@gmail.com>2018-02-28 19:54:00 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-02-28 19:55:56 +0300
commit382218beb29f52e1ea5c10803edf95a937878308 (patch)
treef435025a91e8cce8627898f2f269db4fa48a6f3b /intern/cycles/blender/blender_session.cpp
parent4a892adac5937fdaa19d0309e5195a83bdb14e72 (diff)
Point cache: Pass EvaluationContext for all the related functions
Now the only missing bit seems to be in Cycles to pass depsgraph to builtin_image_float_pixels(). Ideally we could get evaluation context instead of using depsgraph + settings. But for the other rna EvaluationContext functions this is how we are doing. Reviewers: sergey, brecht Differential Revision: https://developer.blender.org/D3087
Diffstat (limited to 'intern/cycles/blender/blender_session.cpp')
-rw-r--r--intern/cycles/blender/blender_session.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index 12b707d8f95..c6bfaea238d 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -1280,9 +1280,8 @@ bool BlenderSession::builtin_image_float_pixels(const string &builtin_name,
else {
/* TODO: fix point density to work with new view layer depsgraph */
#if 0
- /* We originally were passing view_layer here but in reality we need a whole EvaluationContext
- * in the RE_point_density_minmax() function.
- * Note: There is not a single EvaluationContext for the entire render. They are per RenderLayer now.
+ /* We originally were passing view_layer here but in reality we need a whole EvaluationContext or at the
+ * very least a dpesgraph to pass to the RE_point_density_minmax() function.
*/
/* TODO(sergey): Check we're indeed in shader node tree. */
PointerRNA ptr;
@@ -1292,7 +1291,7 @@ bool BlenderSession::builtin_image_float_pixels(const string &builtin_name,
BL::ShaderNodeTexPointDensity b_point_density_node(b_node);
int length;
int settings = background ? 1 : 0; /* 1 - render settings, 0 - vewport settings. */
- b_point_density_node.calc_point_density(b_scene, b_view_layer, settings, &length, &pixels);
+ b_point_density_node.calc_point_density(b_depsgraph, settings, &length, &pixels);
}
#endif
}