[Bf-blender-cvs] [9413a5a00d6] experimental-build: Revert "LibOverride: Add initial support for adding new NLA tracks."
Bastien Montagne
noreply at git.blender.org
Fri Nov 20 14:24:23 CET 2020
Commit: 9413a5a00d65f152703c761f8d3ea9bf0ccd8d78
Author: Bastien Montagne
Date: Fri Nov 20 14:24:03 2020 +0100
Branches: experimental-build
https://developer.blender.org/rB9413a5a00d65f152703c761f8d3ea9bf0ccd8d78
Revert "LibOverride: Add initial support for adding new NLA tracks."
This reverts commit dbe330318011c137fc09d6a238f9282c983dadbf.
===================================================================
M source/blender/blenkernel/intern/nla.c
M source/blender/editors/animation/anim_channels_edit.c
M source/blender/editors/space_nla/nla_channels.c
M source/blender/editors/space_nla/nla_edit.c
M source/blender/editors/transform/transform_convert_nla.c
M source/blender/makesdna/DNA_anim_types.h
M source/blender/makesrna/intern/rna_access_compare_override.c
M source/blender/makesrna/intern/rna_animation.c
M source/blender/makesrna/intern/rna_nla.c
===================================================================
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 60da0768aeb..56bd83140bf 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -293,7 +293,7 @@ NlaTrack *BKE_nlatrack_add(AnimData *adt, NlaTrack *prev)
nlt = MEM_callocN(sizeof(NlaTrack), "NlaTrack");
/* set settings requiring the track to not be part of the stack yet */
- nlt->flag = NLATRACK_SELECTED | NLATRACK_OVERRIDELIBRARY_LOCAL;
+ nlt->flag = NLATRACK_SELECTED;
nlt->index = BLI_listbase_count(&adt->nla_tracks);
/* add track to stack, and make it the active one */
@@ -2273,11 +2273,6 @@ void BKE_nla_blend_read_lib(BlendLibReader *reader, ID *id, ListBase *tracks)
{
/* we only care about the NLA strips inside the tracks */
LISTBASE_FOREACH (NlaTrack *, nlt, tracks) {
- /* If linking from a library, clear 'local' library override flag. */
- if (id->lib != NULL) {
- nlt->flag &= ~NLATRACK_OVERRIDELIBRARY_LOCAL;
- }
-
blend_lib_read_nla_strips(reader, id, &nlt->strips);
}
}
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index cee4ac3d595..360335a54d7 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -1063,27 +1063,18 @@ static void rearrange_animchannels_filter_visible(ListBase *anim_data_visible,
eAnim_ChannelType type)
{
ListBase anim_data = {NULL, NULL};
- eAnimFilter_Flags filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE |
- ANIMFILTER_LIST_CHANNELS);
+ bAnimListElem *ale, *ale_next;
+ int filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
/* get all visible channels */
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* now, only keep the ones that are of the types we are interested in */
- LISTBASE_FOREACH_MUTABLE (bAnimListElem *, ale, &anim_data) {
+ for (ale = anim_data.first; ale; ale = ale_next) {
+ ale_next = ale->next;
+
if (ale->type != type) {
BLI_freelinkN(&anim_data, ale);
- continue;
- }
-
- if (type == ANIMTYPE_NLATRACK) {
- NlaTrack *nlt = (NlaTrack *)ale->data;
-
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && (nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
- /* No re-arrangement of non-local tracks of override data. */
- BLI_freelinkN(&anim_data, ale);
- continue;
- }
}
}
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 2c2ee7b7388..561de5e82a6 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -796,11 +796,6 @@ static int nlaedit_delete_tracks_exec(bContext *C, wmOperator *UNUSED(op))
NlaTrack *nlt = (NlaTrack *)ale->data;
AnimData *adt = ale->adt;
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && (nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
- /* No deletion of non-local tracks of override data. */
- continue;
- }
-
/* if track is currently 'solo', then AnimData should have its
* 'has solo' flag disabled
*/
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 640f751d04e..ed8e5ad76e9 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -966,11 +966,6 @@ static int nlaedit_add_meta_exec(bContext *C, wmOperator *UNUSED(op))
AnimData *adt = ale->adt;
NlaStrip *strip;
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && (nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
- /* No making metastrips in non-local tracks of override data. */
- continue;
- }
-
/* create meta-strips from the continuous chains of selected strips */
BKE_nlastrips_make_metas(&nlt->strips, 0);
@@ -1035,11 +1030,6 @@ static int nlaedit_remove_meta_exec(bContext *C, wmOperator *UNUSED(op))
for (ale = anim_data.first; ale; ale = ale->next) {
NlaTrack *nlt = (NlaTrack *)ale->data;
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && (nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
- /* No removing metastrips from non-local tracks of override data. */
- continue;
- }
-
/* clear all selected meta-strips, regardless of whether they are temporary or not */
BKE_nlastrips_clear_metas(&nlt->strips, 1, 0);
@@ -1106,10 +1096,6 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *op)
NlaStrip *strip, *nstrip, *next;
NlaTrack *track;
- /* Note: In this case we allow it in override context because this operator is almost always
- * paired with the transform one, which will ensure that the new strip ends up in a valid
- * (local) track. */
-
for (strip = nlt->strips.first; strip; strip = next) {
next = strip->next;
@@ -1223,11 +1209,6 @@ static int nlaedit_delete_exec(bContext *C, wmOperator *UNUSED(op))
NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip, *nstrip;
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && (nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
- /* No deletion of strips in non-local tracks of override data. */
- continue;
- }
-
for (strip = nlt->strips.first; strip; strip = nstrip) {
nstrip = strip->next;
@@ -1378,11 +1359,6 @@ static int nlaedit_split_exec(bContext *C, wmOperator *UNUSED(op))
AnimData *adt = ale->adt;
NlaStrip *strip, *next;
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && (nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
- /* No splitting of strips in non-local tracks of override data. */
- continue;
- }
-
for (strip = nlt->strips.first; strip; strip = next) {
next = strip->next;
@@ -1527,11 +1503,6 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op)
NlaStrip *strip, *stripN = NULL;
NlaStrip *area = NULL, *sb = NULL;
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && (nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
- /* No re-ordering of strips whithin non-local tracks of override data. */
- continue;
- }
-
/* make temporary metastrips so that entire islands of selections can be moved around */
BKE_nlastrips_make_metas(&nlt->strips, 1);
@@ -1708,12 +1679,6 @@ static int nlaedit_move_up_exec(bContext *C, wmOperator *UNUSED(op))
continue;
}
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && ((nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0 ||
- (nltn->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0)) {
- /* No moving of strips in non-local tracks of override data. */
- continue;
- }
-
/* for every selected strip, try to move */
for (strip = nlt->strips.first; strip; strip = stripn) {
stripn = strip->next;
@@ -1791,12 +1756,6 @@ static int nlaedit_move_down_exec(bContext *C, wmOperator *UNUSED(op))
continue;
}
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && ((nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0 ||
- (nltp->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0)) {
- /* No moving of strips in non-local tracks of override data. */
- continue;
- }
-
/* for every selected strip, try to move */
for (strip = nlt->strips.first; strip; strip = stripn) {
stripn = strip->next;
@@ -2064,11 +2023,11 @@ static int nlaedit_apply_scale_exec(bContext *C, wmOperator *UNUSED(op))
/* strip must be selected, and must be action-clip only
* (transitions don't have scale) */
if ((strip->flag & NLASTRIP_FLAG_SELECT) && (strip->type == NLASTRIP_TYPE_CLIP)) {
- if (strip->act == NULL || ID_IS_OVERRIDE_LIBRARY(strip->act) || ID_IS_LINKED(strip->act)) {
- continue;
- }
/* if the referenced action is used by other strips,
* make this strip use its own copy */
+ if (strip->act == NULL) {
+ continue;
+ }
if (strip->act->id.us > 1) {
/* make a copy of the Action to work on */
bAction *act = (bAction *)BKE_id_copy(bmain, &strip->act->id);
@@ -2416,11 +2375,6 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && (nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
- /* No adding f-modifiers to strips in non-local tracks of override data. */
- continue;
- }
-
for (strip = nlt->strips.first; strip; strip = strip->next) {
/* can F-Modifier be added to the current strip? */
if (active_only) {
@@ -2598,11 +2552,6 @@ static int nla_fmodifier_paste_exec(bContext *C, wmOperator *op)
NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip;
- if (ID_IS_OVERRIDE_LIBRARY(ale->id) && (nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
- /* No pasting in non-local tracks of override data. */
- continue;
- }
-
for (strip = nlt->strips.first; strip; strip = strip->next) {
/* can F-Modifier be added to the current strip? */
if (active_only) {
diff --git a/source/blender/editors/transform/transform_convert_nla.c b/source/blender/editors/transform/transform_convert_nla.c
index cb91f88c253..8f18f6a8c96 100644
--- a/source/blender/editors/transform/transform_convert_nla.c
+++ b/source/blender/editors/transform/transform_convert_nla.c
@@ -462,12 +462,6 @@ void recalcData_nla(TransInfo *t)
* - we need to calculate both,
* as only one may have been altered by transform if only 1 handle moved.
*/
- /* In LibOverride case, we cannot move trips across tracks that come from the linked data. */
- const bool is_liboverride = ID_IS_OVERRIDE_LIBRARY(tdn->id);
- if (is_liboverride && (tdn->nlt->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
- continue;
- }
-
delta_y1 = ((int)tdn->h1[1] / NLACHANNEL_STEP(snla) - tdn->trackIndex);
delta_y2 = ((int)tdn->h2[1] / NLACHANNEL_STEP
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list