From d9c77a490cc5ed9dde396022cd6800e78057cc2b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 27 Jan 2015 16:14:53 +0500 Subject: Fix T43427: Particle system children sometimes not generated on reload The issue was caused by the conflict between preview render which would set R_NO_IMAGE_LOAD flag on the renderer and texture samplers called outside of the render pipeline trying to use this flag. Now the sampler functions accepts extra argument so render pipeline can still skip image load, but calls outside of the pipeline will nicely load all the images. Not cleanest change in the world but good enough to unlock gooseberry team, and assuming we already had pool passed all over the place it should be all fine. Will need to reshuffle arguments into SamplerOptions structure later. --- source/blender/blenkernel/intern/brush.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/blenkernel/intern/brush.c') diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 55d347a4fb2..082a4cf34c2 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -542,7 +542,7 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br, /* Get strength by feeding the vertex * location directly into a texture */ hasrgb = externtex(mtex, point, &intensity, - rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool); + rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool, false); } else if (mtex->brush_map_mode == MTEX_MAP_MODE_STENCIL) { float rotation = -mtex->rot; @@ -573,7 +573,7 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br, co[2] = 0.0f; hasrgb = externtex(mtex, co, &intensity, - rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool); + rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool, false); } else { float rotation = -mtex->rot; @@ -630,7 +630,7 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br, co[2] = 0.0f; hasrgb = externtex(mtex, co, &intensity, - rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool); + rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool, false); } intensity += br->texture_sample_bias; @@ -690,7 +690,7 @@ float BKE_brush_sample_masktex(const Scene *scene, Brush *br, co[2] = 0.0f; externtex(mtex, co, &intensity, - rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool); + rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool, false); } else { float rotation = -mtex->rot; @@ -747,7 +747,7 @@ float BKE_brush_sample_masktex(const Scene *scene, Brush *br, co[2] = 0.0f; externtex(mtex, co, &intensity, - rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool); + rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool, false); } CLAMP(intensity, 0.0f, 1.0f); @@ -1007,7 +1007,7 @@ unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side, bool use_sec /* This is copied from displace modifier code */ /* TODO(sergey): brush are always cacheing with CM enabled for now. */ externtex(mtex, co, &intensity, - rgba, rgba + 1, rgba + 2, rgba + 3, 0, NULL); + rgba, rgba + 1, rgba + 2, rgba + 3, 0, NULL, false); ((char *)texcache)[(iy * side + ix) * 4] = ((char *)texcache)[(iy * side + ix) * 4 + 1] = -- cgit v1.2.3