diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2015-02-02 03:17:16 +0300 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2015-02-02 04:00:12 +0300 |
commit | 0305b208eb8d582fa04985e6350214a0b669159d (patch) | |
tree | 9111b476b091e26b21d0e025dcb7a3f78bf42b13 /source/blender/freestyle/intern/scene_graph/SceneHash.cpp | |
parent | 64124ba904dcaac2bf029a55943282843b8a2603 (diff) |
Fix for Freestyle view map caching not properly updated upon changes of render resolution and scale.
Problem reports independently by Light BWK and Folkert de Vries, thanks.
Diffstat (limited to 'source/blender/freestyle/intern/scene_graph/SceneHash.cpp')
-rw-r--r-- | source/blender/freestyle/intern/scene_graph/SceneHash.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/freestyle/intern/scene_graph/SceneHash.cpp b/source/blender/freestyle/intern/scene_graph/SceneHash.cpp index ee1d0c53b87..22538736fbf 100644 --- a/source/blender/freestyle/intern/scene_graph/SceneHash.cpp +++ b/source/blender/freestyle/intern/scene_graph/SceneHash.cpp @@ -35,13 +35,18 @@ string SceneHash::toString() return ss.str(); } -void SceneHash::visitNodeSceneRenderLayer(NodeSceneRenderLayer& srl) +void SceneHash::visitNodeSceneRenderLayer(NodeSceneRenderLayer& node) { - struct FreestyleConfig *config = &srl.sceneRenderLayer().freestyleConfig; - adler32((unsigned char *)&config->flags, sizeof(int)); - adler32((unsigned char *)&config->crease_angle, sizeof(float)); - adler32((unsigned char *)&config->sphere_radius, sizeof(float)); - adler32((unsigned char *)&config->dkr_epsilon, sizeof(float)); + struct RenderData *r = &node.scene().r; + adler32((unsigned char *)&r->xsch, sizeof(r->xsch)); // resolution_x + adler32((unsigned char *)&r->ysch, sizeof(r->ysch)); // resolution_y + adler32((unsigned char *)&r->size, sizeof(r->size)); // resolution_percentage + + struct FreestyleConfig *config = &node.sceneRenderLayer().freestyleConfig; + adler32((unsigned char *)&config->flags, sizeof(config->flags)); + adler32((unsigned char *)&config->crease_angle, sizeof(config->crease_angle)); + adler32((unsigned char *)&config->sphere_radius, sizeof(config->sphere_radius)); + adler32((unsigned char *)&config->dkr_epsilon, sizeof(config->dkr_epsilon)); } void SceneHash::visitNodeCamera(NodeCamera& cam) |