Merge remote-tracking branch 'origin/blender-v4.4-release'
This commit is contained in:
@@ -88,6 +88,8 @@
|
||||
#include "BKE_unit.hh"
|
||||
#include "BKE_workspace.hh"
|
||||
|
||||
#include "ANIM_action.hh"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_build.hh"
|
||||
#include "DEG_depsgraph_debug.hh"
|
||||
@@ -1600,14 +1602,26 @@ const char *RE_engine_id_CYCLES = "CYCLES";
|
||||
|
||||
static void remove_sequencer_fcurves(Scene *sce)
|
||||
{
|
||||
AnimData *adt = BKE_animdata_from_id(&sce->id);
|
||||
using namespace blender;
|
||||
|
||||
if (adt && adt->action) {
|
||||
LISTBASE_FOREACH_MUTABLE (FCurve *, fcu, &adt->action->curves) {
|
||||
if ((fcu->rna_path) && strstr(fcu->rna_path, "sequences_all")) {
|
||||
action_groups_remove_channel(adt->action, fcu);
|
||||
BKE_fcurve_free(fcu);
|
||||
}
|
||||
std::optional<std::pair<animrig::Action *, animrig::Slot *>> action_and_slot =
|
||||
animrig::get_action_slot_pair(sce->id);
|
||||
if (!action_and_slot) {
|
||||
return;
|
||||
}
|
||||
|
||||
animrig::Channelbag *channelbag = channelbag_for_action_slot(*action_and_slot->first,
|
||||
action_and_slot->second->handle);
|
||||
if (!channelbag) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create a copy of the F-Curve pointers, so iteration is safe while they are removed. */
|
||||
Vector<FCurve *> fcurves = channelbag->fcurves();
|
||||
|
||||
for (FCurve *fcurve : fcurves) {
|
||||
if ((fcurve->rna_path) && strstr(fcurve->rna_path, "sequence_editor.strips_all")) {
|
||||
channelbag->fcurve_remove(*fcurve);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,6 +193,11 @@ static void animchan_sync_fcurve_scene(bAnimListElem *ale)
|
||||
|
||||
/* Check if this strip is selected. */
|
||||
Editing *ed = blender::seq::editing_get(scene);
|
||||
if (ed == nullptr) {
|
||||
/* The existence of the F-Curve doesn't imply the existence of the sequencer
|
||||
* strip, or even the sequencer itself. */
|
||||
return;
|
||||
}
|
||||
strip = blender::seq::get_sequence_by_name(ed->seqbasep, strip_name, false);
|
||||
if (strip == nullptr) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user