Age | Commit message (Collapse) | Author |
|
|
|
MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D12962
|
|
Outliner would frame the armature object instead of the bone if the bone
was on a hidden armature layer.
Similar to issues reported in e.g. T58068 and T80464, this is due to the
fact that `BKE_pose_channel_active` always checks for the armature layer
(and returns NULL if a bone is not on a visible armature layer).
Now propose to make this layer check **optional** (and e.g. from the
Outliner be more permissive). This also introduces
`BKE_pose_channel_active_if_layer_visible` which just wraps
`BKE_pose_channel_active` with the check being ON.
Maniphest Tasks: T92930
Differential Revision: https://developer.blender.org/D13154
|
|
In almost all cases there is no difference between `G.relbase_valid`
and checking `G.main->filepath` isn't an empty string.
In many places a non-empty string is already being used instead of
`G.relbase_valid`.
The only situation where this was needed was when saving from
`wm_file_write` where they temporarily became out of sync.
This has been replaced by adding a new member to `BlendFileWriteParams`
to account for saving an unsaved file for the first time.
Reviewed By: brecht
Ref D13564
|
|
Also add groups in some files.
|
|
Also move notes about where noise functions come from
into the function body as it's not relavant to the public doc-string.
|
|
Use "filepath" which is the current convention for naming full paths.
- Main use "name" which isn't obviously a file path.
- BlendFileData & FileGlobal used "filename" which is often
used for the name component of a path (without the directory).
|
|
Some doc-strings were skipped because of blank-lines between
the doc-string and the symbol and needed to be moved manually.
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
Ref T92709
|
|
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.
|
|
|
|
Unfortunately the drop logic for file-path based drag & drop checks the
used icon for its logic. This is very bad and should be changed. But
doing this involves some changes that are better not done during bcon4,
so for now stick to it and update the icon check.
Reviewed by: Julian Eisel
Differential Revision: https://developer.blender.org/D13383?id=45314
|
|
|
|
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.
|
|
Add a new 'selected_visible_actions' property to allow querying
actions that are selected in animation related editors for use in
UI and operators. The 'selected_editable_actions' variant excludes
linked actions (the only reason an action can be read-only).
In the Action and Shape Key editors there is only one action
that is specified by the field at the top of the editor.
In Dope Sheet it scans the channel rows and returns all actions
related to the selected items. This includes summary items for
actions and groups.
In Graph Editor, it lists actions associated with selected curves.
The new property is also used for Copy To Selected and Alt-Click.
Ref D11803
|
|
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
|
|
|
|
Adds a `wmOperatorCallContext` typedef for the existing `WM_OP_XXX`
operator context enum. This adds type safety, allows the compiler to
produce better warnings and helps understanding what a variable is for.
Differential Revision: https://developer.blender.org/D13113
Reviewed by: Campbell Barton
|
|
Issue was that the context used for dropbox handling and polling didn't
match the one used for drawing the dropbox and generating the tooltip
text (which would determine the material slot under the cursor,
requiring context). The mismatch would happen with overlapping regions.
Actually, this patch includes two fixes, each fixing the crash itself:
* Store the context from handling & polling and restore it for drawing.
* Correct the hovered region lookup for drawing to account for overlayed
regions.
Note that to properly set up context for drawing, we should also account
for the operator context, which isn't done here, see
https://developer.blender.org/T92501#1247581.
|
|
Also fix several wrong usages of `IFACE_` (as a reminder, error/info
messages should use `TIP_`, not `IFACE_`).
|
|
Only regions with gizmos were checking for fallback tools.
|
|
Replace local static mouse coordinate storage with a single function.
also resolve inconsistencies.
- Edit-mesh selection used equality check (ignoring `U.move_threshold`).
- Motion to clear tooltips checked the value without scaling by the DPI.
Also prevent the unlikely case of the previous motion check matching
a different area by resetting the value when the active region changes.
|
|
We already show a message when showing an asset library whose path can't be
found on disk. The red text was making it look like some fatal error happened.
And the message could be a bit more useful generally.
So this removes the red color of the text, (arguably) improves the text and
adds a button as shortcut to open the Preferences with the asset library
settings.
Differential Revision: https://developer.blender.org/D12894
|
|
Renames the operator from "Show Preferences" to "Open Preferences...". "Open"
is more clear than "Show" (since they could be shown in-place). "..." is
usually used in Blender to indicate that a new Window or popup will be opened.
Note that vanilla Blender doesn't actually show this name anywhere, so this
change shouldn't be visible. That may change, see D12894.
|
|
When dragging an object in non-object mode into a 3D View, there will now be
red text explaining that this is only possible in object mode.
The previous commit enabled this.
|
|
|
|
|
|
ScrArea.runtime.tool needs to be updated after switching scenes.
|
|
Also add operator error report.
|
|
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
|
|
This change simplifies the parameter list for these functions
and reduces the chance of typos mixing up array indices.
Missed in rB69102786047dccdcbaee0df6307a8c3364d28fe0.
|
|
Improve readability using underscores for separators, e.g.
prev_click_time instead of prevclicktime.
|
|
This change simplifies the parameter list for these functions
and reduces the chance of typos mixing up array indices.
Reviewed By: campbellbarton
Ref D12950
|
|
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
|
|
This patch adds a "selected_movieclip_tracks" context member and enables
editing properties of multiple selected tracks via the usual Alt-click
editing (as well as the "Copy To Selected" operator). Both use
UI_context_copy_to_selected_list() to gather a list of other selected
items [which are now taken via said new context member]. Strictly
speaking, this could be done without the context member as well [just
gathering other selected tracks in UI_context_copy_to_selected_list()
without relying on a context member], but this might come in handy in
other places (e.g. Addons).
note: some could be desired for markers (e.g. editing pattern/search
areas of all selected track markers, but since this is burried in a
uiTemplate, this is a bit more work for another patch).
Differential Revision: https://developer.blender.org/D12923
|
|
|
|
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
|
|
Match eSpace_Type.
|
|
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
|
|
This patch increases the size of the Area BORDERPADDING a bit to make
it easier to hit the edges when initiating area resizing.
See D11925 for details and examples.
Differential Revision: https://developer.blender.org/D11925
Reviewed by Campbell Barton
|
|
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
|
|
The `ui_list` lookup from 87c1c8112fa44ccb94a3e996b7499d6577d85d7f
didn't account for the region being unset.
|
|
|