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:
authorAntony Riakiotakis <kalast@gmail.com>2013-01-21 05:01:15 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-01-21 05:01:15 +0400
commit8e934014d7a43acb62f1a2625a6979babfdcabc5 (patch)
tree6157138d58a5d87acf2ceba80a1a9fddeb08003d /source/blender/blenkernel
parent4c67b23c8dc55e2c0184a6449c8cb0301d4f28d5 (diff)
Ommit extraneous check for paint tool in 3d mapping case (Only draw tool
uses this anyway) and avoid copying of coordinate for 3D case.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/brush.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index bb4f073a3d7..6d655f8b495 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -477,19 +477,22 @@ void BKE_brush_sample_tex(const Scene *scene, Brush *brush, const float sampleco
MTex *mtex = &brush->mtex;
if (mtex && mtex->tex) {
- float co[3], tin, tr, tg, tb, ta;
+ float tin, tr, tg, tb, ta;
int hasrgb;
const int radius = BKE_brush_size_get(scene, brush);
if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) {
- copy_v3_v3(co, sampleco);
- } else {
+ hasrgb = externtex(mtex, sampleco, &tin, &tr, &tg, &tb, &ta, thread);
+ }
+ else {
+ float co[3];
+
co[0] = sampleco[0] / radius;
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);
+ }
if (hasrgb) {
rgba[0] = tr;