[Bf-blender-cvs] [33c97351fb6] blender2.8: Depsgraph: Move data update tag to object->data itself
Sergey Sharybin
noreply at git.blender.org
Wed Dec 13 16:44:23 CET 2017
Commit: 33c97351fb6a1a6bbc510c23180d8c373780a6ed
Author: Sergey Sharybin
Date: Wed Dec 13 16:32:08 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB33c97351fb6a1a6bbc510c23180d8c373780a6ed
Depsgraph: Move data update tag to object->data itself
===================================================================
M source/blender/depsgraph/intern/depsgraph_intern.h
M source/blender/depsgraph/intern/depsgraph_tag.cc
M source/blender/depsgraph/intern/eval/deg_eval_flush.cc
===================================================================
diff --git a/source/blender/depsgraph/intern/depsgraph_intern.h b/source/blender/depsgraph/intern/depsgraph_intern.h
index e7e472ea5d6..03391043477 100644
--- a/source/blender/depsgraph/intern/depsgraph_intern.h
+++ b/source/blender/depsgraph/intern/depsgraph_intern.h
@@ -119,7 +119,6 @@ void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx,
/* Tagging helpers ------------------------------------------------------ */
void lib_id_recalc_tag(struct Main *bmain, struct ID *id);
-void lib_id_recalc_data_tag(struct Main *bmain, struct ID *id);
#define DEG_DEBUG_PRINTF(...) \
do { \
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index ee406acb490..1be6d4798d5 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -88,12 +88,6 @@ void lib_id_recalc_tag(Main *bmain, ID *id)
DEG_id_type_tag(bmain, GS(id->name));
}
-void lib_id_recalc_data_tag(Main *bmain, ID *id)
-{
- id->tag |= LIB_TAG_ID_RECALC_DATA;
- DEG_id_type_tag(bmain, GS(id->name));
-}
-
namespace {
void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag);
@@ -114,8 +108,20 @@ void lib_id_recalc_tag_flag(Main *bmain, ID *id, int flag)
if (flag & OB_RECALC_OB) {
lib_id_recalc_tag(bmain, id);
}
- if (flag & (OB_RECALC_DATA | PSYS_RECALC)) {
- lib_id_recalc_data_tag(bmain, id);
+ if (flag & (OB_RECALC_DATA)) {
+ if (GS(id->name) == ID_OB) {
+ Object *object = (Object *)id;
+ ID *object_data = (ID *)object->data;
+ if (object_data != NULL) {
+ lib_id_recalc_tag(bmain, object_data);
+ }
+ }
+ else {
+ BLI_assert(!"Tagging non-object as object data update");
+ }
+ }
+ if (flag & PSYS_RECALC) {
+ lib_id_recalc_tag(bmain, id);
}
}
else {
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index a30812c692f..d37e0915548 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -210,8 +210,6 @@ BLI_INLINE void flush_editors_id_update(Main *bmain,
deg_editors_id_update(update_ctx, id_cow);
}
lib_id_recalc_tag(bmain, id_orig);
- /* TODO(sergey): For until we've got proper data nodes in the graph. */
- lib_id_recalc_data_tag(bmain, id_orig);
}
}
More information about the Bf-blender-cvs
mailing list