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:
authorSybren A. Stüvel <sybren@blender.org>2020-06-25 16:18:59 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-06-25 16:18:59 +0300
commitd0693c160ae49417d0afd63c66caa4c58e2cec9b (patch)
tree23b6335368af598a5feaac97973e118ddcdf9c1a /source/blender
parentfd5c185bebd5a418634b2a8846f0aeea86327b20 (diff)
Revert "Fix T78071: Drivers reading object visibility not updating automatically"
This reverts commit baa0da3e69a1225cd18c075be5563c7d811b5347. The commit causes some issues I didn't foresee, I'd rather take the time to do it properly than hastily try and commit a fix for it.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc7
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc12
2 files changed, 3 insertions, 16 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 46dbe97ce23..d84ec9b1363 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -667,15 +667,8 @@ void DepsgraphNodeBuilder::build_object_flags(int base_index,
eDepsNode_LinkedState_Type linked_state)
{
if (base_index == -1) {
- /* An object can be targeted by a driver that reads its `hide_viewport` or `hide_render`
- * property. For visible objects, these properties are synced from the base flags, so that
- * driver variable creates a relation from the OBJECT_FROM_LAYER component. However, when the
- * object is hidden, it has base_index=-1. To support the aforementioned driver, the component
- * should still exist, even if it's a no-op. See T78071. */
- add_operation_node(&object->id, NodeType::OBJECT_FROM_LAYER, OperationCode::OBJECT_BASE_FLAGS);
return;
}
-
Scene *scene_cow = get_cow_datablock(scene_);
Object *object_cow = get_cow_datablock(object);
const bool is_from_set = (linked_state == DEG_ID_LINKED_VIA_SET);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 7b2b048d405..e21a83485ad 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -757,20 +757,14 @@ void DepsgraphRelationBuilder::build_object_proxy_group(Object *object)
void DepsgraphRelationBuilder::build_object_flags(Base *base, Object *object)
{
- /* An object can be targeted by a driver that reads its `hide_viewport` or `hide_render`
- * property. When the object is hidden, it has no base. To support such a driver, the component
- * should still have a relation from the view layer, as it should be updated when the object
- * toggles visiblity. See T78071. */
+ if (base == nullptr) {
+ return;
+ }
OperationKey view_layer_done_key(
&scene_->id, NodeType::LAYER_COLLECTIONS, OperationCode::VIEW_LAYER_EVAL);
OperationKey object_flags_key(
&object->id, NodeType::OBJECT_FROM_LAYER, OperationCode::OBJECT_BASE_FLAGS);
add_relation(view_layer_done_key, object_flags_key, "Base flags flush");
-
- if (base == nullptr) {
- return;
- }
-
/* Synchronization back to original object. */
OperationKey synchronize_key(
&object->id, NodeType::SYNCHRONIZATION, OperationCode::SYNCHRONIZE_TO_ORIGINAL);