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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2016-10-30 14:29:05 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2016-10-30 14:29:05 +0300
commitb6d35e1fa74076e5072e53dad63dc712f85a7027 (patch)
tree2932371b73c1119957c4d2d4e8b47e1d3327b4aa /source/blender/blenloader
parent4e68f48227e228fbf75736005ceed4cf1cb55215 (diff)
Viewport smoke: add support to render the volume using a color ramp.
This is yet another debug option that allows to render an arbitrary simulation field by using a color ramp to inspect its voxel values. Note that when using this, fire rendering is turned off. Reviewers: plasmasolutions, gottfried Differential Revision: https://developer.blender.org/D1733
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c1
-rw-r--r--source/blender/blenloader/intern/writefile.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 41b275751d1..98c8a260993 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5091,6 +5091,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
smd->domain->tex = NULL;
smd->domain->tex_shadow = NULL;
smd->domain->tex_wt = NULL;
+ smd->domain->coba = newdataadr(fd, smd->domain->coba);
smd->domain->effector_weights = newdataadr(fd, smd->domain->effector_weights);
if (!smd->domain->effector_weights)
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 6678189872c..d104fc85eb7 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1728,6 +1728,10 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
smd->domain->point_cache[1]->step = 1;
write_pointcaches(wd, &(smd->domain->ptcaches[1]));
+
+ if (smd->domain->coba) {
+ writestruct(wd, DATA, ColorBand, 1, smd->domain->coba);
+ }
}
writestruct(wd, DATA, SmokeDomainSettings, 1, smd->domain);