[Bf-blender-cvs] [bb62246] openvdb: Draw a voxel in the viewport along with the smoke domain.
Kévin Dietrich
noreply at git.blender.org
Fri Jun 5 22:25:04 CEST 2015
Commit: bb62246eb7454e4365c24876b6535dc47e99af6e
Author: Kévin Dietrich
Date: Fri Jun 5 18:01:17 2015 +0200
Branches: openvdb
https://developer.blender.org/rBbb62246eb7454e4365c24876b6535dc47e99af6e
Draw a voxel in the viewport along with the smoke domain.
This helps a bit choosing a good resolution. Might be for development/
debug only, but it wouldn't hurt leaving it to help users.
===================================================================
M source/blender/editors/space_view3d/drawobject.c
===================================================================
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index c3bd657..04baced 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -8021,6 +8021,19 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
#endif
}
+ /* draw a single voxel to hint the user about the resolution of the fluid */
+ copy_v3_v3(p0, sds->p0);
+
+ if (sds->flags & MOD_SMOKE_HIGHRES) {
+ madd_v3_v3v3fl(p1, p0, sds->cell_size, 1.0f / (sds->amplify + 1));
+ }
+ else {
+ add_v3_v3v3(p1, p0, sds->cell_size);
+ }
+
+ BKE_boundbox_init_from_minmax(&bb, p0, p1);
+ draw_box(bb.vec, false);
+
/* don't show smoke before simulation starts, this could be made an option in the future */
if (smd->domain->fluid && CFRA >= smd->domain->point_cache[0]->startframe) {
/* get view vector */
More information about the Bf-blender-cvs
mailing list