[Bf-blender-cvs] [08241b313c6] master: Fix (studio reported) missing object's parent handling in readfile expand code.

Bastien Montagne noreply at git.blender.org
Mon Jul 5 18:07:07 CEST 2021


Commit: 08241b313c6dd7b59e51f028ef23a728344b2834
Author: Bastien Montagne
Date:   Mon Jul 5 18:03:57 2021 +0200
Branches: master
https://developer.blender.org/rB08241b313c6dd7b59e51f028ef23a728344b2834

Fix (studio reported) missing object's parent handling in readfile expand code.

This would prevent loading a parent that would only be referenced by
children during a linking operation.

Looks like this missing bit of code has been there since the stone ages,
it is fairly baffling to find that such critical low-levels mistakes can
survive decades in a codebase...

Note that such fully-indirectly linked parent object is not instantiated
in scene currently, this is fairly bad I think, but kind of a different
issue.

===================================================================

M	source/blender/blenkernel/intern/object.c

===================================================================

diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 5b8b701c975..e0b23958ec9 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1041,6 +1041,8 @@ static void object_blend_read_expand(BlendExpander *expander, ID *id)
 
   BLO_expand(expander, ob->data);
 
+  BLO_expand(expander, ob->parent);
+
   /* expand_object_expandModifier() */
   if (ob->modifiers.first) {
     BKE_modifiers_foreach_ID_link(ob, expand_object_expandModifiers, expander);



More information about the Bf-blender-cvs mailing list