[Bf-blender-cvs] [8ef9cff] fluid-mantaflow: adapted draw routine to handle liquid domains better
Sebastián Barschkis
noreply at git.blender.org
Thu Oct 20 17:44:58 CEST 2016
Commit: 8ef9cff3a14653b4dc98ad9960570ec0cfb96ca9
Author: Sebastián Barschkis
Date: Wed Oct 12 10:41:44 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB8ef9cff3a14653b4dc98ad9960570ec0cfb96ca9
adapted draw routine to handle liquid domains better
===================================================================
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 0b06ea4..e3aaeef 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -7846,7 +7846,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
}
/* draw code for smoke, only draw domains */
- if (smd && smd->domain && (smd->domain->type == MOD_SMOKE_DOMAIN_TYPE_GAS)) {
+ if (smd && smd->domain) {
SmokeDomainSettings *sds = smd->domain;
float viewnormal[3];
@@ -7898,20 +7898,22 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
p1[1] = (sds->p0[1] + sds->cell_size[1] * sds->res_max[1] + sds->obj_shift_f[1]) * fabsf(ob->size[1]);
p1[2] = (sds->p0[2] + sds->cell_size[2] * sds->res_max[2] + sds->obj_shift_f[2]) * fabsf(ob->size[2]);
- if (sds->fluid && sds->viewport_display_mode == SM_VIEWPORT_GEOMETRY) {
- // Nothing to do here
- }
- else if (!(sds->fluid && sds->flags & MOD_SMOKE_HIGHRES) || sds->viewport_display_mode == SM_VIEWPORT_PREVIEW) {
- sds->tex = NULL;
- GPU_create_smoke(smd, 0);
- draw_smoke_volume(sds, ob, p0, p1, viewnormal);
- GPU_free_smoke(smd);
- }
- else if (sds->fluid && sds->flags & MOD_SMOKE_HIGHRES && sds->viewport_display_mode == SM_VIEWPORT_FINAL) {
- sds->tex = NULL;
- GPU_create_smoke(smd, 1);
- draw_smoke_volume(sds, ob, p0, p1, viewnormal);
- GPU_free_smoke(smd);
+ if (smd->domain->type == MOD_SMOKE_DOMAIN_TYPE_GAS) {
+ if (sds->fluid && sds->viewport_display_mode == SM_VIEWPORT_GEOMETRY) {
+ // Nothing to do here
+ }
+ else if (!(sds->fluid && sds->flags & MOD_SMOKE_HIGHRES) || sds->viewport_display_mode == SM_VIEWPORT_PREVIEW) {
+ sds->tex = NULL;
+ GPU_create_smoke(smd, 0);
+ draw_smoke_volume(sds, ob, p0, p1, viewnormal);
+ GPU_free_smoke(smd);
+ }
+ else if (sds->fluid && sds->flags & MOD_SMOKE_HIGHRES && sds->viewport_display_mode == SM_VIEWPORT_FINAL) {
+ sds->tex = NULL;
+ GPU_create_smoke(smd, 1);
+ draw_smoke_volume(sds, ob, p0, p1, viewnormal);
+ GPU_free_smoke(smd);
+ }
}
/* smoke debug render */
More information about the Bf-blender-cvs
mailing list