diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-01-22 12:05:00 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-01-22 12:05:00 +0400 |
commit | 95a13a2c02caec332d4d5b521441f1c49ddb07a3 (patch) | |
tree | 5b8f46c8b65f23bd7beb0b265a958968f669b412 /source/blender/blenkernel/intern/brush.c | |
parent | 62191d935cc5875f991ba3bf79b43a94076686bd (diff) |
Fix projection texture painting crash
It was caused by own mistake by not noticing externtex is used not
only by render engine. Now this function uses pool passed as argument
rather than using R.pool.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 6d655f8b495..792a6058872 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -472,7 +472,7 @@ int BKE_brush_clone_image_delete(Brush *brush) } /* Brush Sampling for 3d brushes. Currently used for texture painting only, but should be generalized */ -void BKE_brush_sample_tex(const Scene *scene, Brush *brush, const float sampleco[3], float rgba[4], const int thread) +void BKE_brush_sample_tex(const Scene *scene, Brush *brush, const float sampleco[3], float rgba[4], const int thread, struct ImagePool *pool) { MTex *mtex = &brush->mtex; @@ -482,7 +482,7 @@ void BKE_brush_sample_tex(const Scene *scene, Brush *brush, const float sampleco const int radius = BKE_brush_size_get(scene, brush); if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) { - hasrgb = externtex(mtex, sampleco, &tin, &tr, &tg, &tb, &ta, thread); + hasrgb = externtex(mtex, sampleco, &tin, &tr, &tg, &tb, &ta, thread, pool); } else { float co[3]; @@ -491,7 +491,7 @@ void BKE_brush_sample_tex(const Scene *scene, Brush *brush, const float sampleco co[1] = sampleco[1] / radius; co[2] = 0.0f; - hasrgb = externtex(mtex, co, &tin, &tr, &tg, &tb, &ta, thread); + hasrgb = externtex(mtex, co, &tin, &tr, &tg, &tb, &ta, thread, pool); } if (hasrgb) { @@ -526,7 +526,7 @@ void BKE_brush_sample_tex_2D(const Scene *scene, Brush *brush, const float xy[2] co[1] = xy[1] / radius; co[2] = 0.0f; - hasrgb = externtex(mtex, co, &tin, &tr, &tg, &tb, &ta, thread); + hasrgb = externtex(mtex, co, &tin, &tr, &tg, &tb, &ta, thread, NULL); if (hasrgb) { rgba[0] = tr; |