[Bf-blender-cvs] [f1e8204] master: Smoke: fix for missing viewport color update.

Kévin Dietrich noreply at git.blender.org
Sun Jan 10 11:38:01 CET 2016


Commit: f1e8204f5afc88903edff5719d0bb159a5f483ba
Author: Kévin Dietrich
Date:   Sun Jan 10 11:37:34 2016 +0100
Branches: master
https://developer.blender.org/rBf1e8204f5afc88903edff5719d0bb159a5f483ba

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.

===================================================================

M	source/blender/blenkernel/intern/smoke.c
M	source/blender/editors/space_view3d/drawvolume.c

===================================================================

diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index b2aaf82..98f7dfd 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 591cf94..801419b 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);




More information about the Bf-blender-cvs mailing list