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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-06-09 09:17:35 +0300
committerJeroen Bakker <jeroen@blender.org>2020-06-18 10:31:19 +0300
commit0178e7b3939879323fefba798b7aff8ef1ea1cca (patch)
treec2e6a1809370e77dcda0b731337e86ded0528279 /source
parent42a517779ab3d1f884195282744dd57444641a38 (diff)
Fix T77148: Crash changing multiple values for sequencer strips
This was caused by assuming all strips were the same type.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_ops.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 53ea51c9e97..45e117efed4 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -737,6 +737,8 @@ bool UI_context_copy_to_selected_list(bContext *C,
*r_path = NULL;
/* special case for bone constraints */
char *path_from_bone = NULL;
+ /* Remove links from the collection list which don't contain 'prop'. */
+ bool ensure_list_items_contain_prop = false;
/* PropertyGroup objects don't have a reference to the struct that actually owns
* them, so it is normally necessary to do a brute force search to find it. This
@@ -803,6 +805,8 @@ bool UI_context_copy_to_selected_list(bContext *C,
else {
*r_lb = CTX_data_collection_get(C, "selected_editable_sequences");
}
+ /* Account for properties only being available for some sequence types. */
+ ensure_list_items_contain_prop = true;
}
else if (RNA_struct_is_a(ptr->type, &RNA_FCurve)) {
*r_lb = CTX_data_collection_get(C, "selected_editable_fcurves");
@@ -921,6 +925,8 @@ bool UI_context_copy_to_selected_list(bContext *C,
else {
*r_lb = CTX_data_collection_get(C, "selected_editable_sequences");
}
+ /* Account for properties only being available for some sequence types. */
+ ensure_list_items_contain_prop = true;
}
}
return (*r_path != NULL);
@@ -929,6 +935,17 @@ bool UI_context_copy_to_selected_list(bContext *C,
return false;
}
+ if (ensure_list_items_contain_prop) {
+ const char *prop_id = RNA_property_identifier(prop);
+ LISTBASE_FOREACH_MUTABLE (CollectionPointerLink *, link, r_lb) {
+ if ((ptr->type != link->ptr.type) &&
+ (RNA_struct_type_find_property(link->ptr.type, prop_id) != prop)) {
+ BLI_remlink(r_lb, link);
+ MEM_freeN(link);
+ }
+ }
+ }
+
return true;
}