diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-11-17 17:29:22 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-11-17 17:29:22 +0300 |
commit | 1f8762bb8e2783ec3943894eaaf2ae8df08c5e02 (patch) | |
tree | 3793851b60784f8d5e394d31b26f7f8d669f3a4a /source | |
parent | 0a08d8c892d595eab9aaec46739ef697bcee5cef (diff) |
Fix T50060: New depsgraph does not update mask animation
Diffstat (limited to 'source')
4 files changed, 37 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 89b9fc98e33..011eec9e0c1 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -55,6 +55,7 @@ extern "C" { #include "DNA_key_types.h" #include "DNA_lamp_types.h" #include "DNA_material_types.h" +#include "DNA_mask_types.h" #include "DNA_mesh_types.h" #include "DNA_meta_types.h" #include "DNA_node_types.h" @@ -395,10 +396,15 @@ void DepsgraphNodeBuilder::build_scene(Main *bmain, Scene *scene) build_gpencil(scene->gpd); } - /* cache files */ + /* Cache file. */ LINKLIST_FOREACH (CacheFile *, cachefile, &bmain->cachefiles) { build_cachefile(cachefile); } + + /* Masks. */ + LINKLIST_FOREACH (Mask *, mask, &bmain->mask) { + build_mask(mask); + } } void DepsgraphNodeBuilder::build_group(Scene *scene, @@ -1211,7 +1217,6 @@ void DepsgraphNodeBuilder::build_cachefile(CacheFile *cache_file) ID *cache_file_id = &cache_file->id; add_component_node(cache_file_id, DEPSNODE_TYPE_CACHE); - add_operation_node(cache_file_id, DEPSNODE_TYPE_CACHE, DEPSOP_TYPE_EXEC, NULL, DEG_OPCODE_PLACEHOLDER, "Cache File Update"); @@ -1220,4 +1225,11 @@ void DepsgraphNodeBuilder::build_cachefile(CacheFile *cache_file) build_animdata(cache_file_id); } +void DepsgraphNodeBuilder::build_mask(Mask *mask) +{ + ID *mask_id = &mask->id; + add_id_node(mask_id); + build_animdata(mask_id); +} + } // namespace DEG diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h index 72dc73357bf..0cfddeed6ef 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h @@ -44,6 +44,7 @@ struct Group; struct Key; struct Main; struct Material; +struct Mask; struct MTex; struct bNodeTree; struct Object; @@ -154,6 +155,7 @@ struct DepsgraphNodeBuilder { void build_compositor(Scene *scene); void build_gpencil(bGPdata *gpd); void build_cachefile(CacheFile *cache_file); + void build_mask(Mask *mask); protected: Main *m_bmain; diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index d8477358dad..293c14e5dde 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -55,6 +55,7 @@ extern "C" { #include "DNA_key_types.h" #include "DNA_lamp_types.h" #include "DNA_material_types.h" +#include "DNA_mask_types.h" #include "DNA_mesh_types.h" #include "DNA_meta_types.h" #include "DNA_node_types.h" @@ -405,6 +406,11 @@ void DepsgraphRelationBuilder::build_scene(Main *bmain, Scene *scene) build_gpencil(&scene->id, scene->gpd); } + /* Masks. */ + LINKLIST_FOREACH (Mask *, mask, &bmain->mask) { + build_mask(mask); + } + for (Depsgraph::OperationNodes::const_iterator it_op = m_graph->operations.begin(); it_op != m_graph->operations.end(); ++it_op) @@ -1738,4 +1744,15 @@ bool DepsgraphRelationBuilder::needs_animdata_node(ID *id) return false; } +void DepsgraphRelationBuilder::build_cachefile(CacheFile *cache_file) { + /* Animation. */ + build_animdata(&cache_file->id); +} + +void DepsgraphRelationBuilder::build_mask(Mask *mask) +{ + /* Animation. */ + build_animdata(&mask->id); +} + } // namespace DEG diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h index 8d8ad6772b8..1c293aa1508 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h @@ -47,6 +47,7 @@ struct Base; struct bGPdata; +struct CacheFile; struct ListBase; struct GHash; struct ID; @@ -54,6 +55,7 @@ struct FCurve; struct Group; struct Key; struct Main; +struct Mask; struct Material; struct MTex; struct bNodeTree; @@ -220,6 +222,8 @@ struct DepsgraphRelationBuilder void build_texture_stack(ID *owner, MTex **texture_stack); void build_compositor(Scene *scene); void build_gpencil(ID *owner, bGPdata *gpd); + void build_cachefile(CacheFile *cache_file); + void build_mask(Mask *mask); void add_collision_relations(const OperationKey &key, Scene *scene, Object *ob, Group *group, int layer, bool dupli, const char *name); void add_forcefield_relations(const OperationKey &key, Scene *scene, Object *ob, ParticleSystem *psys, EffectorWeights *eff, bool add_absorption, const char *name); |