Page MenuHome

UI: allow to hide markers region per editor
AcceptedPublic

Authored by Alessio Monti di Sopra (a.monti) on Jun 30 2019, 10:45 PM.

Details

Summary

Design task: T65607

The patch adds a new flag for each animation space, allowing to hide the markers region per editor, at the same time it removes the ability to show/hide the markers' lines, that are now always drawn. It also changes markers' UI and operators accordingly.

  • In anim_markers.c a new function substitutes ED_operator_animview_active in the operator polls, it also checks if the area is drawn in the editor in which the operator is called.
  • In the editor flags in the dna, SHOW_MARKER_LINES is renamed in SHOW_MARKERS
  • In rna_space.c a new property is set per animation space, called show_markers
  • The versioning part does seem to work but I'm really not sure if I did it right

UI changes:

  • Added a Show Markers entry in the View menu of the animation editors
  • If the markers region is not active then the Marker menu gets hidden
  • Driver editor: removed marker menu and don't allow to use marker operators.

Diff Detail

Event Timeline

Alessio Monti di Sopra (a.monti) created this object with edit policy "Administrators".

Great!

However, a few notes:

  • I don’t think Marker Lines should be disabled by default. They were enabled by default for a reason, because it’s important to see which frames correspond to the markers, now that the frame numbers are at the top.
  • IMO we don’t even need separate toggles for Markers and Marker Lines. I think we can simplify, and just include a simple Markers toggle that enables or disables both

I don’t think Marker Lines should be disabled by default. They were enabled by default for a reason, because it’s important to see which frames correspond to the markers, not that the frame numbers are at the top.

Ok, will change the defaults then.

About the option to show/hide the lines I personally though it was worth it to keep it, since they can result a bit distracting in some cases; If we keep it I also think that, for consistency, the option should be extended to camera markers, since now they are drawn with a distinct icon.

I tried to find an example of an actual production file which had some markers in it.
With and without lines, IMO it makes quite a difference in readability:


Alessio Monti di Sopra (a.monti) edited the summary of this revision. (Show Details)
  • Show marker lines by default for Timeline editors
  • Small fix to Nla UI
  • Simplify code to only use editor's flags

Seems fine with me I guess. I have a slight preference to a more simple solution, with a single checkbox to enable or disable markers, avoiding needing a sub-menu, but this is probably also acceptable.

@Jacques Lucke (JacquesLucke) ok with you? And should we hold this for 2.81?

Yes, this is for Blender 2.81. Will check the patch in more detail a little bit later.

... I have a slight preference to a more simple solution, with a single checkbox to enable or disable markers, avoiding needing a sub-menu, ...

I'm personally for the most customizable approach possible, but I have no problem changing it if you prefer so.
Maybe we could ask the Blender Institute animators, or in Devtalk, if disabling the lines is something they would miss or not.


About this thing:

  • Don't let to add camera markers as local ones (a new poll function added for this)

Am I correct that it doesn't make sense to bind local markers to camera?
And if so, what should we do with the Make markers local operator? I can see a couple of alternatives:

  • don't convert selected camera markers, prompting a warning in the status bar
  • convert them anyway but remove the binding and give them a generic name (this because camera markers name is NULL by default and they show the Object name instead)
Alessio Monti di Sopra (a.monti) edited the summary of this revision. (Show Details)
  • Removed any other functional change to the operators, will probably make a separate patch for those.
  • Fixed compilation on Linux.
  • Fixed errors in the Driver editor if opened from an existing Graph editor.
  • Updated versioning code for 2.81.
Alessio Monti di Sopra (a.monti) changed the edit policy from "Administrators" to "All Users".Aug 7 2019, 5:36 PM
  • Fixed conflict in versioning_280.c

I still think it’s simpler to just have a single toggle that enables both the marker region and the marker lines. It’s easier to enable or disable then and the UI becomes way simpler.

Alessio Monti di Sopra (a.monti) edited the summary of this revision. (Show Details)

Sorry for my disappearance this last month, @William Reynish (billreynish) I've made the changes you were asking for:

  • renamed SHOW_MARKER_LINES in SHOW_MARKERS in the dna editor's flags ( @Jacques Lucke (JacquesLucke) not sure if it would be better to add a new one at the end of the enumerators, I though it was ok to renamed them since all of them were already the last entry)
  • changed rna accordingly
  • made so that marker lines are always drawn
  • removed the python sub-menu from the editors interface, leaving only a "Show Markers" entry in the View menu

This seems to work well, is simple and straight forward.

This revision is now accepted and ready to land.Mon, Sep 23, 11:21 PM