diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-09-24 23:36:54 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-09-24 23:36:54 +0300 |
commit | 14e825aa1fb57db85cecfda0cd69843b57cefd12 (patch) | |
tree | bc10d135f04acbba3266ff2da75caa0fd2dd3ff2 /source/blender/blenkernel/intern/smoke.c | |
parent | 4446acbf17748f30b163016cfc4b88bba8653517 (diff) |
Viewport smoke: add options to draw velocity vectors.
This basically exposes to the UI a function that was only available
through a debug macro ; the purpose is obviously to help debugging
simulations. It adds ways to draw the vectors either as colored needles
or as arrows showing the direction of the vectors. The colors are based
on the magnitude of the underlying vectors.
Reviewers: plasmasolutions, gottfried
Differential Revision: https://developer.blender.org/D1733
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index d0f546e9bef..05540f51588 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -543,6 +543,7 @@ void smokeModifier_createType(struct SmokeModifierData *smd) smd->domain->slice_per_voxel = 5.0f; smd->domain->slice_depth = 0.5f; smd->domain->slice_axis = 0; + smd->domain->vector_scale = 1.0f; } else if (smd->type & MOD_SMOKE_TYPE_FLOW) { @@ -642,6 +643,9 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData tsmd->domain->slice_per_voxel = smd->domain->slice_per_voxel; tsmd->domain->slice_depth = smd->domain->slice_depth; tsmd->domain->slice_axis = smd->domain->slice_axis; + tsmd->domain->draw_velocity = smd->domain->draw_velocity; + tsmd->domain->vector_draw_type = smd->domain->vector_draw_type; + tsmd->domain->vector_scale = smd->domain->vector_scale; } else if (tsmd->flow) { tsmd->flow->psys = smd->flow->psys; |