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
|
|
|
|
Fix by reverting the part of ec30cf0b742f5181c4de91b474ca01d6a809c593
that assigned `but->editval` in `ui_numedit_begin_set_values`.
Causing access freed memory when using tab to switch
to a numeric input and then leaving the textbox by clicking outside.
This was because `ui_numedit_begin_set_values` shouldn't need to set
`but->editval` and overwrite the pointer.
This would set a pointer that had previously been freed,
causing a `NULL` check to fail later on.
Ref D11679
|
|
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
|
|
An arbitrary size offsets was used in float_array_to_string,
simplify the loop, use exact size limits.
Also rename variables so it's clear which array the length apply to.
|
|
Event though in practice this wasn't causing problems as the fixed size
buffers are generally large enough not to truncate text.
Using the result from `snprint` or `BLI_snprintf` to step over a fixed
size buffer allows for buffer overruns as the returned value is the size
needed to copy the entire string, not the number of bytes copied.
Building strings using this convention with multiple calls:
ofs += BLI_snprintf(str + ofs, str_len_max - ofs);
.. caused the size argument to become negative,
wrapping it to a large value when cast to the unsigned argument.
|
|
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
|
|
|
|
When the user hovered over a number input field, pressed Enter and then
typed in '0', confirming the input would always cancel the action. This
is because in this particular case `ui_textedit_begin` is called
instead of `ui_numedit_begin`. This function will not set
`data->startvalue` (leaving it at `0`) which will then trigger the
cancel in `ui_apply_but_NUM` which checks if the input changed (by
comparing the entered value with `data->startvalue`).
The fix makes sure that when `ui_textedit_begin` is called on a number
button, the `data->startvalue` is set correctly like in
`ui_numedit_begin`.
Breaking commit: rBSeb06ccc32462beaacbb114d6d0e450b6fc911047
Note: This also affects pressing tab to move to a new number field and
entering '0'. The fix will also cover this case.
Reviewed By: Severin, #user_interface
Maniphest Tasks: T88058
Differential Revision: https://developer.blender.org/D11168
|
|
|
|
When the user entered a driver expression like `#frame` into a number
field, Blender would crash sometime after. This is because
e1a9ba94c599 did not handle this case properly and ignored the fact
that the user can enter text into the field.
The fix makes sure that we only cancel if the value is a *number* equal
to the previous value in the field.
Note that this could also be handled by `ui_but_string_set` which would
be a bit nicer potentially. However, I was unable to find a clean way of
passing `data->startvalue` into that function. `uiHandleButtonData` is
only known locally inside `interface_handlers.c`.
Reviewed By: Severin
Maniphest Tasks: T87688
Differential Revision: https://developer.blender.org/D11049
|
|
Dragging a number button, then holding the value and pressing escape
would not reset the value correctly.
This was because eb06ccc32462 assumed that `data->value` and
`data->startvalue` were set during dragging which they are not.
The fix moves the if statement into the section where we check if a
number was entered (number edit) making sure that we only cancel
if the button was in "string enter" mode and that the value entered
was the same as before.
Reviewed By: HooglyBoogly, Severin
Maniphest Tasks: T87637
Differential Revision: https://developer.blender.org/D11021
|
|
Previously, clicking into a number field, changing nothing and then
clicking outside the field again would trigger an update (RNA prop
would be set to the same value again). This could potentially cause
an expensive operation (like a modifer) to run again, even if all the
parameters were identical.
The fix prevents this by treating unchanging values in the field as a
cancel operation.
Reviewed By: Severin
Maniphest Tasks: T87448
Differential Revision: https://developer.blender.org/D10976
|
|
|
|
|
|
|
|
Used for local structs/variables,
since `ofs` is by far the most widely used abbreviation.
|
|
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
|
|
|
|
Disambiguate which time the frames are measured in.
|
|
|
|
|
|
Approximately 91 spelling corrections, almost all in comments.
Differential Revision: https://developer.blender.org/D10288
Reviewed by Harley Acheson
|
|
All modifiers were being checked, a hang-over from 2.4x
where this checked the modifier flag was non-zero.
|
|
|
|
# Conflicts:
# source/blender/editors/transform/transform_constraints.c
|
|
The 'ui_pan_to_scroll' uses 'WM_event_absolute_delta_y'. For scrolling the List View
we need to invert the direction to respect "natural scroll direction" system preferences.
Differential Revision: https://developer.blender.org/D10291
|
|
Now the icon's rect are drawn wider than it should be, and with
overlapping, probably in order to compensate for the icon's offsets
inside the rect. The solution is to draw icon's rect of the correct
size and center the icon itself.
And make the hotspot exactly match the icon's rect. The last/right
button's hotspot also covers the extra padding on the right.
Differential Revision: https://developer.blender.org/D9936
Reviewed by: Julian Eisel
|
|
Now the icon's rect are drawn wider than it should be, and with
overlapping, probably in order to compensate for the icon's offsets
inside the rect. The solution is to draw icon's rect of the correct
size and center the icon itself.
And make the hotspot exactly match the icon's rect. The last/right
button's hotspot also covers the extra padding on the right.
Differential Revision: https://developer.blender.org/D9936
Reviewed by: Julian Eisel
|
|
|
|
Disable key-accelerators for key-repeat events.
When a key was held it could open the menu and activate the menu
item associated with that key.
With the RMB select option: edit-meshes & edge-selection caused
holding W to open & activate "Edge Bevel Weight".
|
|
Long data-block names are clipped to fit into data-block selector menus. For
linked data-blocks, there's also a hint indicating the source library, which
takes further space and may get clipped too.
So this commit adds a tooltip to the menu items, which displays the full,
unclipped data-block name and the unclipped library name. Plus, the library
path is shown too, which is also useful info.
Adds helper functions for search menu item tooltips, so these are easier to add
to other search menus in future.
Part of T84188.
|
|
Needed for const-correctness in the following commit.
|
|
Partially reverts 2250b5cefee7.
Removing the user count and fake user count icons was controversial (which was
expected) and there are a few further changes needed, that won't make it in
time for the release, see D9946.
While there is a design to bring back the user count and fake user indicators,
a new design idea was proposed that the UI team wants to follow. This came too
late for the 2.92 release, the new design is targeted at the 2.93 release now.
Meanwhile, UI team decision was to simply revert the design changes.
The new design is being worked on in https://developer.blender.org/T84669.
Note that this commit does not revert some internal changes done in
2250b5cefee7. Namely the introduction of `ed_util_ops.c` and data-block
operators in there. These will still be needed in the new design.
|
|
Dragging an image from the file selector into the sequencer
was leaking memory.
Regression in b5d778a7d4072bfb091198a2094890157a6d017b.
|
|
|
|
The previous design is rather old and has a couple of problems:
* Scalability: The current solution of adding little icon buttons next to the
data-block name field doesn't scale well. It only works if there's a small
number of operations. We need to be able to place more items there for better
data-block management. Especially with the introduction of library overrides.
* Discoverability: It's not obvious what some of the icons do. They appear and
disappear, but it's not obvious why some are available at times and others
not.
* Unclear Status: Currently their library status (linked, indirectly linked,
broken link, library override) isn't really clear.
* Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to
invoke alternative behaviors. This is not a usual pattern in Blender.
This patch does the following changes:
* Adds a menu to the right of the name button to access all kinds of operations
(create, delete, unlink, user management, library overrides, etc).
* Make good use of the "disabled hint" for tooltips, to explain why buttons are
disabled. The UI team wants to establish this as a good practise.
* Use superimposed icons for duplicate and unlink, rather than extra buttons
(uses less space, looks less distracting and is a nice + consistent design
language).
* Remove fake user and user count button, they are available from the menu now.
* Support tooltips for superimposed icons (committed mouse hover feedback to
master already).
* Slightly increase size of the name button - it was already a bit small
before, and the move from real buttons to superimposed icons reduces usable
space for the name itself.
* More clearly differentiate between duplicate and creating a new data-block.
The latter is only available in the menu.
* Display library status icon on the left (linked, missing library, overridden,
asset)
* Disables "Make Single User" button - in review we weren't sure if there are
good use-cases for it, so better to see if we can remove it.
Note that I do expect some aspects of this design to change still. I think some
changes are problematic, but others disagreed. I will open a feedback thread on
devtalk to see what others think.
Differential Revision: https://developer.blender.org/D8554
Reviewed by: Bastien Montagne
Design discussed and agreed on with the UI team, also see T79959.
|
|
Ref T68926
|
|
One of the core design aspects of the Asset Browser is that users can "mount"
custom asset libraries via the Preferences. Currently an asset library is just
a directory with one or more .blend files in it. We could easily support a
single .blend file as asset library as well (rather than a directory). It's
just disabled currently.
Note that in earlier designs, asset libraries were called repositories.
Idea is simple: In Preferences > File Paths, you can create custom libraries,
by setting a name and selecting a path. The name is ensured to be unique. If
the name or path are empty, the Asset Browser will not show it in the list of
available asset libraries.
The library path is not checked for validity, the Asset Browser will allow
selecting invalid libraries, but show a message instead of the file list, to
help the user understand what's going on.
Of course the actual Asset Browser UI is not part of this commit, it's in one
of the following ones.
{F9497950}
Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.
Differential Revision: https://developer.blender.org/D9722
Reviewed by: Brecht Van Lommel, Hans Goudey
|
|
For the Asset Browser, it needs to be possible to drag assets into various
editors, which may not come from the current .blend file. In other words, the
dragging needs to work with just the asset metadata, without direct access to
the data-block itself.
Idea is simple: When dragging an asset, store the source file-path and
data-block name and when dropping, append the data-block. It uses existing drop
operators, but the function to get the dropped data-block is replaced with one
that returns the local data-block, or, in case of an external asset, appends
the data-block first.
The drop operators need to be adjusted to use this new function that respects
assets. With this patch it only works for dragging assets into the 3D view.
Note that I expect this to be a short-lived change. A refactor like D4071 is
needed to make the drag & drop system more future proof for assets and other
use cases.
Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.
Differential Revision: https://developer.blender.org/D9721
Reviewed by: Bastien Montagne, Brecht Van Lommel
|
|
Avoid the crash, dragging multiple buttons still needs fixing.
|
|
str_len_clip is initialized to 0, so when "Unknown Action"
occurs, set str_len_clip appropriately.
Regression in 0688309988e546382748b9e755d84ae8a5059192
Ref D9759
|
|
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".
|
|
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
|
|
|
|
|