Page MenuHome

Theming Time Markers
ClosedPublic

Authored by Michael Soluyanov (crantisz) on Feb 18 2020, 1:20 PM.
Tokens
"Like" token, awarded by amonpaike."Love" token, awarded by 1D_Inc."Love" token, awarded by HooglyBoogly."Love" token, awarded by billreynish.

Details

Summary

This patch adds ability to set colors and alpha of dashed line of Time Markers.

Before:


(Marker lines invisible on white background)

After:


(An example of theming)

UI:

Diff Detail

Repository
rB Blender

Event Timeline

Michael Soluyanov (crantisz) edited the summary of this revision. (Show Details)

Correct default values matches current

Julian Eisel (Severin) requested changes to this revision.Feb 18 2020, 2:48 PM

Guess this is fine. Am almost ready to accept this.

source/blender/editors/animation/anim_markers.c
511

I'd suggest a few changes here:

  • Don't add this new function, re-use marker_color_get() but change it's argument list: static void marker_colors_get(const TimeMarker *marker, uchar *r_text_color, uchar *r_line_color).
  • I'd call this function here to retrieve both colors, and pass them to draw_marker_line() and draw_marker_name().
  • In draw_marker_line() you can change the immUniformColor4fv() to immUniformColor4ubv() so that it accepts the uchar array.
This revision now requires changes to proceed.Feb 18 2020, 2:48 PM

Don't add this new function, re-use marker_color_get()

This one gets different colors, TH_TEXT_HI and TH_TEXT instead new one

Yes, but the function could return two colors, uchar *r_text_color and uchar *r_line_color.

This revision now requires review to proceed.Feb 18 2020, 4:05 PM
Julian Eisel (Severin) requested changes to this revision.Feb 18 2020, 4:05 PM
This revision now requires changes to proceed.Feb 18 2020, 4:05 PM
This revision is now accepted and ready to land.Feb 25 2020, 3:10 PM