Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable/Disable Clips #74

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

rjwignar
Copy link

@rjwignar rjwignar commented Sep 28, 2024

This fixes #19

Following @jminor's suggestion in #27 (comment), I've been able to use an ImGui::Checkbox() while keeping Item::_enabled private.

Clips will be greyed out when disabled. Re-enabling clips will return them to their original color.
Tracks can be enabled/disabled, but this PR does not include UI changes to distinguish enabled from disabled Tracks.

Summary of changes

timeline.cpp:

  • In DrawItem(), added conditional greying out on disabled clips
  • Disabled non-Gap items have a grey fill_color
    • Obtained by by using UIColorFromName("") to get IM_COL32(0x88, 0x88, 0x88, 0xff)

inspector.cpp:

  • Added an "Enabled" checkbox for non-Gap items (Tracks and Clips) using ImGui::Checkbox():

trackInspectorMenu

Below is a quick demo of enabling/disabling clips
enabledDemo

Strech Goal (Greying of entire tracks):

I'm holding off on this stretch goal as I'm not entirely clear on the desired behaviour, such as whether to grey out the just Track header or the Track header plus every clip the Track contains. I'd be willing to work on this in a follow-up Issue, if it's alright with the team.

Thank you for your patience with this feature and for considering these changes.

Copy link

CLA Not Signed

@rjwignar rjwignar mentioned this pull request Sep 28, 2024
@rjwignar rjwignar marked this pull request as ready for review September 28, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable/disable clips
1 participant