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>2017-07-19 12:57:20 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-07-19 16:20:07 +0300
commit5d9a1b440b13bcd6f4255e7205421c0495e7ea12 (patch)
tree6103239cdca0150ed8652dd995e797eb1da979c5 /source/blender/depsgraph/intern/depsgraph.h
parenta532fe561ec18f2a1676a0dcb548380aa25416fe (diff)
Depsgraph: Fix wrong ID remapping when armature object is constructed prior to it's targets
Previously it was possible to run into situation when armature is constructed prior to objects which are used for it's constraints. This was causing wrong scene evaluation. Now we create placeholders for objects used by armature in case they don't have ID node yet, which ensures we have proper mapping from original to copy-on-write ID pointer.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph.h')
-rw-r--r--source/blender/depsgraph/intern/depsgraph.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index 50c55bc0cf9..9d94fe387a2 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -102,7 +102,8 @@ struct Depsgraph {
* Convenience wrapper to find node given just pointer + property.
*
* \param ptr: pointer to the data that node will represent
- * \param prop: optional property affected - providing this effectively results in inner nodes being returned
+ * \param prop: optional property affected - providing this effectively
+ * results in inner nodes being returned
*
* \return A node matching the required characteristics if it exists
* or NULL if no such node exists in the graph
@@ -113,7 +114,7 @@ struct Depsgraph {
TimeSourceDepsNode *find_time_source() const;
IDDepsNode *find_id_node(const ID *id) const;
- IDDepsNode *add_id_node(ID *id, const char *name = "");
+ IDDepsNode *add_id_node(ID *id, const char *name = "", bool do_tag = true);
void clear_id_nodes();
/* Add new relationship between two nodes. */
@@ -136,6 +137,11 @@ struct Depsgraph {
/* For given original ID get ID which is created by CoW system. */
ID *get_cow_id(const ID *id_orig) const;
+ /* Similar to above, but for the cases when there is no ID node we create
+ * one.
+ */
+ ID *ensure_cow_id(ID *id_orig);
+
/* Core Graph Functionality ........... */
/* <ID : IDDepsNode> mapping from ID blocks to nodes representing these blocks