diff options
Diffstat (limited to 'source/blender')
5 files changed, 24 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h index 3ddf75f204e..0bdff3eb795 100644 --- a/source/blender/blenkernel/BKE_movieclip.h +++ b/source/blender/blenkernel/BKE_movieclip.h @@ -32,6 +32,7 @@ * \author Sergey Sharybin */ +struct EvaluationContext; struct ImBuf; struct Main; struct MovieClip; @@ -82,6 +83,9 @@ struct ImBuf *BKE_movieclip_anim_ibuf_for_frame(struct MovieClip *clip, struct M bool BKE_movieclip_has_cached_frame(struct MovieClip *clip, struct MovieClipUser *user); bool BKE_movieclip_put_frame_if_possible(struct MovieClip *clip, struct MovieClipUser *user, struct ImBuf *ibuf); +/* Evaluaiton. */ +void BKE_movieclip_eval_update(struct EvaluationContext *eval_ctx, struct MovieClip *clip); + /* cacheing flags */ #define MOVIECLIP_CACHE_SKIP (1 << 0) diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 16d597e25fa..db05939b1cc 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -77,6 +77,8 @@ # include "intern/openexr/openexr_multi.h" #endif +#define DEBUG_PRINT if (G.debug & G_DEBUG_DEPSGRAPH) printf + /*********************** movieclip buffer loaders *************************/ static int sequence_guess_offset(const char *full_name, int head_len, unsigned short numlen) @@ -1589,3 +1591,9 @@ bool BKE_movieclip_put_frame_if_possible(MovieClip *clip, return result; } + +void BKE_movieclip_eval_update(struct EvaluationContext *UNUSED(eval_ctx), MovieClip *clip) +{ + DEBUG_PRINT("%s on %s (%p)\n", __func__, clip->id.name, clip); + BKE_tracking_dopesheet_tag_update(&clip->tracking); +} diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 77f4e5b2dd1..0228e619f54 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -86,6 +86,7 @@ extern "C" { #include "BKE_mesh.h" #include "BKE_mball.h" #include "BKE_modifier.h" +#include "BKE_movieclip.h" #include "BKE_node.h" #include "BKE_object.h" #include "BKE_particle.h" @@ -1112,6 +1113,11 @@ void DepsgraphNodeBuilder::build_movieclip(MovieClip *clip) { ID *clip_id = &clip->id; /* Animation. */ build_animdata(clip_id); + /* Movie clip evaluation. */ + add_operation_node(clip_id, + DEG_NODE_TYPE_PARAMETERS, + function_bind(BKE_movieclip_eval_update, _1, clip), + DEG_OPCODE_MOVIECLIP_EVAL); } } // namespace DEG diff --git a/source/blender/depsgraph/intern/depsgraph_type_defines.cc b/source/blender/depsgraph/intern/depsgraph_type_defines.cc index 96d68f4e024..e5bdaf79366 100644 --- a/source/blender/depsgraph/intern/depsgraph_type_defines.cc +++ b/source/blender/depsgraph/intern/depsgraph_type_defines.cc @@ -139,6 +139,8 @@ static const char *stringify_opcode(eDepsOperation_Code opcode) STRINGIFY_OPCODE(MASK_EVAL); /* Shading. */ STRINGIFY_OPCODE(SHADING); + /* Movie clip. */ + STRINGIFY_OPCODE(MOVIECLIP_EVAL); case DEG_NUM_OPCODES: return "SpecialCase"; #undef STRINGIFY_OPCODE diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h index e43b79a0361..03d98c85148 100644 --- a/source/blender/depsgraph/intern/depsgraph_types.h +++ b/source/blender/depsgraph/intern/depsgraph_types.h @@ -210,10 +210,13 @@ typedef enum eDepsOperation_Code { /* Shading. ------------------------------------------- */ DEG_OPCODE_SHADING, - /* Masks ------------------------------------------- */ + /* Masks. ------------------------------------------ */ DEG_OPCODE_MASK_ANIMATION, DEG_OPCODE_MASK_EVAL, + /* Movie clips. ------------------------------------ */ + DEG_OPCODE_MOVIECLIP_EVAL, + DEG_NUM_OPCODES, } eDepsOperation_Code; |