Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2021-01-26 19:40:35 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-01-26 19:50:44 +0300
commit41979fc03b93ba8d55002311569536bf8c9ee983 (patch)
treeae441191f2e23084c168b24c4f1414529183ac1b /source/blender/draw/engines/workbench/workbench_data.c
parent981380cf6d086517cc1b5dfc60e9bde6253e5bd7 (diff)
Fix T84160: Wrong DOF when camera is overriden
Workbench engine used active camera to setup DOF effect even when camera was overridden. Store camera override in `WORKBENCH_PrivateData` and use it in `workbench_dof_engine_init()` Reviewed By: brecht Differential Revision: https://developer.blender.org/D9952
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_data.c')
-rw-r--r--source/blender/draw/engines/workbench/workbench_data.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c
index c566b35cd34..4f689fd55a5 100644
--- a/source/blender/draw/engines/workbench/workbench_data.c
+++ b/source/blender/draw/engines/workbench/workbench_data.c
@@ -137,6 +137,15 @@ static void workbench_studiolight_data_update(WORKBENCH_PrivateData *wpd, WORKBE
wd->use_specular = workbench_is_specular_highlight_enabled(wpd);
}
+void workbench_private_data_alloc(WORKBENCH_StorageList *stl)
+{
+ if (!stl->wpd) {
+ stl->wpd = MEM_callocN(sizeof(*stl->wpd), __func__);
+ stl->wpd->taa_sample_len_previous = -1;
+ stl->wpd->view_updated = true;
+ }
+}
+
void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
{
const DRWContextState *draw_ctx = DRW_context_state_get();