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.vfx@gmail.com>2019-10-10 16:40:25 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-10-10 17:13:54 +0300
commiteac0f3584545e9e5d9674d2fd9b74c256ce841f3 (patch)
treed1dec9c0cff6b43c96c795e4d75a850d6b0380d0
parent1857aa32bd3bf6f48b3e1a24ad7576af5e06540a (diff)
Fix T65134: Duplicated proxies in several scenes don't work
This is something which worked in Blender 2.79. Need to do special trickery to ensure peoxy_from points to a proper object. Differential Revision: https://developer.blender.org/D6040
-rw-r--r--source/blender/blenkernel/intern/armature_update.c4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc3
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc9
3 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index 00975976130..b4f5b1e2ec4 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -643,6 +643,10 @@ void BKE_pose_eval_init(struct Depsgraph *depsgraph, Scene *UNUSED(scene), Objec
}
BLI_assert(pose->chan_array != NULL || BLI_listbase_is_empty(&pose->chanbase));
+
+ if (object->proxy != NULL) {
+ object->proxy->proxy_from = object;
+ }
}
void BKE_pose_eval_init_ik(struct Depsgraph *depsgraph, Scene *scene, Object *object)
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 7dfc863b847..d0e40d49527 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -527,6 +527,9 @@ void DepsgraphNodeBuilder::build_object(int base_index,
eDepsNode_LinkedState_Type linked_state,
bool is_visible)
{
+ if (object->proxy != NULL) {
+ object->proxy->proxy_from = object;
+ }
const bool has_object = built_map_.checkIsBuiltAndTag(object);
/* Skip rest of components if the ID node was already there. */
if (has_object) {
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 058ee4e9076..b67629cde9e 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -511,6 +511,14 @@ void deg_graph_on_visible_update(Main *bmain, Depsgraph *graph, const bool do_ti
* to evaluation though) with `do_time=true`. This means early output checks should be aware of
* this. */
for (DEG::IDNode *id_node : graph->id_nodes) {
+ const ID_Type id_type = GS(id_node->id_orig->name);
+ if (id_type == ID_OB) {
+ Object *object_orig = reinterpret_cast<Object *>(id_node->id_orig);
+ if (object_orig->proxy != NULL) {
+ object_orig->proxy->proxy_from = object_orig;
+ }
+ }
+
if (!id_node->visible_components_mask) {
/* ID has no components which affects anything visible.
* No need bother with it to tag or anything. */
@@ -537,7 +545,6 @@ void deg_graph_on_visible_update(Main *bmain, Depsgraph *graph, const bool do_ti
* other type of cache).
*
* TODO(sergey): Need to generalize this somehow. */
- const ID_Type id_type = GS(id_node->id_orig->name);
if (id_type == ID_OB) {
flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY;
}