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/eval/deg_eval_copy_on_write.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/eval/deg_eval_copy_on_write.h')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h
index 0e1b6642002..78f6f7d926e 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h
@@ -53,17 +53,19 @@ struct IDDepsNode;
/* Get fully expanded (ready for use) copy-on-write datablock for the given
* original datablock.
*/
-ID *deg_expand_copy_on_write_datablock(const Depsgraph *depsgraph,
- const IDDepsNode *id_node);
-ID *deg_expand_copy_on_write_datablock(const struct Depsgraph *depsgraph,
- struct ID *id_orig);
+ID *deg_expand_copy_on_write_datablock(struct Depsgraph *depsgraph,
+ const IDDepsNode *id_node,
+ bool create_placeholders);
+ID *deg_expand_copy_on_write_datablock(struct Depsgraph *depsgraph,
+ struct ID *id_orig,
+ bool create_placeholders);
/* Makes sure given CoW datablock is brought back to state of the original
* datablock.
*/
-ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,
+ID *deg_update_copy_on_write_datablock(/*const*/ struct Depsgraph *depsgraph,
const IDDepsNode *id_node);
-ID *deg_update_copy_on_write_datablock(const struct Depsgraph *depsgraph,
+ID *deg_update_copy_on_write_datablock(/*const*/ struct Depsgraph *depsgraph,
struct ID *id_orig);
/* Helper function which frees memory used by copy-on-written databnlock. */
@@ -72,8 +74,8 @@ void deg_free_copy_on_write_datablock(struct ID *id_cow);
/* Callback function for depsgraph operation node which ensures copy-on-write
* datablock is ready for use by further evaluation routines.
*/
-void deg_evaluate_copy_on_write(struct EvaluationContext *eval_ctx,
- const struct Depsgraph *depsgraph,
+void deg_evaluate_copy_on_write(const struct EvaluationContext *eval_ctx,
+ /*const*/ struct Depsgraph *depsgraph,
const struct IDDepsNode *id_node);
/* Check that given ID is propely expanded and does not have any shallow