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:
authorSybren A. Stüvel <sybren@blender.org>2020-01-16 16:57:33 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-01-21 12:44:23 +0300
commit9f66062da73e954f7c00acd9d5d5ead9ac1e8863 (patch)
tree9f758a0bd7d751ac10de259798e46302bc0f3b6d /source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
parent1982d110f4ec364a5deddbf262d78c4bcf5224e1 (diff)
Fix T72213: F-Curve animation does not update FreeStyle properties
FreeStyle line styles were not part of the dependency graph, and blacklisted from the Copy-on-Write system. As a result, animated FreeStyle properties would not be updated by the animation system, resulting in T72213. There was an explicit call to run the animation system on the original datablocks, but that was (for good reasons) removed in D5394. This commit adds the FreeStyleLineStyle datablocks to the dependency graph and allows them to be handled by the CoW system. As a result - the UI now updates properly when properties are animated, and - animated property values are actually used when rendering. This commit includes @Sergey's patch P1222, which unifies two bits of code that did the same thing: check whether datablock type is covered by copy-on-write. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D6609
Diffstat (limited to 'source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc19
1 files changed, 2 insertions, 17 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 996d807480d..a1bb0aab029 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -499,21 +499,6 @@ BLI_INLINE bool check_datablock_expanded(const ID *id_cow)
return (id_cow->name[0] != '\0');
}
-/* Those are data-blocks which are not covered by dependency graph and hence
- * does not need any remapping or anything.
- *
- * TODO(sergey): How to make it more robust for the future, so we don't have
- * to maintain exception lists all over the code? */
-bool check_datablocks_copy_on_writable(const ID *id_orig)
-{
- const ID_Type id_type = GS(id_orig->name);
- /* We shouldn't bother if copied ID is same as original one. */
- if (!deg_copy_on_write_is_needed(id_orig)) {
- return false;
- }
- return !ELEM(id_type, ID_BR, ID_LS, ID_PAL);
-}
-
/* Callback for BKE_library_foreach_ID_link which remaps original ID pointer
* with the one created by CoW system. */
@@ -536,7 +521,7 @@ int foreach_libblock_remap_callback(void *user_data_v, ID *id_self, ID **id_p, i
RemapCallbackUserData *user_data = (RemapCallbackUserData *)user_data_v;
const Depsgraph *depsgraph = user_data->depsgraph;
ID *id_orig = *id_p;
- if (check_datablocks_copy_on_writable(id_orig)) {
+ if (deg_copy_on_write_is_needed(id_orig)) {
ID *id_cow;
if (user_data->create_placeholders) {
/* Special workaround to stop creating temp datablocks for
@@ -1123,7 +1108,7 @@ bool deg_copy_on_write_is_expanded(const ID *id_cow)
bool deg_copy_on_write_is_needed(const ID *id_orig)
{
const ID_Type id_type = GS(id_orig->name);
- return !ELEM(id_type, ID_IM);
+ return ID_TYPE_IS_COW(id_type);
}
} // namespace DEG