Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/workbench_data.c
| Show All 13 Lines | |||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| * | * | ||||
| * Copyright 2018, Blender Foundation. | * Copyright 2018, Blender Foundation. | ||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup draw_engine | * \ingroup draw_engine | ||||
| */ | */ | ||||
| #include "DRW_render.h" | |||||
| #include "workbench_private.h" | #include "workbench_private.h" | ||||
| #include "BLI_memblock.h" | #include "BLI_memblock.h" | ||||
| #include "DNA_userdef_types.h" | #include "DNA_userdef_types.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| ▲ Show 20 Lines • Show All 164 Lines • ▼ Show 20 Lines | void workbench_private_data_init(WORKBENCH_PrivateData *wpd) | ||||
| wpd->vldata = vldata; | wpd->vldata = vldata; | ||||
| wpd->world_ubo = vldata->world_ubo; | wpd->world_ubo = vldata->world_ubo; | ||||
| wpd->taa_sample_len = workbench_antialiasing_sample_count_get(wpd); | wpd->taa_sample_len = workbench_antialiasing_sample_count_get(wpd); | ||||
| wpd->volumes_do = false; | wpd->volumes_do = false; | ||||
| BLI_listbase_clear(&wpd->smoke_domains); | BLI_listbase_clear(&wpd->smoke_domains); | ||||
| /* FIXME: This reproduce old behavior when workbench was separated in 2 engines. | |||||
| * But this is a workaround for a missing update tagging. */ | |||||
| if ((rv3d != NULL) && (rv3d->rflag & RV3D_GPULIGHT_UPDATE)) { | |||||
fclem: check if rv3d is valid before doing so. | |||||
| wpd->view_updated = true; | |||||
Done Inline ActionsPut the rv3d->rflag &= ~RV3D_GPULIGHT_UPDATE; here. fclem: Put the ` rv3d->rflag &= ~RV3D_GPULIGHT_UPDATE;` here.
| |||||
| rv3d->rflag &= ~RV3D_GPULIGHT_UPDATE; | |||||
| } | |||||
| if (!v3d || (v3d->shading.type == OB_RENDER && BKE_scene_uses_blender_workbench(scene))) { | if (!v3d || (v3d->shading.type == OB_RENDER && BKE_scene_uses_blender_workbench(scene))) { | ||||
| /* FIXME: This reproduce old behavior when workbench was separated in 2 engines. | /* FIXME: This reproduce old behavior when workbench was separated in 2 engines. | ||||
| * But this is a workaround for a missing update tagging from operators. */ | * But this is a workaround for a missing update tagging from operators. */ | ||||
| if (scene->display.shading.type != wpd->shading.type || | if (scene->display.shading.type != wpd->shading.type || | ||||
| (v3d && (XRAY_ENABLED(v3d) != XRAY_ENABLED(&scene->display)))) { | (v3d && (XRAY_ENABLED(v3d) != XRAY_ENABLED(&scene->display)))) { | ||||
| wpd->view_updated = true; | wpd->view_updated = true; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines | |||||
check if rv3d is valid before doing so.