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:
authorSergey Sharybin <sergey@blender.org>2021-01-27 16:20:31 +0300
committerSergey Sharybin <sergey@blender.org>2021-01-27 16:20:31 +0300
commitcd24712c2c51ab753369f7cae8c43c38115bd59f (patch)
tree34c10030e3da5d64a82e02061043d6ece10578d8 /source/blender/depsgraph
parentea01c8c5f6ce5bf7df1af13795155f2dec473e0a (diff)
Fix T84717: Missing viewport update after shading changes
Revert "Fix T83411: Crash when using a workspace/layout data path in a driver" The fix for the crash exposed design violation in the viewport shading updates, which is for some reason relying on dependency graph tag of interface data. The viewport module did not respond to the issue in 2 weeks, and the architect considered missing update for multiple users a more serious issue than a crash in a very specific case. This reverts commit 0f95f51361d73fbd8ba8d80b3b65da930dcf3b20.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc36
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.h3
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc37
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.h3
-rw-r--r--source/blender/depsgraph/intern/depsgraph.cc8
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc4
6 files changed, 8 insertions, 83 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 39dc4b32ca1..a109c5d8d88 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -387,9 +387,7 @@ void DepsgraphNodeBuilder::build_id(ID *id)
if (id == nullptr) {
return;
}
-
- const ID_Type id_type = GS(id->name);
- switch (id_type) {
+ switch (GS(id->name)) {
case ID_AC:
build_action((bAction *)id);
break;
@@ -479,39 +477,13 @@ void DepsgraphNodeBuilder::build_id(ID *id)
case ID_SIM:
build_simulation((Simulation *)id);
break;
- case ID_PA:
- build_particle_settings((ParticleSettings *)id);
- break;
- case ID_GD:
- build_gpencil((bGPdata *)id);
- break;
-
- case ID_LI:
- case ID_IP:
- case ID_SCR:
- case ID_VF:
- case ID_BR:
- case ID_WM:
- case ID_PAL:
- case ID_PC:
- case ID_WS:
- BLI_assert(!deg_copy_on_write_is_needed(id_type));
- build_generic_id(id);
+ default:
+ fprintf(stderr, "Unhandled ID %s\n", id->name);
+ BLI_assert(!"Should never happen");
break;
}
}
-void DepsgraphNodeBuilder::build_generic_id(ID *id)
-{
- if (built_map_.checkIsBuiltAndTag(id)) {
- return;
- }
-
- build_idproperties(id->properties);
- build_animdata(id);
- build_parameters(id);
-}
-
static void build_idproperties_callback(IDProperty *id_property, void *user_data)
{
DepsgraphNodeBuilder *builder = reinterpret_cast<DepsgraphNodeBuilder *>(user_data);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
index a7033c8c8f3..174f9b129f9 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
@@ -152,9 +152,6 @@ class DepsgraphNodeBuilder : public DepsgraphBuilder {
virtual void build_id(ID *id);
- /* Build function for ID types that do not need their own build_xxx() function. */
- virtual void build_generic_id(ID *id);
-
virtual void build_idproperties(IDProperty *id_property);
virtual void build_scene_render(Scene *scene, ViewLayer *view_layer);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index a6eb40cc6b8..5f591b4aee0 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -484,9 +484,7 @@ void DepsgraphRelationBuilder::build_id(ID *id)
if (id == nullptr) {
return;
}
-
- const ID_Type id_type = GS(id->name);
- switch (id_type) {
+ switch (GS(id->name)) {
case ID_AC:
build_action((bAction *)id);
break;
@@ -562,40 +560,13 @@ void DepsgraphRelationBuilder::build_id(ID *id)
case ID_SIM:
build_simulation((Simulation *)id);
break;
- case ID_PA:
- build_particle_settings((ParticleSettings *)id);
- break;
- case ID_GD:
- build_gpencil((bGPdata *)id);
- break;
-
- case ID_LI:
- case ID_IP:
- case ID_SCR:
- case ID_VF:
- case ID_BR:
- case ID_WM:
- case ID_PAL:
- case ID_PC:
- case ID_WS:
- BLI_assert(!deg_copy_on_write_is_needed(id_type));
- build_generic_id(id);
+ default:
+ fprintf(stderr, "Unhandled ID %s\n", id->name);
+ BLI_assert(!"Should never happen");
break;
}
}
-void DepsgraphRelationBuilder::build_generic_id(ID *id)
-{
-
- if (built_map_.checkIsBuiltAndTag(id)) {
- return;
- }
-
- build_idproperties(id->properties);
- build_animdata(id);
- build_parameters(id);
-}
-
static void build_idproperties_callback(IDProperty *id_property, void *user_data)
{
DepsgraphRelationBuilder *builder = reinterpret_cast<DepsgraphRelationBuilder *>(user_data);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
index 21d1d4b6268..5587379089c 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
@@ -198,9 +198,6 @@ class DepsgraphRelationBuilder : public DepsgraphBuilder {
virtual void build_id(ID *id);
- /* Build function for ID types that do not need their own build_xxx() function. */
- virtual void build_generic_id(ID *id);
-
virtual void build_idproperties(IDProperty *id_property);
virtual void build_scene_render(Scene *scene, ViewLayer *view_layer);
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index 3d30e7e79b9..17eeba55a27 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -142,14 +142,6 @@ static void clear_id_nodes_conditional(Depsgraph::IDDepsNodes *id_nodes, const F
* datablock for her own dirty needs. */
continue;
}
- if (id_node->id_cow == id_node->id_orig) {
- /* Copy-on-write version is not needed for this ID type.
- *
- * NOTE: Is important to not de-reference the original datablock here because it might be
- * freed already (happens during main database free when some IDs are freed prior to a
- * scene). */
- continue;
- }
if (!deg_copy_on_write_is_expanded(id_node->id_cow)) {
continue;
}
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index c60ec4351bc..95ee8234ef3 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -265,10 +265,6 @@ void depsgraph_update_editors_tag(Main *bmain, Depsgraph *graph, ID *id)
void depsgraph_id_tag_copy_on_write(Depsgraph *graph, IDNode *id_node, eUpdateSource update_source)
{
ComponentNode *cow_comp = id_node->find_component(NodeType::COPY_ON_WRITE);
- if (cow_comp == nullptr) {
- BLI_assert(!deg_copy_on_write_is_needed(GS(id_node->id_orig->name)));
- return;
- }
cow_comp->tag_update(graph, update_source);
}