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:
m---------release/datafiles/locale0
m---------release/scripts/addons0
m---------release/scripts/addons_contrib0
-rw-r--r--source/blender/blenkernel/BKE_movieclip.h4
-rw-r--r--source/blender/blenkernel/intern/movieclip.c24
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc2
-rw-r--r--source/blender/editors/space_clip/clip_ops.c2
-rw-r--r--source/blender/makesdna/DNA_ID.h5
-rw-r--r--source/blender/makesrna/intern/rna_color.c2
-rw-r--r--source/blender/makesrna/intern/rna_movieclip.c5
10 files changed, 35 insertions, 9 deletions
diff --git a/release/datafiles/locale b/release/datafiles/locale
-Subproject 6625026f62f492dd677f5f29c68b9d70c96fb34
+Subproject 63f65770e67f38db29f76ac910dd87bd9841b91
diff --git a/release/scripts/addons b/release/scripts/addons
-Subproject 979298511916b25ec97bb22feb1c06cc9fbc86d
+Subproject 37a8bdc661649cb6197e73b5eb96481cd5fb0c5
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
-Subproject b4fce25e94ec139554e821f58bbada3384b13af
+Subproject d9ed9d4d064c74c86e2767cd4be32d602a0ee31
diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h
index 9425f396bc5..14d7784f93e 100644
--- a/source/blender/blenkernel/BKE_movieclip.h
+++ b/source/blender/blenkernel/BKE_movieclip.h
@@ -118,7 +118,9 @@ bool BKE_movieclip_put_frame_if_possible(struct MovieClip *clip,
/* Dependency graph evaluation. */
-void BKE_movieclip_eval_update(struct Depsgraph *depsgraph, struct MovieClip *clip);
+void BKE_movieclip_eval_update(struct Depsgraph *depsgraph,
+ struct Main *bmain,
+ struct MovieClip *clip);
void BKE_movieclip_eval_selection_update(struct Depsgraph *depsgraph, struct MovieClip *clip);
/* caching flags */
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 6bc83f8dd09..e55bb675063 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -53,6 +53,7 @@
#include "BKE_animsys.h"
#include "BKE_colortools.h"
+#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_movieclip.h"
@@ -1772,9 +1773,17 @@ static void movieclip_selection_synchronize(MovieClip *clip_dst, const MovieClip
}
}
-void BKE_movieclip_eval_update(struct Depsgraph *depsgraph, MovieClip *clip)
+void movieclip_eval_update_reload(struct Depsgraph *depsgraph, Main *bmain, MovieClip *clip)
+{
+ BKE_movieclip_reload(bmain, clip);
+ if (DEG_is_active(depsgraph)) {
+ MovieClip *clip_orig = (MovieClip *)DEG_get_original_id(&clip->id);
+ BKE_movieclip_reload(bmain, clip_orig);
+ }
+}
+
+void movieclip_eval_update_generic(struct Depsgraph *depsgraph, MovieClip *clip)
{
- DEG_debug_print_eval(depsgraph, __func__, clip->id.name, clip);
BKE_tracking_dopesheet_tag_update(&clip->tracking);
if (DEG_is_active(depsgraph)) {
MovieClip *clip_orig = (MovieClip *)DEG_get_original_id(&clip->id);
@@ -1782,6 +1791,17 @@ void BKE_movieclip_eval_update(struct Depsgraph *depsgraph, MovieClip *clip)
}
}
+void BKE_movieclip_eval_update(struct Depsgraph *depsgraph, Main *bmain, MovieClip *clip)
+{
+ DEG_debug_print_eval(depsgraph, __func__, clip->id.name, clip);
+ if (clip->id.recalc & ID_RECALC_SOURCE) {
+ movieclip_eval_update_reload(depsgraph, bmain, clip);
+ }
+ else {
+ movieclip_eval_update_generic(depsgraph, clip);
+ }
+}
+
void BKE_movieclip_eval_selection_update(struct Depsgraph *depsgraph, MovieClip *clip)
{
DEG_debug_print_eval(depsgraph, __func__, clip->id.name, clip);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index fa6d7bc6028..b06d6e73de0 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -1557,7 +1557,7 @@ void DepsgraphNodeBuilder::build_movieclip(MovieClip *clip)
add_operation_node(clip_id,
NodeType::PARAMETERS,
OperationCode::MOVIECLIP_EVAL,
- function_bind(BKE_movieclip_eval_update, _1, clip_cow));
+ function_bind(BKE_movieclip_eval_update, _1, bmain_, clip_cow));
add_operation_node(clip_id,
NodeType::BATCH_CACHE,
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 45479c4253d..e1af9728685 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -1434,7 +1434,7 @@ static void proxy_endjob(void *pjv)
if (pj->clip->source == MCLIP_SRC_MOVIE) {
/* Timecode might have changed, so do a full reload to deal with this. */
- BKE_movieclip_reload(pj->main, pj->clip);
+ DEG_id_tag_update(&pj->clip->id, ID_RECALC_SOURCE);
}
else {
/* For image sequences we'll preserve original cache. */
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index dc4164169f9..ef9069acb78 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -620,6 +620,11 @@ typedef enum IDRecalcFlag {
* Basically, the same what changing frame in a timeline will do. */
ID_RECALC_TIME = (1 << 22),
+ /* Input has changed and datablock is to be reload from disk.
+ * Applies to movie clips to inform that copy-on-written version is to be refreshed for the new
+ * input file or for color space changes. */
+ ID_RECALC_SOURCE = (1 << 23),
+
/***************************************************************************
* Pseudonyms, to have more semantic meaning in the actual code without
* using too much low-level and implementation specific tags. */
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 43df1d8e1aa..d221b7005f6 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -597,7 +597,7 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *bmain,
else if (GS(id->name) == ID_MC) {
MovieClip *clip = (MovieClip *)id;
- BKE_movieclip_reload(bmain, clip);
+ DEG_id_tag_update(&clip->id, ID_RECALC_SOURCE);
BKE_sequence_invalidate_movieclip_strips(bmain, clip);
WM_main_add_notifier(NC_MOVIECLIP | ND_DISPLAY, &clip->id);
diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c
index 247c4c69019..10e19b92dda 100644
--- a/source/blender/makesrna/intern/rna_movieclip.c
+++ b/source/blender/makesrna/intern/rna_movieclip.c
@@ -51,12 +51,11 @@
# include "DNA_screen_types.h"
# include "DNA_space_types.h"
-static void rna_MovieClip_reload_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_MovieClip_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
MovieClip *clip = (MovieClip *)ptr->id.data;
- BKE_movieclip_reload(bmain, clip);
- DEG_id_tag_update(&clip->id, 0);
+ DEG_id_tag_update(&clip->id, ID_RECALC_SOURCE);
}
static void rna_MovieClip_size_get(PointerRNA *ptr, int *values)