Fix T42441: Smoke doesn't render in 3DView if domain object's maximum draw type is...
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 30 Oct 2014 08:34:17 +0000 (09:34 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 30 Oct 2014 08:34:17 +0000 (09:34 +0100)
Added an exception in convertblender.c's is_object_hidden(), so that an object with active
smoke modifier is never considered hidden.

source/blender/render/intern/source/convertblender.c

index 69dd9607c3b5791e36aa36dd06aeed4642985577..ef1478235d8be6846002105f67f9935b7b0c50f0 100644 (file)
@@ -3917,7 +3917,15 @@ static bool is_object_hidden(Render *re, Object *ob)
        if (re->r.scemode & R_VIEWPORT_PREVIEW) {
                /* Mesh deform cages and so on mess up the preview. To avoid the problem,
                 * viewport doesn't show mesh object if its draw type is bounding box or wireframe.
+                * Unless it's an active smoke domain!
                 */
+               ModifierData *md = NULL;
+
+               if ((md = modifiers_findByType(ob, eModifierType_Smoke)) &&
+                   (modifier_isEnabled(re->scene, md, eModifierMode_Realtime)))
+               {
+                       return false;
+               }
                return ELEM(ob->dt, OB_BOUNDBOX, OB_WIRE);
        }
        else {