Mute/Solo/Disable sequencer track

Hello!

I’m trying to expose the ability to mute/solo/disable a sequencer track from a c++ plugin to python, to be used in-editor by tools that would need to mute certains tracks based on a context, but only locally.

The mute functionality is perfect for that, but it’s not exposed to python API and I struggle to even reproduce it in c++.

On a UMovieSceneTrack, I see the functions SetEvalDisabled and SetLocalEvalDisabled, which corresponds to Disable and Mute. Using track->Modify(true) and track->SetEvalDisabled(true) is correctly disabling the track and the small icon turn white like it should. But with SetLocalEvalDisabled, the track is muted but the icon does not turn white, and when some other states are modified in the sequencer, the mute is reset.

Should I do something else to make it more persistent ?

I also tried another way, with the IMutableExtension and SetIsMuted function, which seems to be what is used by the slate UI.

However I struggle to retrieve the correct object types needed to be able to call this function.

Could you point me out how to achieve this ?

Thanks !

Maxime

Hey there,

So, in 5.6 (the engine version you’ve indicated you’re on), this is not possible to script; it’s something that we added in 5.7. Also, the methodology for scripting it is very different than other things due. Here’s the CL in Github where we added it: https://github.com/EpicGames/UnrealEngine/commit/3ac07f8ef939ea2c9741476078704959c33a22ca. Here’s what those functions look like in the blueprint version, and it is not like working with tracks typically.

In terms of using SetEvalDisabled and SetLocalEvalDisabled, they have different requirements to indicate that the track is modified. You’ve got the right of it for SetEvalDisabled, but for LocalEvalDisabled, you will need to do something like:

Track->MarkAsChanged();
Track->SetLocalEvalDisabled(bLocalEvalDisabled);
Sequencer->NotifyMovieSceneDataChanged(EMovieSceneDataChangeType::TrackValueChanged);

Note that LocalEvalDisabled is not something meant to be serialized, which is also why other things might change its state. (Like saving the file)

All of this said, I would recommend waiting for 5.7 to be able to script this because of how different it is between versions.

Dustin

Hey, thanks for the quick answer !

Yes I had tested with `Sequencer->NotifyMovieSceneDataChanged(EMovieSceneDataChangeType::TrackValueChanged);`, but it still does not make the little eye icon white :frowning:

And whenever I click on any of the little eye icon, tracks that were muted via my script are automatically unmuted. I guess the information is not stored everywhere and something resets it.

That’s great if this will be easier in 5.7!

But I’d like to find a solution for 5.6 as we won’t pass on 5.7 for our project.

Do you think this is achievable ?

I’m almost there, I just miss one little thing: that the mute is not reset, and I think for that the eye icon should be modified somehow. (I don’t mean to save it in the asset, I know it is not saved)

Thanks !

Maxime

Understood, LocalEvalDisabled is transient, so I wouldn’t expect it to stick. Is there a reason you are using that?

Dustin

Well, that’s what I found to be easily accessible.

If you have better ideas of what I can do to replicate this ‘mute’ behavior correctly, I’d be happy !

Using track->Modify(true) and track->SetEvalDisabled(true) is correctly disabling the track and the small icon turn white like it should.

You mentioned this worked well for you… is that not actually the case?

It does with SetEvalDisabled but not for SetLocalEvalDisabled.

You may want to add:

Track->SetLocalRowEvalDisabled(bLocalEvalDisabled, TrackRowIndex);as well. But again, this isn’t really a method we sanction now, and so I would continue to recommend the above.

Dustin

Sorry for the delay, thanks for your answers !

Unfortunately, I tried adding SetLocalRowEvalDisabled on index 0 (by default, not sure how to know which index I should set) but’s too much effective… now I cannot unmute the tracks ^^’ and the eye icon doesn’t get white.

It seems too much of a hassle and I lack time, so we’ll do without then.

Thanks for your time !