Blender Git Loki

Git Commits -> Revision 079f415

Revision 079f415 by Campbell Barton (master)
May 14, 2021, 14:49 (GMT)
Cleanup: use enum types for screen direction variables

The term direction was used in 3 different ways in screen editing code,
making it hard to follow:

- 0-3 for as magic numbers mapped to [west,north,east,south].
- `h`, `v` characters for [horizontal,vertical] axes.
- Cycle direction SPACE_CONTEXT_CYCLE_PREV, SPACE_CONTEXT_CYCLE_NEXT

The following changes have been made:

- Add `eScreenDir` for [west,north,east,south], use variable name `dir`.
- Add `eScreenAxis` for [horizontal,vertical] values, use variable name
`dir_axis`.
- Add `eScreenCycle` for existing enum `SPACE_CONTEXT_CYCLE_{PREV/NEXT}`.
- Add macros `SCREEN_DIR_IS_VERTICAL(dir)`,
`SCREEN_DIR_IS_HORIZONTAL(dir)`.
Replacing `ELEM(dir, 1, 3)`, `ELEM(dir, 0, 2)`.
- Move `ED_screen_draw_join_highlight`, `ED_screen_draw_split_preview`
to `screen_intern.h`.

Reviewed By: Severin

Ref D11245

Commit Details:

Full Hash: 079f415debd85b44f9ceaca17edfb82517240448
Parent Commit: 265d975
Lines Changed: +208, -160

7 Modified Paths:

/source/blender/editors/include/ED_screen.h (+2, -4) (Diff)
/source/blender/editors/screen/area.c (+11, -10) (Diff)
/source/blender/editors/screen/screen_draw.c (+17, -15) (Diff)
/source/blender/editors/screen/screen_edit.c (+42, -38) (Diff)
/source/blender/editors/screen/screen_geometry.c (+16, -12) (Diff)
/source/blender/editors/screen/screen_intern.h (+32, -4) (Diff)
/source/blender/editors/screen/screen_ops.c (+88, -77) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021