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:
authorDalai Felinto <dfelinto@gmail.com>2018-08-13 22:59:42 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-08-15 15:46:33 +0300
commit5d15e68743fc92b41a85ef4180628427ab3b86da (patch)
tree54e363980253f46ee300f23f6bd585c9d4b840fc /source/blender/depsgraph/intern
parent7907dfc400182b408e558d9fef1240d9929f8661 (diff)
Fix viewport selection of markers not updating in all editors
This includes selections both in the clip editor as the viewport. The selection is implemented as a synchronization function called from the eval selection update node in depsgraph.
Diffstat (limited to 'source/blender/depsgraph/intern')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc7
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc4
-rw-r--r--source/blender/depsgraph/intern/depsgraph_type_defines.cc1
-rw-r--r--source/blender/depsgraph/intern/depsgraph_types.h3
4 files changed, 13 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 53612a66e5d..8d2960d1587 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -1502,7 +1502,7 @@ void DepsgraphNodeBuilder::build_movieclip(MovieClip *clip)
return;
}
ID *clip_id = &clip->id;
- MovieClip *clip_cow = get_cow_datablock(clip);
+ MovieClip *clip_cow = (MovieClip *)ensure_cow_id(clip_id);
/* Animation. */
build_animdata(clip_id);
/* Movie clip evaluation. */
@@ -1510,6 +1510,11 @@ void DepsgraphNodeBuilder::build_movieclip(MovieClip *clip)
DEG_NODE_TYPE_PARAMETERS,
function_bind(BKE_movieclip_eval_update, _1, clip_cow),
DEG_OPCODE_MOVIECLIP_EVAL);
+
+ add_operation_node(clip_id,
+ DEG_NODE_TYPE_BATCH_CACHE,
+ function_bind(BKE_movieclip_eval_selection_update, _1, clip_cow),
+ DEG_OPCODE_MOVIECLIP_SELECT_UPDATE);
}
void DepsgraphNodeBuilder::build_lightprobe(LightProbe *probe)
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index e4659a7a94d..e2c28f0d1e1 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -152,6 +152,10 @@ void depsgraph_select_tag_to_component_opcode(
*component_type = DEG_NODE_TYPE_OBJECT_FROM_LAYER;
*operation_code = DEG_OPCODE_OBJECT_BASE_FLAGS;
}
+ else if (id_type == ID_MC) {
+ *component_type = DEG_NODE_TYPE_BATCH_CACHE;
+ *operation_code = DEG_OPCODE_MOVIECLIP_SELECT_UPDATE;
+ }
else {
*component_type = DEG_NODE_TYPE_BATCH_CACHE;
*operation_code = DEG_OPCODE_GEOMETRY_SELECT_UPDATE;
diff --git a/source/blender/depsgraph/intern/depsgraph_type_defines.cc b/source/blender/depsgraph/intern/depsgraph_type_defines.cc
index 6d7f86581d9..7abde2e865c 100644
--- a/source/blender/depsgraph/intern/depsgraph_type_defines.cc
+++ b/source/blender/depsgraph/intern/depsgraph_type_defines.cc
@@ -175,6 +175,7 @@ const char *operationCodeAsString(eDepsOperation_Code opcode)
STRINGIFY_OPCODE(WORLD_UPDATE);
/* Movie clip. */
STRINGIFY_OPCODE(MOVIECLIP_EVAL);
+ STRINGIFY_OPCODE(MOVIECLIP_SELECT_UPDATE);
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 6577e742266..b19eb619fac 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -152,7 +152,7 @@ typedef enum eDepsNode_Type {
DEG_NODE_TYPE_SHADING_PARAMETERS,
/* Cache Component */
DEG_NODE_TYPE_CACHE,
- /* Batch Cache Component */
+ /* Batch Cache Component - TODO (dfelinto/sergey) rename to make it more generic. */
DEG_NODE_TYPE_BATCH_CACHE,
/* Total number of meaningful node types. */
@@ -274,6 +274,7 @@ typedef enum eDepsOperation_Code {
/* Movie clips. ------------------------------------ */
DEG_OPCODE_MOVIECLIP_EVAL,
+ DEG_OPCODE_MOVIECLIP_SELECT_UPDATE,
DEG_NUM_OPCODES,
} eDepsOperation_Code;