Age | Commit message (Collapse) | Author |
|
Scale widths of popovers and dialogs with Text Style font point changes.
Differential Revision: https://developer.blender.org/D9132
Reviewed by Hans Goudey
|
|
This patch implements panel expansion saving and resetting for property
search. While search is active, the panel expansion is based on whether
or not it has a search result. When the search finishes, the panel
expansion returns to its state before the search started. However, any
panels interacted with during the search won't reset their expansion.
This requires adding a new runtime flag for panels to store whether to
use search result status as expansion. It also requires better handling
for animation when panel expansion changes with another new runtime flag.
`UI_panel_is_closed` gets the search-dependent expansion, but it is
intentionally not used to access expansion in every case-- sometimes it's
necessary to use `PNL_CLOSED` directly.
Differential Revision: https://developer.blender.org/D8984
|
|
Reviewed By: Sybren, Luciano Muñoz Sessarego
Differential Revision: https://developer.blender.org/D7783
|
|
With all the work on DNA defaults for 2.91, it's nice to expose this
convenient operator. This was already hardcoded in the UI code to the
backspace key, adding it to the keymap instead will make the shortcut
automatically show in the button right click menu.
Differential Revision: https://developer.blender.org/D9219
|
|
This makes the icon equals to the invert icon used in all modifiers.
{F8986444}
Reviewed By: #user_interface, Severin, Blendify
Differential Revision: https://developer.blender.org/D9194
3bb3b2
|
|
Case where RNA is not able to generate a proper path for a property was
not taken into account properly.
|
|
This patch enables property search for all tabs in the property editor.
To make interaction faster, if the editor's current tab doesn't have a
result, the current tab changes to the next tab that has a match.
This patch implements basic code that only searches panels.
While we could run the existing "single tab" property search for every
tab, that would also do everything else related to the layout pass,
which would be less efficient, and maybe more complicated to maintain.
The search match status for every current tab of the property editor is
stored in a runtime bitfield and them displayed later by dimming icons
in the tab selector panel to the left. Using `BLI_bitmap` properly in
the runtime struct required moving it to `buttons_intern.h` and
adding a small API to access the search filter instead.
To make sure the editor isn't influenced by anything that happens while
building the layout for other tabs, most of the context is duplicated
and the new search is run in the duplicated editor.
Note that the tool settings tab works slightly different than the other
tabs, so I've disabled searching it for this commit. That would be a
relatively simple improvement, but would just require a bit of
refactoring of existing code.
Differential Revision: https://developer.blender.org/D8859
|
|
This adds arguments to `uiLayout.prop_tabs_enum` and the C equivalent
(`uiItemTabsEnumR_prop`) to gray out tabs based on a boolean array.
For property search in multiple tabs, we need a way to show which tabs
have a search result, but we still need to show which tab is active.
Differential Revision: https://developer.blender.org/D8858
|
|
Changing the color of monochrome alert icons would not change until the theme was reloaded.
Differential Revision: https://developer.blender.org/D9062
Reviewed by Harley Acheson
|
|
Change to monochrome version of the large alert icons and use 'Question' for the the Quit Confirm dialog box.
Differential Revision: https://developer.blender.org/D9062
Reviewed by Pablo Vazquez
|
|
Default text output routines (which do not specify a size) will now use Text Style point size.
Differential Revision: https://developer.blender.org/D9107
Reviewed by Brecht Van Lommel
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Minor change missing from 9bfea67751dc59554c8928802b4e1f04278ab537
Ref D8530
|
|
Due to the old AA method, it was necessary to add transparency to the
outline of the popover arrow to match the box outline opacity. This is
no longer required after rB15dda0115c78.
See the differential for before and after screenshots.
Differential Revision: https://developer.blender.org/D9026
|
|
Changes Workspace tabs so that the text size and tab width are both set by style.widget.points.
Differential Revision: https://developer.blender.org/D9108
Reviewed by Julian Eisel
|
|
The panel category tabs (In the 3D view N-panel) did not look great
when zoomed in or with high DPI screens, with multiple overlapping
outlines, and roundness that didn't match elsewhere in Blender. In
addition, there was some unecessarily low-level drawing code in the
panel code.
This commit uses an existing function `UI_draw_roundbox_4fv`to draw
the tabs instead. There are some slight visual differences, though
these are easily adjusted with theme colors.
Differential Revision: https://developer.blender.org/D9045
|
|
In the graph editor there is a panel that says "Active Keyframe" for
numerically editing a keyframe's values, but in the code there is no
concept of the "active keyframe." Since this is a useful concept to
have for some other features anyway, this commit adds an active
keyframe index value to FCurves. It also displays it with a theme
color for the active vertex (which didn't exist before) if the
FCurve is active.
The active keyframe in the graph editor is treated similarly to the
active vertex in the 3D view. It is the keyframe most recently selected
with a single click, and it is always selected.
For now, the only real functional change is that the active keyframe
appears in white and it should be more predictable which keyframe is
being edited in the sidebar panel.
Differential Revision: https://developer.blender.org/D7737
|
|
The buttons hide when the search finishes based on whether they are in
the "panel header" group. These buttons were not protected with a new
group. This adds a new group for operator button calls, and also makes
it so a new group is always created after the header buttons.
|
|
Declaring variables where they are initialized and used makes their
scope much more explicit and it aids readility since types are visible.
This commit doesn't touch the ID template code since there is an
active patch in that area.
|
|
Same as 21fc4ae20692, but for view panning this time. Also had to set the poll
callbacks still in this case.
|
|
The change to the `poll()` callback was actually incorrect. But also
reduandant, since the function is actually already executed in the operator.
|
|
Actually, fixes compile error and an incorrect poll.
Caused by 21fc4ae20692 and 3a1cf838ca09.
The poll has to perfrom the `view_zoom_poll()` logic to ensure correct context.
|
|
|
|
Uncovered by a4aa94c41cb7. Before that, it would actually be a possible `NULL`
pointer dereference.
It would happen if a `UILayout.prop()` was placed with the `full_event` option
set to `True` (or the C equivalent) for a non keymap-item property.
Now this the `full_event` option is ignored then with a warning print.
|
|
Multiple related issues:
* `view_zoomdrag_exec()` required `view_zoomdrag_init()` to be called first to
set up data. Can now easily be done in the `_exec()` function as well though.
* Because of that the operators could not be called in an `EXEC_` context (e.g.
`EXEC_REGION_WIN`).
* With "Zoom to Mouse Position" enabled, zooming from a menu or script would
zoom to the mouse position. That should only happen if the operators are
called directly in the editor.
|
|
The poll would already be executed as operator callback, this check was
redundant. Also see previous commit.
|
|
`view_zoomdrag_init()` would perform a number of sanity checks that
`view_zoom_poll()` already executed. The design of operators forsees that
(non-expensive) context sanity checks are done by the `poll()` callbacks, and
the execution callbacks can then just assume that happened. No reason to be
overly pedantic, we don't do that elsewhere either.
Note that this code is from the earliest days of an operator design. So it's
not surprising that it wasn't using the design "properly".
|
|
This commit makes the panel expansion set based on the search results
when the active tab in the properties editor changes. The multi-tab
search patch (D8859) actually doesn't handle this because it uses a
different code path.
This feature uncovered a subtle but fairly significant issue with the
implementation of property search (More details in T81113). Basically,
the search needed multiple redraws to properly display the expansion of
panels based on the search results. Because there is no animation of
panel expansion when switching tabs, the problem was exposed only now.
With this commit, hiding of "search only" buttons and panel size
calculation happens in a single final step of the panel layout pass.
The "search only" layout root flag is removed. Instead every button
inside a panel header is in a single "uiButtonGroup" marked with a
specific "in header" flag, an idea which could be generalized in the
future.
Differential Revision: https://developer.blender.org/D9006
|
|
We have our own assert implementation, `BLI_assert()` that is prefered over the
C standard library one. Its output is more consistent across compilers and
makes termination on assert failure optional (through `WITH_ASSERT_ABORT`).
In many places we'd include the C library header without ever accessing it.
|
|
The region types checked here were removed from the editors in 9e2abbc9ba5d and
eb7485389b8a. So the if-conditions would never be true.
|
|
Missed moving the defines in CMake for e255040c7797
causing cycles not to be enabled.
|
|
An error adding search to an existing button,
caused by my own error in rBa4aa94c41cb79e9.
|
|
This makes it unecessary to create a button group when the block
is created, giving more flexibility when creating the first group-- for
example, creating the first button group with special parameters.
|
|
For a future patch (D9006) we need these groups for longer than just the
the layout process, in order to differentiate buttons in panel headers.
It may also be helpful in the future to have a way to access related
buttons added in the same uiLayout.prop call. With this commit, the
groups are stored in and destructed with the uiBlock.
|
|
Now versioning UserDef is run in readfile.c,
as is done for other Blender data.
Previously versioning was mixed with other run-time initialization,
so it needed to be called later by the window manager.
|
|
This replaces the blue theme color for subpanel titles with the the same
fade as for parent panels.
The search color doesn't work well for subpanel title colors. And actually,
because there are often buttons with checkboxes in the panel headers, we
don't have to treat this indicator any differently than regular buttons.
Differential Revision: https://developer.blender.org/D8976
|
|
Currently there's no way to know if a button is inactive when it doesn't
match the search results, because they use the same 50% gray level.
This isn't a huge problem, but it could lead to confusion. This commit
uses a subtle solution, a 25% opacity when the button is inactive and
also filtered by search.
This requires flipping the meaning of the UI_SEARCH_FILTER_MATCHES
flag in the code, and also adding a widget_alpha_factor utility in
the widget code.
Differential Revision: https://developer.blender.org/D8975
|
|
3D Viewport -> Sidebar -> View -> Local Camera is disabled. When you
click on it, box select starts. This behavior isn't intended, and fixing
it is quite simple. The only case where this would continuing would
still be desired is if a disabled button overlapped with a non-disabled
button, but this shouldn't be the case anywhere.
Differential Revision: https://developer.blender.org/D8832
|
|
Also reduce the scope of some variable declarations.
This also allows making some variables constant.
|
|
Access to this structure will be needed in BKE's armature code.
|
|
Version patching userpref.blend wasn't using the correct version,
causing settings not to be properly updated.
This seems the likely cause of T70196 and similar bugs.
|
|
Error in 9b6c5268bc20. Also move variable declaration to where it's
used to reduce confusion.
|
|
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
|
|
Instead of indenting the entire functional block, check for the error
case and the supported case early to make the code more readable.
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
|
|
The "UI_panel_set_expand_from_list_data" doesn't need to be in the
public API since it's just called every time an instanced panel is added.
This commit just sets the expansion automatically and adjusts some
naming to account for the moved function.
|
|
It's necessary to check if the panels are active before accessing their
data. Thanks to @ankitm for reporting this.
|
|
Although I haven't seen this cause any visible errors, there is some
incorrect handling for setting panel expansion during search:
- Properly check if child panel is active first
- Don't stop traversal at headerless panels that could theoretically
have children
|
|
The layout pointer is quite ugly, but currently needed to work around
design issues. At least it should be cleared to avoid use-after-free.
|