WIP: Fix #105260: Skip nla tracks with library linked strips #107758
@ -1106,7 +1106,8 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id
|
||||
|
||||
/* Check for selected nodes. */
|
||||
if (fcu->rna_path &&
|
||||
BLI_str_quoted_substr(fcu->rna_path, "nodes[", node_name, sizeof(node_name))) {
|
||||
BLI_str_quoted_substr(fcu->rna_path, "nodes[", node_name, sizeof(node_name)))
|
||||
{
|
||||
/* Get strip name, and check if this strip is selected. */
|
||||
node = nodeFindNodebyName(ntree, node_name);
|
||||
|
||||
@ -1256,7 +1257,8 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads,
|
||||
if (ads && owner_id) {
|
||||
if ((filter_mode & ANIMFILTER_TMP_IGNORE_ONLYSEL) == 0) {
|
||||
if ((ads->filterflag & ADS_FILTER_ONLYSEL) ||
|
||||
(ads->filterflag & ADS_FILTER_INCL_HIDDEN) == 0) {
|
||||
(ads->filterflag & ADS_FILTER_INCL_HIDDEN) == 0)
|
||||
{
|
||||
if (skip_fcurve_selected_data(ads, fcu, owner_id, filter_mode)) {
|
||||
continue;
|
||||
}
|
||||
@ -1565,6 +1567,25 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac),
|
||||
}
|
||||
}
|
||||
|
||||
/* Skip library linked nla strips when filtering for edit. */
|
||||
bool is_lib_linked = false;
|
||||
if (filter_mode & ANIMFILTER_FOREDIT) {
|
||||
NlaStrip *strip;
|
||||
for (strip = nlt->strips.first; strip; strip = strip->next) {
|
||||
/* Don't have to check all, if any is linked the nla track should not be edited.*/
|
||||
if (strip->act) {
|
||||
if (ID_IS_LINKED(strip->act)) {
|
||||
is_lib_linked = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_lib_linked) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* add the track now that it has passed all our tests */
|
||||
ANIMCHANNEL_NEW_CHANNEL(nlt, ANIMTYPE_NLATRACK, owner_id, NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user