Blender Git Commit Log

Git Commits -> Revision 876fd40

Revision 876fd40 by Sergey Sharybin (master)
January 29, 2021, 14:52 (GMT)
Fix T83411: Crash when using a workspace/layout data path in a driver

Building IDs which are not covered by copy-on-write process was not
implemented, which was causing parameters block not present, and, hence
causing crashes in areas which expected parameters to present.

First part of this change is related on making it so Copy-on-Write is
optional for ID nodes in the dependency graph.

Second part is related on using a generic builder for all ID types
which were not covered by Copy-on-Write before.

The final part is related on making it so build_id() is properly
handling ParticleSettings and Grease Pencil Data. Before they were not
covered there at all, and they need special handling because they do
have own build functions.

Not sure it worth trying to split those parts, as they are related to
each other and are not really possible to be tested standalone. Open
for a second opinion though.

Possible nut-tightening is to re-organize build_id() function so
that every branch does return and have an assert at the end, so that
missing ID type in the switch statement is easier to spot even when
using compilers which do not report missing switch cases.

As for question "why not use default" the answer is: to make it more
explicit and clear what is a decision when adding new ID types. We do
not want to quietly fall-back to a non-copy-on-write case for a newly
added ID types.

Differential Revision: https://developer.blender.org/D10075

Commit Details:

Full Hash: 876fd40643dfa7b206edabbde30809e6e48e583b
Parent Commit: 0e37d3e
Committed By: Brecht Van Lommel
Lines Changed: +73, -9

5 Modified Paths:

/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc (+32, -4) (Diff)
/source/blender/depsgraph/intern/builder/deg_builder_nodes.h (+3, -0) (Diff)
/source/blender/depsgraph/intern/builder/deg_builder_relations.cc (+33, -4) (Diff)
/source/blender/depsgraph/intern/builder/deg_builder_relations.h (+3, -0) (Diff)
/source/blender/makesdna/DNA_ID.h (+2, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021