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/blenkernel/intern/scene.c
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/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 1a9a2d5b36d..95a8c454b7a 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1268,10 +1268,10 @@ void BKE_scene_frame_set(struct Scene *scene, double cfra)
#define POSE_ANIMATION_WORKAROUND
#ifdef POSE_ANIMATION_WORKAROUND
-static void scene_armature_depsgraph_workaround(Main *bmain)
+static void scene_armature_depsgraph_workaround(Main *bmain, Depsgraph *depsgraph)
{
Object *ob;
- if (BLI_listbase_is_empty(&bmain->armature) || !DEG_id_type_tagged(bmain, ID_OB)) {
+ if (BLI_listbase_is_empty(&bmain->armature) || !DEG_id_type_updated(depsgraph, ID_OB)) {
return;
}
for (ob = bmain->object.first; ob; ob = ob->id.next) {
@@ -1373,7 +1373,7 @@ void BKE_scene_graph_update_tagged(Depsgraph *depsgraph,
/* Inform editors about possible changes. */
DEG_ids_check_recalc(bmain, depsgraph, scene, view_layer, false);
/* Clear recalc flags. */
- DEG_ids_clear_recalc(bmain);
+ DEG_ids_clear_recalc(bmain, depsgraph);
}
/* applies changes right away, does all sets too */
@@ -1402,7 +1402,7 @@ void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph,
BKE_cachefile_update_frame(bmain, scene, ctime,
(((double)scene->r.frs_sec) / (double)scene->r.frs_sec_base));
#ifdef POSE_ANIMATION_WORKAROUND
- scene_armature_depsgraph_workaround(bmain);
+ scene_armature_depsgraph_workaround(bmain, depsgraph);
#endif
/* Update all objects: drivers, matrices, displists, etc. flags set
* by depgraph or manual, no layer check here, gets correct flushed.
@@ -1415,7 +1415,7 @@ void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph,
/* Inform editors about possible changes. */
DEG_ids_check_recalc(bmain, depsgraph, scene, view_layer, true);
/* clear recalc flags */
- DEG_ids_clear_recalc(bmain);
+ DEG_ids_clear_recalc(bmain, depsgraph);
}
/* return default view */