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-09-24 22:41:16 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2016-09-24 23:21:02 +0300
commit4446acbf17748f30b163016cfc4b88bba8653517 (patch)
tree95529532e9be510c3eb6605aac0d5876239ac490 /source/blender/blenloader
parenta070a5befa1110120547333d84c6e67cae53d648 (diff)
Viewport smoke: add support for axis aligned slicing.
Current approach uses view aligned slicing to generate polygons for GL texturing such that the generated polygons are always facing the view plane. Now it is also possible to use object aligned slicing, which creates polygons by slicing the object perpendicular to whichever axis is facing the most the view plane. It is also possible to create a single slice for inspecting the volume, or for 2D rendering effects. Settings for this, along with a density multiplier setting, are to be found in a newly added "Smoke Display Settings" panel in the smoke domain properties tab. Reviewers: plasmasolutions, gottfried Differential Revision: https://developer.blender.org/D1733
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_270.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index aa5ef1c98cf..0d4ff00b775 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -52,6 +52,7 @@
#include "DNA_linestyle_types.h"
#include "DNA_actuator_types.h"
#include "DNA_view3d_types.h"
+#include "DNA_smoke_types.h"
#include "DNA_genfile.h"
@@ -1405,5 +1406,23 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
scene->r.ffcodecdata.constant_rate_factor = FFM_CRF_NONE;
}
}
+
+ if (!DNA_struct_elem_find(fd->filesdna, "SmokeModifierData", "float", "slice_per_voxel")) {
+ Object *ob;
+ ModifierData *md;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ for (md = ob->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Smoke) {
+ SmokeModifierData *smd = (SmokeModifierData *)md;
+ if (smd->domain) {
+ smd->domain->slice_per_voxel = 5.0f;
+ smd->domain->slice_depth = 0.5f;
+ smd->domain->display_thickness = 1.0f;
+ }
+ }
+ }
+ }
+ }
}
}