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
path: root/source
diff options
context:
space:
mode:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2016-01-10 13:37:34 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2016-01-10 13:37:34 +0300
commitf1e8204f5afc88903edff5719d0bb159a5f483ba (patch)
treee9eb3bee0274748f26f8c751778b94db435d5304 /source
parente9c8e0316fbce2edfc9c2b6d0ddce18a3ea2a22a (diff)
Smoke: fix for missing viewport color update.
Active color wasn't copied over if it differs from what the user plugged in in the UI. Also use a darker color for the default color so smoke doesn't doen't appear too bright. Reported in IRC by mib2berlin.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/smoke.c2
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index b2aaf821df8..98f7dfd4e7e 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -2155,6 +2155,7 @@ static void update_flowsfluids(Scene *scene, Object *ob, SmokeDomainSettings *sd
active_fields |= SM_ACTIVE_COLOR_SET;
}
else if (!equals_v3v3(sds->active_color, sfs->color)) {
+ copy_v3_v3(sds->active_color, sfs->color);
active_fields |= SM_ACTIVE_COLORS;
}
}
@@ -2173,6 +2174,7 @@ static void update_flowsfluids(Scene *scene, Object *ob, SmokeDomainSettings *sd
active_fields |= SM_ACTIVE_COLOR_SET;
}
else if (!equals_v3v3(sds->active_color, sds->flame_smoke_color)) {
+ copy_v3_v3(sds->active_color, sds->flame_smoke_color);
active_fields |= SM_ACTIVE_COLORS;
}
}
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index 591cf94b86f..801419b81c0 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -351,8 +351,8 @@ void draw_smoke_volume(SmokeDomainSettings *sds, Object *ob,
GPU_shader_uniform_texture(shader, spec_location, tex_spec);
}
- float active_color[4] = { 1.0, 1.0, 1.0, 10.0 };
- if ((sds->active_fields & SM_ACTIVE_COLORS) == 0)
+ float active_color[4] = { 0.7, 0.7, 0.7, 10.0 };
+ if ((sds->active_fields & SM_ACTIVE_COLORS) != 0)
copy_v3_v3(active_color, sds->active_color);
GPU_shader_uniform_vector(shader, actcol_location, 4, 1, active_color);