Age | Commit message (Collapse) | Author |
|
This patch adds a left aligned sidebar to the spreadsheet editor. This
Sidebar can be used to navigate the geometry component types and
attribute domains. It also provides a quick overview of domain sizes.
It replaces the two dropdowns in the regions header.
Next step will be to add the domain cycling shortcut
using the CTRL + mouse wheel.
Reviewer: Dalai Felinto (dfelinto), Julian Eisel (Severin),
Hans Goudey (HooglyBoogly).
Differential Revision: https://developer.blender.org/D11046
|
|
|
|
Some warnings remain that require larger changes.
|
|
This patch introduces non linear sliders. That means, that the movement
of the mouse doesn't map linearly to the value of the slider.
The following changes have been made.
- Free logarithmic sliders with maximum range of (`0 <= x < inf`)
- Logarithmic sliders with correct value indication bar.
- Free cubic sliders with maximum range of (`-inf < x < inf`)
- Cubic sliders with correct value indication bar.
Cubic mapping has been added as well, because it's used for brush sizes
in other applications (Krita for e.g.).
To make a slider have a different scale type use following line in RNA:
`RNA_def_property_ui_scale_type(prop, PROP_SCALE_LOGARITHMIC);`
or:
`RNA_def_property_ui_scale_type(prop, PROP_SCALE_CUBIC);`
Test the precision, step size and soft-min if you change the scale type
of a property as it will feel very different and may need tweaking.
Ref D9074
|
|
Also clarify some vague comments & add doxygen section for menu-memory.
|
|
- Restore comment removed by accident in
8c5c55b8c9c0cb5d4b8c296f5a8ee501aabc1ead
- Use doxygen syntax.
|
|
Increase range of internal flags & order UI_SEARCH_FILTER_NO_MATCH
within this range, so public button flags aren't accidentally added
that overlap with internal flags.
|
|
|
|
Using the button context for operators is useful for other cases as well (where
the operator isn't the button operator itself). For example we'll need this for
the asset view UI template, where there will be additional operators that
should be able to act on button context.
|
|
Reserve `event` for wmEvent.
|
|
I landed D10527 in rB1a8aee0a7cec accidentally, and the version there was
missing a name change discussed in review. This commit just renames the
boolean variable controlling the special behavior for attribute search.
Original message meant for this change:
For geometry nodes we will use search buttons to display a list of
attributes available the last time the node tree was executed (D10519).
Because this list is just a hint, we need to be able to enter any string,
not just strings from the search items.
This patch adds a boolean option to string buttons to enable this.
The change is quite simple, changes to behavior are only required in
two places. The type-specific button struct changes help a lot here.
Differential Revision: https://developer.blender.org/D10527
|
|
Currently when you open an RNA collection search button, like a
vertex group selector, the search filter isn't applied until you
start typing, in order to display every option at the start.
Otherwise they wouldn't be visible, since the search filter would
run for the current text.
Currently this check happens in one place, but it relies on the
`changed` value of `uiBut`. This is fine in the interface directory,
but anywhere else it would require exposing `uiBut.changed`, which
is probably too low-level to expose.
The solution is adding an `is_first` argument to the search callbacks,
which is nice for a few reasons:
- They work at a higher level of abstraction, meaning they don't
have to worry about how exactly to tell if this is the first
search.
- It makes it easier to do special behavior when the search menu
is first opened.
- Then, obviously, it makes that state accessible without including
`interface_intern.h`.
Needed for attribute search: T85658
Differential Revision: https://developer.blender.org/D10528
|
|
That way the header can be included in C++ files.
|
|
|
|
|
|
Issue is visible here https://developer.blender.org/F8626313.
If there is enough space for both the item name and the library hint, display
both. Otherwise, clip either the item name, the library hint, or both so that
not more than 60% and 40% of the available width are used repectively.
There are further improvements we could do, as noted in T84188, this just fixes
the regression for the release.
Part of T84188. There were multiple reports about this, see merged in and
mentioned reports in T84188 and T78012.
|
|
This doesn't serve any purpose and can become out of sync
with the function it's self without reporting warnings.
|
|
Using the `uiButtonGroupFlag` type explicitly can avoid the need
to look up which enum should be used as an argument.
|
|
Previously both `char` and `int` were used to represent this enum.
Differential Revision: https://developer.blender.org/D9903
|
|
Ref T68926
|
|
Previously these HSV values were in the color picking space, which meant the
relation to the scene linear RGB values was confusing.
The new situation:
* RGB number buttons: scene linear color space
* HSV number buttons: scene linear color space
* Picker widgets: color picking color space
* Hex: sRGB color space
Fixes T69562, T83853, Ref T68926
|
|
Adds smooth scrolling with the trackpad for popovers. Also fixes the position of the scroll arrows on high-DPI.
Differential Revision: https://developer.blender.org/D9533
Reviewed by Brecht Van Lommel
|
|
|
|
- Shortcuts were being shown in the undo history.
- Multi-line tool-tips now only use the first line.
|
|
|
|
Move popover down a very slight amount to fix clipping of its arrow tip.
Differential Revision: https://developer.blender.org/D9030
Reviewed by Julian Eisel
|
|
Corrects incorrect usages of the words 'then' and 'than'.
Differential Revision: https://developer.blender.org/D9246
Reviewed by Campbell Barton
|
|
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 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
|
|
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.
|
|
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
|
|
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.
|
|
|
|
Since the search is applied all in one phase, there is no need to store
a reference to the search filter in every uiBlock. Instead just pass it
as an argument to UI_block_apply_search_filter.
|
|
Setting the search match flag every time property search runs can
invalidate the results for panel headers. Instead, clear the flag on
every redraw and or the result of every search in the panel to it.
|
|
E.g. the 'x' icons or eyedropper icons in text buttons. They didn't use
to have any mouse over feedback, now we dim the icon until hovered.
This kind of feedback helps users see that the icons are interactive,
and if they are within their interaction hotspot.
|
|
This adds a search bar to the properties editor. The full search for
every tab isn't included in this patch, but the interaction with
panels, searching behavior, UI, region level, and DNA changes are
included here.
The block-level search works by iterating over the block's button
groups and checking whether they match the search. If they do, they
are tagged with a flag, and the block's panel is tagged too. For
every update (text edit), the panel's expansion is set to whether
the panel has a result or not. The search also checks for matching
strings inside enums and in panel labels.
One complication to this that isn't immediately apparent is that
closed panel's subpanels have to be searched too. This adds some
complexity to the area-level panel layout code.
Possible Future Improvements:
- Use the new fuzzy search in BLI
- Reset panels to their expansion before the search started if
the user escape out of the text box.
- Open all child panels of a panel with expansion.
Differential Revision: https://developer.blender.org/D8856
|
|
This is needed for property search (upcoming patch D8856) where a
buttons labels are often separate buttons, but we need to highlight
the label to show that a property is a search result. This is
especially important in "property split" layouts where the label is
almost always another button in a separate column.
The button groups here are basically a flattened view of the buttons
in the layout tree. Every function that adds a new set of buttons
creates a new button group, and the new buttons are automatically
added to the most recent group. Then, each group is searched
separately in the property search phase. It's important that every
function adding a new button set calls layout_root_new_button_group.
Note that this won't be disabled when property search isn't active.
It may be useful for other things in the future, and trying to pass
that information to layout functions didn't feel worth it to me.
Differential Revision: https://developer.blender.org/D8783
|
|
For the man rationale behind this design, see 49f088e2d093. Further,
this removes users of uiBut.a1/uiBut.a2, which is a very ugly design
choice (hard to reason about).
Note that I had to do rather ugly, specific exceptions for the number
buttons in `ui_def_but_rna()`. But once all users of a1/a2 are removed,
this special handling shouldn't be needed anymore.
I also had to move a sanity check out of the button definition. It's now
moved into a new debug only sanity checking function executed when
finishing the layout definition (block end).
|
|
We want to move away from using `uiBut.a1`/`a2`, which is a hard to
reason about design.
Part of T74432.
Also correct comment.
|
|
No functional changes
|
|
This was reported for the "Add Node" search functionality, but is
relevant in other searches as well.
So e.g. when searching for "Separate XYZ", typing "sep", then " " (with
the intention to type "X" next) would clear the search field. Now use
the same method (matching against all search words) as in F3 searching
('menu_search_update_fn') in other searches as well [searching IDs,
property objects, finding nodes,...]
This should give a much nicer search experience in general.
Note: this does not touch other searches in the Dopesheet, Outliner,
Filebrowser or User Preferences that have other search implementations.
Maniphest Tasks: T78084
Differential Revision: https://developer.blender.org/D8232
|
|
- Use const in some places where applicable
- Use consistent variable names in some places
- Use "r_" prefix for return arguments
- Declare variables in smaller scope where they are used
|
|
The same changes as rB570044e9f412 and rB0ab21bf06ae0.
|
|
The same changes as in rB570044e9f412.
|
|
Continuing the work from rB49f088e2d093.
Differential Revision: https://developer.blender.org/D8561
|
|
For the main rationale behind this design, see 49f088e2d093. Further,
this removes users of uiBut.a1, which is a very ugly design
choice (hard to reason about).
Part of T74432.
|
|
For the main rationale behind this design, see 03b122e2a18df. Further,
this removes users of `uiBut.a1`, which is a very ugly design
choice (hard to reason about).
Part of T74432.
|
|
For the main rationale behind this design, see 03b122e2a18df. Further,
this removes users of `uiBut.a1`/`uiBut.a2`, which is a very ugly design
choice (hard to reason about).
Part of Part of T74432.
|