Commit: 9bd37ebc3091e546f9245d18cec849160c1f7a26
Author: Sebastián Barschkis
Date:   Thu Aug 11 17:12:47 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB9bd37ebc3091e546f9245d18cec849160c1f7a26

fix for viewport geometry mode

===================================================================

M       source/blender/blenkernel/intern/smoke.c
M       source/blender/editors/space_view3d/drawobject.c
M       source/blender/makesdna/DNA_smoke_types.h
M       source/blender/makesrna/intern/rna_smoke.c

===================================================================

diff --git a/source/blender/blenkernel/intern/smoke.c 
b/source/blender/blenkernel/intern/smoke.c
index fd00fd8..2531083 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -2882,7 +2882,7 @@ static DerivedMesh *createLiquidMesh(SmokeDomainSettings 
*sds, DerivedMesh *orgd
                return NULL;
        
        /* just display original object */
-       if (sds->viewport_display_mode == 0)
+       if (sds->viewport_display_mode == SM_VIEWPORT_GEOMETRY)
                return NULL;
        
        num_verts   = liquid_get_num_verts(sds->fluid);
diff --git a/source/blender/editors/space_view3d/drawobject.c 
b/source/blender/editors/space_view3d/drawobject.c
index 9b71de1..9fa127b 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -7960,12 +7960,13 @@ 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
+                               }
 #ifndef WITH_MANTA
-                               if (!sds->wt || !(sds->viewsettings & 
MOD_SMOKE_VIEW_SHOWBIG)) {
+                               else if (!sds->wt || !(sds->viewsettings & 
MOD_SMOKE_VIEW_SHOWBIG)) {
 #else
-                               if (!(sds->fluid && sds->flags & 
MOD_SMOKE_HIGHRES) || sds->viewport_display_mode & SM_VIEWPORT_PREVIEW) {
+                               else if (!(sds->fluid && sds->flags & 
MOD_SMOKE_HIGHRES) || sds->viewport_display_mode == SM_VIEWPORT_PREVIEW) {
 #endif
                                        sds->tex = NULL;
                                        GPU_create_smoke(smd, 0);
@@ -7975,7 +7976,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, 
Base *base, const short
 #ifndef WITH_MANTA
                                else if (sds->wt && (sds->viewsettings & 
MOD_SMOKE_VIEW_SHOWBIG)) {
 #else
-                               else if (sds->fluid && sds->flags & 
MOD_SMOKE_HIGHRES && sds->viewport_display_mode & SM_VIEWPORT_FINAL) {
+                               else if (sds->fluid && sds->flags & 
MOD_SMOKE_HIGHRES && sds->viewport_display_mode == SM_VIEWPORT_FINAL) {
 #endif
                                        sds->tex = NULL;
                                        GPU_create_smoke(smd, 1);
diff --git a/source/blender/makesdna/DNA_smoke_types.h 
b/source/blender/makesdna/DNA_smoke_types.h
index 69f911c..b72ac11 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -68,9 +68,9 @@ enum {
 #define SM_BORDER_HORIZONTAL 3
 
 /* viewport preview types */
-#define SM_VIEWPORT_GEOM       0
-#define SM_VIEWPORT_PREVIEW    1
-#define SM_VIEWPORT_FINAL      2
+#define SM_VIEWPORT_GEOMETRY 0
+#define SM_VIEWPORT_PREVIEW     1
+#define SM_VIEWPORT_FINAL       2
 
 /* collision types */
 #define SM_COLL_STATIC         0
diff --git a/source/blender/makesrna/intern/rna_smoke.c 
b/source/blender/makesrna/intern/rna_smoke.c
index c39b7af..733a5b3 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -468,7 +468,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
        };
        
        static EnumPropertyItem smoke_quality_items[] = {
-               {SM_VIEWPORT_GEOM, "GEOMETRY", 0, "Geometry", "Display 
geometry"},
+               {SM_VIEWPORT_GEOMETRY, "GEOMETRY", 0, "Geometry", "Display 
geometry"},
                {SM_VIEWPORT_PREVIEW, "PREVIEW", 0, "Preview", "Display preview 
quality results"},
                {SM_VIEWPORT_FINAL, "FINAL", 0, "Final", "Display final quality 
results"},
                {0, NULL, 0, NULL, NULL}

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to