Cleanup: order simple check before function call
authorCampbell Barton <ideasman42@gmail.com>
Wed, 10 Apr 2019 07:05:06 +0000 (09:05 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 10 Apr 2019 07:05:39 +0000 (09:05 +0200)
source/blender/draw/engines/eevee/eevee_materials.c
source/blender/draw/engines/workbench/workbench_deferred.c

index 32ec54b1ca66e4dce1561b38b7d37dfe25e6374c..94e0231c5febba2fc5c3fc2dfa07d8f286bec85e 100644 (file)
@@ -1551,7 +1551,7 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sld
                 */
                bool use_volume_material = (gpumat_array[0] && GPU_material_use_domain_volume(gpumat_array[0]));
 
-               if (DRW_state_is_image_render() || ob->dt >= OB_SOLID) {
+               if ((ob->dt >= OB_SOLID) || DRW_state_is_image_render()) {
                        /* Get per-material split surface */
                        char *auto_layer_names;
                        int *auto_layer_is_srgb;
index f75d385714f5b7463bf0e922a679a0057a8abd32..482d7178cb7367b04dc0f9135fc3de9e200938dd 100644 (file)
@@ -897,7 +897,7 @@ void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob)
        if (!(DRW_object_visibility_in_active_context(ob) & OB_VISIBLE_SELF)) {
                return;
        }
-       if (!DRW_state_is_image_render() && ob->dt < OB_SOLID) {
+       if ((ob->dt < OB_SOLID) && !DRW_state_is_image_render()) {
                return;
        }