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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-29 16:57:14 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-30 15:07:23 +0300
commit5c17dbd991d64257f99b179343b453bb60823d44 (patch)
tree4a24c1f396c56c36d888bf807227f54b8742f072 /source/blender/depsgraph/intern/depsgraph.h
parent8ed723745e1bf939ed59062256cf7808219d8748 (diff)
Fix missing Cycles 3D viewport updates when editing materials, lamps.
This introduces a new depsgraph API for getting updated datablocks, rather than getting it from bpy.data. * depsgraph.ids_updated gives a list of all datablocks in the depsgraph which have been updated. * depsgraph.id_type_updated('TYPE') is true if any datablock of the given type has been added, removed or modified. More API updates are coming to properly handle multiple depsgraphs and finer update granularity, but this should make Cycles work again.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph.h')
-rw-r--r--source/blender/depsgraph/intern/depsgraph.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index 7b6af9deee1..a368158a6c4 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -36,6 +36,10 @@
#pragma once
+#include <stdlib.h>
+
+#include "BKE_library.h" /* for MAX_LIBARRAY */
+
#include "BLI_threads.h" /* for SpinLock */
#include "DEG_depsgraph.h"
@@ -174,6 +178,9 @@ struct Depsgraph {
/* Indicates whether relations needs to be updated. */
bool need_update;
+ /* Indicates which ID types were updated. */
+ char id_type_updated[MAX_LIBARRAY];
+
/* Quick-Access Temp Data ............. */
/* Nodes which have been tagged as "directly modified". */