Page MenuHome

Implement generic slider in graph_slider_ops
ClosedPublic

Authored by Christoph Lendenfeld (ChrisLend) on Oct 27 2020, 5:53 PM.

Details

Summary

This patch implements the generic slider created in ed_draw.c (D9314) in graph_slider_ops.c for the GRAPH_OT_decimate operator.
Activate the operator with the "Decimate (Ratio)" button in th "Key" menu.

This means:

  • Hand over percentage calculation to tSlider
  • change the way the status message is created and draw it in the workspace footer


(Colors subject to change with D11878)

Diff Detail

Repository
rB Blender

Event Timeline

  • Update patch to use D9314
  • Move drawing of the status string into the workspace footer
Christoph Lendenfeld (ChrisLend) edited the summary of this revision. (Show Details)

Update to latest master

*update to latest master adding ED_slider_init

Sybren A. Stüvel (sybren) requested changes to this revision.EditedAug 5 2021, 10:18 AM

The patch description will be (a big inspiration for) the commit message (at least the part above any hypothetical -----), and it needs at least info about which operator(s) has/have been sliderified. For tracability, you may also want to reference the "generic slider" commit. That's mostly for future archeologists, though.

With the default theming, the black "current position" indicator is hardly visible:

Update: never mind, that's resolved in D11878: Generic Pose slider Color Change.

So apart from the description, it's good to go!

source/blender/editors/space_graph/graph_slider_ops.c
233–234

Nice API. I like this so much more than ED_slider_init(dgo->slider, event, false);.

305

This should be const; it's a non-functional change, so this would be a prime target for a cleanup patch if you feel like it.

This revision now requires changes to proceed.Aug 5 2021, 10:18 AM
Christoph Lendenfeld (ChrisLend) edited the summary of this revision. (Show Details)
Christoph Lendenfeld (ChrisLend) edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Sep 7 2021, 2:53 PM