Page MenuHome

Range filter for spreadsheet editor
AbandonedPublic

Authored by Eitan Traurig (EitanSomething) on Jul 20 2021, 11:25 PM.

Details

Summary

Range filters for spreadsheet editor

Filters the rows to all numbers between and including the Minimum and Maximum values.

Diff Detail

Repository
rB Blender
Branch
RowFilter (branched from master)
Build Status
Buildable 16000
Build 16000: arc lint + arc unit

Event Timeline

Eitan Traurig (EitanSomething) requested review of this revision.Jul 20 2021, 11:25 PM
Eitan Traurig (EitanSomething) created this revision.
Eitan Traurig (EitanSomething) retitled this revision from Range filters for spreadsheet editor TODO: -Add better default. Default set the Minimum and Maximum to the Minimum and Maximum of the column. to WIIP: Range filters for spreadsheet editor.Jul 20 2021, 11:27 PM
Eitan Traurig (EitanSomething) edited the summary of this revision. (Show Details)
Eitan Traurig (EitanSomething) retitled this revision from WIIP: Range filters for spreadsheet editor to WIP: Range filters for spreadsheet editor.
Eitan Traurig (EitanSomething) edited the summary of this revision. (Show Details)
Eitan Traurig (EitanSomething) retitled this revision from WIP: Range filters for spreadsheet editor to WIP: Range filter for spreadsheet editor.Jul 21 2021, 2:24 AM

While still having WIP in the title better to also keep as "Changes Planned"

Plenty of problems:

  • For integers it is changing both min and max together.
  • The header itself never updates
  • It doesn't include both Min and Max values in the header
  • (would be nice to make sure min is always less than max)

Not unique to this, but when using vectors I think we should NOT even bother showing the value in the header:

  • Hide value in header
  • Fix integers changing both min and max together.
source/blender/makesrna/intern/rna_space.c
7543

Change to max_int

Eitan Traurig (EitanSomething) retitled this revision from WIP: Range filter for spreadsheet editor to Range filter for spreadsheet editor.

Much better, thanks.

  1. See how we do frame_start and frame_end, for range I think it makes sense to have one pushing the other.
  2. You remove the range from the header altogether, was this intentional? My remark was mostly about vectors.
  1. You remove the range from the header altogether, was this intentional? My remark was mostly about vectors.

I removed it because the code is not built to show two values. This is how it should look (1.0,1.0,1.0) >= position >= (-1.0,-1.0,-1.0) . It also won’t be totally visible most if not all of the time

  • Make sure max never goes below min
Hans Goudey (HooglyBoogly) requested changes to this revision.Aug 9 2021, 6:53 AM
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc
103

This seems like something that should be done in RNA, not here. Either that or right below, with std::min and std::max.
Best not to remove const unless you really need to

153–157

Same here

206–213

And here

267–277

And here

400

And don't remove const here

source/blender/makesdna/DNA_space_types.h
1895–1902

With all of these types, the row filters are starting to get quite large. Maybe full-on polymorphism is a bit much, but a union could work. It's all a bit unfortunate honestly, maybe there is a better way to handle this.

This revision now requires changes to proceed.Aug 9 2021, 6:53 AM

Abandoning revision because I don’t have time to work on it.