Age | Commit message (Collapse) | Author |
|
It's totally valid for the grid levels to be zero.
|
|
This seems wrong and was especially noticeable since transform snapping
does account for it (which was reported in T92494).
Now divide the `DotGridLevelInfo` `step_factor` by the default of 20 for
`U.widget_unit` and scale it later by the actual interface scale.
note: when zooming, this will still always snap to the smallest dot
level (not sure, with a bit more work it could be possible to only snap
to the lowest visible level after fading?)
Maniphest Tasks: T92494
Differential Revision: https://developer.blender.org/D13002
|
|
|
|
This patch makes the background grid of the node editor a grid of dots
instead of lines. This makes the background look a bit more subtle and
reduces visual complexity. The dots are meant to provide a reference
when panning and zooming. Based on the design of @pablovazquez, and
a patch originally authored by @fabian_schempp.
The "Grid Levels" controls how many levels of dots are drawn. As the
editor zooms in, the higher levels of dots fade in, making them closer
together visually. The zoom factor at which each grid starts and ends
fading in is controllable in the code, and could be tweaked further
in the future. The new default value is 7, out of a range from 0 to 9.
Differential Revision: https://developer.blender.org/D10345
|
|
This change simplifies the parameter list for these functions
and reduces the chance of typos mixing up array indices.
Reviewed By: campbellbarton
Ref D12950
|
|
This was reported for the Outliner.
It was possible to set 'show_locked_time' on any space (via python, not
sure if there are other ways to achieve this).
Navigating in an animation editor obviously ruined the layout in certain
Editors that are not made for this.
Now restrict syncing to editors that support it well (the ones that have
this setting exposed in their menus) and prevent setting this in RNA.
Maniphest Tasks: T91237
Differential Revision: https://developer.blender.org/D12512
|
|
Add overlay option to disable grid drawing.
Reuse drawing code from other editors (timeline editor)
Add argument `display_minor_lines` to function
`UI_view2d_draw_lines_x__discrete_frames_or_seconds`
This way minor line drawing can be disabled and so it doesn't cause
too much visual noise. Also spacing seems to be too fine, so VSE uses 3x
what is defined in preferences.
Reviewed By: fsiddi, Severin
Differential Revision: https://developer.blender.org/D11790
|
|
While doxygen supports both, conform to our style guide.
Note that single back-tick's are already used in a majority of comments.
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
|
|
Also includes some various other minor cleanups, like using bool
instead of int in a couple places.
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
It looks like this code was left over from tabbed panels in the
properties editor. It wasn't used anywhere except for in one line of
the horizontally-aligned panel code that was recently removed.
Differential Revision: https://developer.blender.org/D8651
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
This commit makes grid theming more consistent and capable by adding
some new theme colors related to grid rendering.
- Add grid theme color for node editor. `UI_view2d_multi_grid_draw`
is called with TH_GRID instead of a shaded `TH_BACK`.
Also color-blend `TH_NODE_GROUP`.
- Make the movie clip editor's clip preview grid respect grid theme
color (`ED_region_grid_draw` uses color-blended `TH_GRID`).
- Add versioning code to allow fixing existing themes (the resulting
themes should visually look the same as before)
These changes did cause some inconsistencies in the movie clip editor,
even after adjusting the themes accordingly:
1. The alpha slider of the grid color affects the background and not
the grid lines themselves.
2. The grids used by graph and dopesheet mode could already be themed
in the past. Now that the clip preview's grid can also be themed,
two different modes share the same theme color.
Differential Revision: https://developer.blender.org/D8699
|
|
|
|
I only skipped a few loops in the monstrous ui_handle_menu_event
function. Also, I only changed variable names where necessary to
prevent redeclarations.
Differential Revision: https://developer.blender.org/D8586
|
|
Allows to hook per-space code which is to be run on view navigation.
This is required to have zoom-to-fit implemented in the sequencer.
There might be more cases where the clalback is to be called from,
but it could be easier to address those on the case-by-case basis
when its needed.
|
|
Currently there are no functional changes, preparing code to add more
functionality which is to be run from navigation/zoom operators.
|
|
|
|
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/interface` module.
No functional changes.
|
|
|
|
Regression in 2fdca5bd1981c
|
|
View2DScrollers used the memory manager to allocate memory. This isn't a
problem but in a upcoming change the scrollers will be drawn more often
than it used to (See {D8066}). To limit the number of allocations and
frees this patch will use the stack for allocation.
Reviewed By: Campbell Barton
Differential Revision: https://developer.blender.org/D8076
|
|
|
|
|
|
Although we still dynamically hide scrollbars, they don't change the
region size anymore. They are simply drawn on top of the region content.
Because of this, some hacks introduced by fa28e50ac2a7 are no longer
necessary.
Without these hacks, the scrollbar visibility is evaluated much more
often (cheap operation) which should be more reliable and possibly solve
some glitches.
Also replaces integers passed as booleans.
Fixes T75782.
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
These headers are not needed right away, but will be in the upcoming
commit.
|
|
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
|
|
Also rename START to BEGIN (matching BEGIN/END for most iterator macros).
|
|
Differential Revision: https://developer.blender.org/D7212
|
|
|
|
Avoids casts when used with other UI code
where the color is often unsigned.
|
|
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
|
|
This reverts commit a21f5ec56245f7f1fbede4aa3c140a582c3a6a1b.
|
|
Two main reasons for the lag:
- Allocation of memory with transfer to GPU.
- BLF_cache_clear();
The memory allocation seems to be unnecessary, so I removed it.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6837
|
|
|
|
- Replace 'unsigned' used on it's own with 'uint'.
- Replace 'unsigned const char' with 'const uchar'.
|
|
Fixes the invisible scrollbar when opening preferences by 'Editor Type' by always creating scrollbars for V2D_COMMONVIEW_PANELS_UI objects.
This removes a fix (T47047) for dpi issues when dragging out the toolbox. The new toolbox in 2.8 does not seem to have the same DPI issues.
Exact steps for others to reproduce scrollbar invisible (T69413):
change the 3d viewport to preferences and go to addons. The scrollbar will not be visible
To verify there are no DPI issues:
Apply the patch and open blender. Hide the toolbar. Split the 3d view port into 4 windows, such that one is very small horizontally, another is very small vertically, and a third is small in both directions. Drag out the toolbar arrow on all four viewports. The Toolbar will be the same size in each. For further verification, adjust the scaling and repeat.
{F7805968}
Also this is my first time submitting a patch. Some instruction is welcome!
Reviewed By: #user_interface, Severin
Maniphest Tasks: T69413
Differential Revision: https://developer.blender.org/D6050
|
|
Previously the decimation would take the whole curve into account when
decimating and not just the selected part.
This also contains various smaller bug fixes for the fcurve decimation.
Reviewed By: Sybren
Differential Revision: http://developer.blender.org/D6286
|
|
|
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
|