Age | Commit message (Collapse) | Author |
|
- Replace SPACE_TYPE_LAST with SPACE_TYPE_NUM (adding 1).
- Rename RGN_TYPE_LEN to RGN_TYPE_NUM
This makes it possible to tag space-type/region-type combinations
with `bool tag[SPACE_TYPE_NUM][RGN_TYPE_NUM]` which reads more clearly
than `bool tag[SPACE_TYPE_LAST + 1][RGN_TYPE_LEN]`.
|
|
Since the XR area does not have any region geometry, hud updates from
operators would cause invalid access when updating region sizes.
|
|
|
|
Allow SCREEN_OT_area_swap to operate between different Blender
windows, and other minor feedback improvements.
See D14135 for more details and demonstrations.
Differential Revision: https://developer.blender.org/D14135
Reviewed by Campbell Barton
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
|
|
|
|
Ref T92709
|
|
Close all active buttons when hiding a region as this can be called
from Python a popover is open from that region.
Failure to do this causes the popover to read from the freed button.
Also rename UI_screen_free_active_but to
UI_screen_free_active_but_highlight since it only frees highlighted
buttons.
|
|
|
|
This corrects some alignments issues through new margins introduced in
93544b641bd6. Basic idea of this fix is to only add the new margins when
drawing a panel with background. These margins were added specifically
for the background boxes, so that makes sense.
Alternative fix to D13199.
This also fixes some margings added unintentionally in mentioned commit.
There is a little jump of the toolbar and the tabs in the Properties
when comparing the UI without this fix to 2.93:
{F12158085} {F12158039}
The jump is gone with this fix applied (compare to the 2.93 screenshot):
{F12158064}
While not a serious issue, this confirms that this fix actually tackles
the root of the issue.
|
|
Use a map to speed up search for UI block names.
Time to redraw the node editor was decreased from
around 75-120ms to 40-70ms in a tree with many
Geometry Nodes.
Differential Revision: https://developer.blender.org/D13225
|
|
|
|
Only regions with gizmos were checking for fallback tools.
|
|
|
|
|
|
Overlapped regions have transparent backgrounds, so when placing
AZONE_REGION we need to move them in to the content edge.
See D12956 for details and examples.
Differential Revision: https://developer.blender.org/D12956
Reviewed by Hans Goudey
|
|
Use arrays for wmEvent coordinates, this quiets warnings with GCC11.
- `x, y` -> `xy`.
- `prevx, prevy` -> `prev_xy`.
- `prevclickx, prevclicky` -> `prev_click_xy`.
There is still some cleanup such as using `copy_v2_v2_int()`,
this can be done separately.
Reviewed By: campbellbarton, Severin
Ref D12901
|
|
Currently, the background color of headers gets darkened when the editor is not active,
this makes it hard to theme, and adds contrast/noise when it's not needed.
This patch makes headers use the regular theme color when the editor is not active, so it
can be made to flush with the background more easily. And lightens the header (by +10,
same value as before) when the editor is active, providing the wanted highlight.
The motivations behind this change are:
* Simplify picking a theme color for headers.
* Widgets already become lighter on mouse hover, this change creates a connection with that concept.
Left: current master, inactive header is darkened.
Right: this patch, inactive header gets the theme color, active editor gets header in a slightly lighter color (like most widgets)
{F11052503, size=full, loop, autoplay}
Reviewed By: #user_interface, HooglyBoogly
Differential Revision: https://developer.blender.org/D12856
|
|
Back in Blender 2.30, the GUI project brought panels into Blender among other important visual updates.
For the first time it was possible to move the wall of buttons around. Providing a clear separation
between sections (it even allowed the grouping of panels in tabs!)
During the 2.5 redesign, the separation between panels became a line on top of each panel, and panels received
theme settings for background and header colors. The default theme used the same color for both.
In 2.8 the background color of panels was different from headers in the default theme, so the separator
line was removed. While the separator line wasn't elegant (only on top, non-themeable, hard-coded emboss effect),
it provided a sort of separation between panels.
This patch solves the panels-separation by simply adding a margin space around them (not visible in default theme yet).
Even though the margin reduces the width of the working area slightly, it makes room for the upcoming always-visible scrollbars.
Other adjustments:
* Use arrow icon instead of triangle to collapse/expand
* Use rounded corners to match the rest of the UI (editor corners, nodes, etc).
{F10953929, size=full}
Margin on panels makes use of the `style->panelouter` property that hasn't been
used in a while. Also slight tweaks to `boxspace` and `templatespace` style properties so they
are multiples of 2 and operations on them round better.
There is technically no need to update the themes for them to work, so no theme changes are included in this patch.
{F10953931, size=full}
{F10953933, size=full}
{F10953934, size=full}
{F10954003, size=full}
----
A new theme setting under Style controls the roundness of all panels (added it to Style instead of ThemeSpace because I think controlling the panel roundness per editor is a bit overkill):
{F11091561, size=full, autoplay, loop}
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D12814
|
|
- Use 2D cursor in the preview space using shortcuts
matching the UV editor and 3D view.
- Add Cursor tool, cursor transform.
- Support for cursor and bound-box pivot.
- Add pivot pie menu.
|
|
|
|
This adds an offscreen View3D window area for the VR view in order to
execute XR events/operators in the proper context. The area is created
as runtime data before XR events are dispatched and set as the active
area during XR event handling.
Since the area is runtime-only, it will not be saved in files and since
the area is offscreen, it will not interfere with regular window areas.
The area is removed with the rest of the XR runtime data on exit, file
read, or when stopping the VR session.
Note: This also adds internal types (EVT_DATA_XR, EVT_XR_ACTION) and
structs (wmXrActionData) for XR events.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D12472
|
|
Adds an easy way to add drop support for tree-view rows.
Most of the work is handled by the tree-view UI code. The tree items can
simply override a few functions (`can_drop()`, `on_drop()`,
`drop_tooltip()`) to implement their custom drop behavior.
While dragging over a tree-view item that can be dropped into/onto, the
item can show a custom and dynamic tooltip explaining what's gonna
happen on drop.
This isn't used yet, but will soon be for asset catalogs.
See documentation here:
https://wiki.blender.org/wiki/Source/Interface/Views#Further_Customizations
|
|
Swap the tool-header and header order so the tool-header
so the header is always next to the window edge.
Note that files saved in 3.0 will have overlapping headers when opened
in any version of Blender before this commit.
Reviewed By: Severin, fsiddi
Maniphest Tasks: T91536
Ref D12631
|
|
|
|
Expose a key-map preference "Fallback Tool (RMB)",
disabled by default.
The right mouse button uses the fallback tool
(currently visible selection tool in the toolbar),
instead of always tweaking.
When any selection tool is active, right mouse always tweaks.
To enable fallback selection on RMB, set the "Right Mouse Select Action"
to "Selection Tool".
Internal changes:
- Add fall-back key-maps, separate key-maps needed for when the tool is
run as a fall-back. This is needed so RMB-select can support fall-back
tools, so left-mouse can be used when it's the active tool and RMB
can be used as a fall-back action when another tool is active.
- Add options field to tools so tools without gizmos can enable the
full-back tool keymap.
- Support multiple key-maps for keymap handlers.
- Fall-back keymaps now co-exist with the tool-keymaps.
So both keymaps may be active at once - using different mouse buttons.
When gizmos are in use, a highlighted gizmo prioritizes the
tool-keymap over the fall-back keymap.
Resolves T83690.
Reviewed By: JulienKaspar
Ref D12493
|
|
This prevents both editor resize as well as regions (e.g., the toolbar).
Note: This option is not visible in the UI.
Differential Revision: D12516
|
|
The toggle that allow users to "show" the region (header, toolbar, ...)
when it is collapsed can now be configured for the apps.
Note: This option is not visibile in the UI.
Differential Revision: D12516
|
|
There will be other settings that lock other aspects of the
UI layout (e.g., resizing of editors). So better to name
this setting what it actually handles (the corners).
New name: USER_APP_LOCK_CORNER_SPLIT
Differential Revision: D12516
|
|
|
|
The asset view UI template is a mini-version of the Asset Browser that
can be placed in regular layouts, regions or popups. At this point it's
made specifically for placement in vertical layouts, it can be made more
flexible in the future.
Generally the way this is implemented will likely change a lot still as
the asset system evolves.
The Pose Library add-on will use the asset view to display pose
libraries in the 3D View sidebar.
References:
* https://developer.blender.org/T86139
* https://code.blender.org/2021/06/asset-browser-project-update/#what-are-we-building
* https://code.blender.org/2021/05/pose-library-v2-0/#use-from-3d-viewport
Notes:
* Important limitation: Due to the early & WIP implementation of the
asset list, all asset views showing the same library will show the
same assets. That is despite the ID type filter option the template
provides. The first asset view created will determine what's visible.
Of course this should be made to work eventually.
* The template supports passing an activate and a drag operator name.
The former is called when an asset is clicked on (e.g. to apply the
asset) the latter when dragging (e.g. to .blend a pose asset). If no
drag operator is set, regular asset drag & drop will be executed.
* The template returns the properties for both operators (see example
below).
* The argument list for using the template is quite long, but we can't
avoid that currently. The UI list design requires that we pass a
number of RNA or custom properties to work with, that for the Pose
Libraries should be registered at the Pose Library add-on level, not
in core Blender.
* Idea is that Python scripts or add-ons that want to use the asset view
can register custom properties, to hold data like the list of assets,
and the active asset index. Maybe that will change in future and we
can manage these internally.
As an example, the pose library add-on uses it like this:
```
activate_op_props, drag_op_props = layout.template_asset_view(
"pose_assets",
workspace,
"active_asset_library",
wm,
"pose_assets",
workspace,
"active_pose_asset_index",
filter_id_types={"filter_action"},
activate_operator="poselib.apply_pose_asset",
drag_operator="poselib.blend_pose_asset",
)
drag_op_props.release_confirm = True
drag_op_props.flipped = wm.poselib_flipped
activate_op_props.flipped = wm.poselib_flipped
```
|
|
If a text button is activated that is not in view (i.e. scrolled away),
the scrolling will now be adjusted to have it in view (with some
small additional margin). While entering text, the view may also be
updated should the button move out of view, for whatever reason. For the
most part, this feature shouldn't be needed and won't kick in, except
when a clicked on text button is partially out of view or very close to
the region edge. It's however quite important for the previously
committed feature, that is, pressing Ctrl+F to start searching in a UI
list. The end of the list where the scroll button appears may not be in
view. Plus while filtering the number of visible items changes so the
scrolling has to be updated to keep the search button visible.
Note that I disabled the auto-scrolling for when the text button spawned
an additional popup, like for search-box buttons. That is because
current code assumes the button to have a fixed position while the popup
is open. There is no code to update the popup position together with the
button/scrolling.
I also think that the logic added here could be used in more places,
e.g. for the "ensure file in view" logic the File Browser does.
|
|
This shows the text as part of the assertion message.
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
This patch fixes many minor spelling mistakes, all in comments or
console output. Mostly contractions like can't, won't, don't, its/it's,
etc.
Differential Revision: https://developer.blender.org/D11663
Reviewed by Harley Acheson
|
|
Includes fixes to misspelled function names.
Ref D11280
|
|
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
|
|
Move some drawing code from `area.c` and `ed_util.c` into `ed_draw.c`.
This is to support the new generic slider that wil be used in T81785.
No functional changes.
Reviewed By: #animation_rigging, #user_interface, Severin, sybren
Maniphest Tasks: T81785
Differential Revision: https://developer.blender.org/D9313
|
|
Passing 4x arguments for the rectangle,
mixed in with round-box radius & color wasn't very readable.
Instead, pass a `rctf` as the first argument to UI box drawing functions.
|
|
|
|
These functions with many arguments can be unwieldy. Aside from the obvious issues
with rewriting the list of arguments and the opportunities for error and frustration
that presents, the long list of arguments make these systems hard to change. So when
an argument should be added, someone might skip that and add some hack instead.
So, as proposed in T73586#1037210, this patch instead uses a "params" struct for
each of these callbacks.
- Use param argument for `ARegionType.listener`
- Remove unused window field in region listener
- Use param argument for `SpaceType.listener`
- Use params struct for `ARegionType.message_subscribe`
Differential Revision: https://developer.blender.org/D9750
|
|
As proposed in T74432 and already implemented in several commits,
"region" is the preferred name for `ARegion` variables, rather than
any variant of "ar". This commit changes a few "ar" variables that have
popped up over time and also adjusted names of variants like "arnew".
|
|
|
|
After recent changes to the context panel layout (rB187cc5e26d28b1a8),
there has been an error printed when running propery search:
> Error: separator_spacer() not supported in popups.
The layout code thinks it's drawing in a menu because region->visible
isn't properly set for the other tab searches. This patch sets that field
for the temporary searching region, but it also disables searching in the
context breadcrumbs panel, because at best this will just give results
for the names of the active object, etc. This isn't helpful since
those labels are mostly in every tab anyway.
Differential Revision: https://developer.blender.org/D9425
|
|
Differential Revision: https://developer.blender.org/D8660
This patch is the result of the GSoC 2020 "Editing Grease Pencil Strokes
Using Curves" project. It adds a submode to greasepencil edit mode that
allows for the transformation of greasepencil strokes using bezier
curves. More information about the project can be found
here: https://wiki.blender.org/wiki/User:Filedescriptor/GSoC_2020.
|
|
The overlap with the `Panel` flags that start with "PNL" was quite
confusing because wasn't clear which enum a flag was from. The
new names are a bit longer, but the clarity is worth it.
|