Commit Graph

7247 Commits

Author SHA1 Message Date
Julian Eisel
3d97c7dbcb Merge branch 'blender-v4.0-release' 2023-10-19 12:10:23 +02:00
Julian Eisel
838aca5f18 Fix #102856: Too small draggable area of asset view template items
For historic reasons buttons don't use the full button size as draggable
area by default, only a small part of it that is assumed to contain the
icon (e.g. of a label button). This isn't what we want for the big
preview buttons used here, their entire surface should be draggable.
We already have a workaround in place for this historic behavior, so we
can just enable that.
2023-10-19 12:09:55 +02:00
Campbell Barton
e7e4e63313 Cleanup: spelling in comments, white-space in comments 2023-10-19 18:53:16 +11:00
Campbell Barton
4a813ba5af Cleanup: simplify checks for IME event types
Use a separate block for IME start/event/end for clarity.
2023-10-19 18:01:40 +11:00
Campbell Barton
a38a49b073 GHOST/Wayland: IME support using the text-input protocol
Tested with IBUS on GNOME 45.
Added a capabilities flag to GHOST since support for IME works on
Wayland but not on X11, so runtime detection is needed.
2023-10-19 17:29:32 +11:00
Campbell Barton
3e26a1a39c Cleanup: set WITH_INPUT_IME=OFF when unsupported
This avoids having to do platform checks before checking WITH_INPUT_IME.
2023-10-18 22:04:25 +11:00
Campbell Barton
768dedbe5a Cleanup: reserve 'mval' for region-relative pointer coordinates 2023-10-17 12:57:00 +11:00
Harley Acheson
d0e6f894fe Merge branch 'blender-v4.0-release' 2023-10-16 10:18:41 -07:00
Harley Acheson
ffe980afad Fix #113766: Incorrect Cursor With Offset Position
Next character left edge position incorrect when string has
an offset positioning (scrolled within the input box).

Pull Request: https://projects.blender.org/blender/blender/pulls/113784
2023-10-16 19:17:28 +02:00
Omar Emara
9f1538b586 Cleanup: Move compositor headers to c++
Pull Request: https://projects.blender.org/blender/blender/pulls/113758
2023-10-16 10:45:54 +02:00
Jesse Yurkovich
51846d8173 Merge branch 'blender-v4.0-release' 2023-10-15 19:01:10 -07:00
Jesse Yurkovich
49e4923384 Fix #113697: Fix timer leak from panel drag/animate processing
When clicking or dragging a Panel's drag handle, a PANEL_STATE_DRAG
state transition is followed immediately by a PANEL_STATE_ANIMATE
transition.  Both transitions start a timer.

Unfortunately, a subtle change introduced in
f3ab698951 meant the first timer would no
longer be destroyed before starting the second one.

The fix is to just reuse the timer if it's already present so that a
second one is not created in the first place.

Pull Request: https://projects.blender.org/blender/blender/pulls/113711
2023-10-16 04:00:15 +02:00
Harley Acheson
d578170131 Cleanup: Make format
Format changes resulting from Make Format
2023-10-15 09:09:30 -07:00
Harley Acheson
03655189d7 Fix #113735: Space Characters in UI Text Entry #113749
With #113707 text cursor position is set using the character's visible
bounds, so special care is needed for those without bounds like space.
Forgot this also applies to 4.0.
2023-10-15 09:06:44 -07:00
Harley Acheson
b6131cc338 Cleanup: Make format
Formatting changes resulting from Make Format
2023-10-15 08:45:11 -07:00
Harley Acheson
c6c86b555d Fix #113735: Space Characters in UI Text Entry
With #113707 text cursor position is set using the character's visible
bounds, so special care is needed for those without bounds like space.

Pull Request: https://projects.blender.org/blender/blender/pulls/113749
2023-10-15 17:42:28 +02:00
Harley Acheson
13de143ba8 Merge branch 'blender-v4.0-release' 2023-10-14 12:00:08 -07:00
Harley Acheson
b772603843 Fix #113682: Improved Text Caret Position
For regular UI text entry, place the text caret exactly between
adjacent glyph bounds instead of just using partial text length to
position it.

Pull Request: https://projects.blender.org/blender/blender/pulls/113707
2023-10-14 20:58:50 +02:00
Harley Acheson
9ee5de05c0 Fix #101058: Allow Cryptomatte Picking Between Windows
Allow the source and target windows to differ when selecting
objects using Cryptomatte.

Pull Request: https://projects.blender.org/blender/blender/pulls/113636
2023-10-14 20:28:00 +02:00
Campbell Barton
2e0b844b36 Cleanup: spelling in comments 2023-10-14 13:53:00 +11:00
Harley Acheson
844b78786c Cleanup: Calm Warning in Interface_region_tooltip
Remove warning about unused variable `field_next`

Pull Request: https://projects.blender.org/blender/blender/pulls/113708
2023-10-14 02:14:22 +02:00
Harley Acheson
8919fb8bc7 UI: Fix Placeholder Bad String Comparison
Bad string comparison in ui_but_placeholder_get()

Pull Request: https://projects.blender.org/blender/blender/pulls/113706
2023-10-14 01:42:49 +02:00
Harley Acheson
d94502b456 Merge branch 'blender-v4.0-release' 2023-10-13 14:52:26 -07:00
Harley Acheson
da2902120e UI: Remove Menu Search Console Warning
Menu Search is showing a console warning whenever it can't find a menu
to search. WM_menutype_find should be set to silent.

Pull Request: https://projects.blender.org/blender/blender/pulls/113701
2023-10-13 23:51:18 +02:00
Harley Acheson
0c064fab59 UI: Never Show Unknown Type Placeholder
Some but types of UI_BTYPE_SEARCH_MENU can have no ID code and also be
of UnknownType. Don't show placeholder in this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/113700
2023-10-13 23:39:45 +02:00
Harley Acheson
cb9832f9b1 UI: Allow Tooltip Padding In Any Order
Allow padding anywhere within a tooltip, not just before the current
field, by adding a new field type of UI_TIP_STYLE_SPACER.

Pull Request: https://projects.blender.org/blender/blender/pulls/112487
2023-10-13 22:34:43 +02:00
Julian Eisel
14d6891efe Merge branch 'blender-v4.0-release' 2023-10-13 19:05:13 +02:00
Leon Schittek
7017a9880e Fix: UI: Scale list item highlight with zoom
Fix the row highlight in list views not scaling properly by taking
the zoom into account.

Pull Request: https://projects.blender.org/blender/blender/pulls/113645
2023-10-13 19:04:42 +02:00
Harley Acheson
5a1ad7d61d UI: Improved Placeholder Defaults
Improvements to how placeholder strings are guessed. Checking for
search icon, and also using name of the RNA property type.

Pull Request: https://projects.blender.org/blender/blender/pulls/113688
2023-10-13 18:53:33 +02:00
Harley Acheson
f7a8536112 Merge branch 'blender-v4.0-release' 2023-10-13 08:36:19 -07:00
Harley Acheson
a9dc7a4719 Cleanup: Comment for Assert in UI_text_clip_middle_ex
Just an added detailed comment for the reason for the assert in
UI_text_clip_middle_ex and why it has wriggle room.
2023-10-13 08:35:04 -07:00
Falk David
1b85ca7b05 Fix: GPv3: Reorder layers missing update
Reordering layers using drag-and-drop in the properties editor
was missing a depsgraph update.
2023-10-13 16:48:43 +02:00
Julian Eisel
6a2805e736 Merge branch 'blender-v4.0-release' 2023-10-13 16:17:11 +02:00
Julian Eisel
b8673bfbe2 Fix spreadsheet tree-view icons too close to collapse icon
There was a little hack to remove padding from buttons following the collapse
icon by setting the `UI_BUT_NO_TEXT_PADDING` flag, since that added excessive,
weird looking spacing. This shouldn't be done for buttons with icons, as it
moves the icons too close to the collapse chevron, and is visibly inconsistent
with other icon labels in the tree.

Turns out, that the entire hack to set the `UI_BUT_NO_TEXT_PADDING` flag is
unnecessary since 5c2330203e, which sets the flag everywhere for comparable
situations. So the hack can be removed.
2023-10-13 16:09:56 +02:00
Bastien Montagne
9859622a66 BKE_reports: make the API thread-safe.
This commit makes using (most of) `BKE_report` API safe in
multi-threaded situation.

This is achieved by adding a `std::mutex` lock to the `ReportList`
struct (in a slightly convoluted way unfortunately, due to this being a
DNA struct). This lock is then used to make most operations on
`Reportlist` data thread-safe.

Note that while working on this, a few other minor issues aroze in
existing usages of Reportlist by the WM code, mainly the fact that
`wm_init_reports` and `wm_free_reports` were both useless:
  - init was called in a context where there is not yet any WM, so it
    was doing nothing.
  - free was called on a WM that would be later freed (as part of Main
    freeing), which would also call cleanup code for its `reports` data.
Both have been removed.

Further more, `wm_add_default` (which is the only place where a WM ID is
created) did not initialize properly it reports data, this has been
fixed.

This change is related to the wmJob thread-safety tasks and PRs (#112537,
!113548).

Pull Request: https://projects.blender.org/blender/blender/pulls/113561
2023-10-13 11:29:59 +02:00
Campbell Barton
e86fbcd4f0 Merge branch 'blender-v4.0-release' 2023-10-13 10:31:44 +11:00
Campbell Barton
fb58aa5900 Cleanup: typos, duplicate words 2023-10-13 10:21:06 +11:00
Harley Acheson
4320f1a217 Merge branch 'blender-v4.0-release' 2023-10-12 11:56:24 -07:00
Harley Acheson
1c4b2ad17f Fix #113352: UI: Round Pen When Subpixel AA is Off
Testing to see if rounding the advancing pen seems to give slightly
nicer spacing when subpixel anti-aliasing is turned off.

Pull Request: https://projects.blender.org/blender/blender/pulls/113399
2023-10-12 20:54:54 +02:00
Harley Acheson
3c4f84e0fc UI: Input Placeholders
Optional inline hint describing the expected value of an input field.

Pull Request: #112104
2023-10-12 11:44:08 -07:00
Harley Acheson
70af02e0dd Cleanup: Make format
Changes resulting from Make Format
2023-10-12 10:38:12 -07:00
Harley Acheson
9071ed6a7f Cleanup: Make format
Changes resulting in Make Format
2023-10-12 10:35:19 -07:00
Harley Acheson
2c7d15b19c Merge branch 'blender-v4.0-release' 2023-10-12 10:33:29 -07:00
Harley Acheson
b688414223 UI: Type To Search And Space Bar Search
Continue allowing spacebar search for all dropdown and context menus,
but also add the ability to allow some menus to have type to search,
like Add Modifiers, Objects, Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/113520
2023-10-12 17:54:59 +02:00
Julian Eisel
8a5aacfdaa Refactor: Store view item in the view item drop target
Avoids repeated and redundant lookups. Also simplifies some code.

Note that currently, these drop targets are volatile objects created whenever
needed, but not kept in memory. Should they ever be kept over multiple redraws,
this view item reference will have to be updated for each.
2023-10-12 17:15:33 +02:00
Christoph Lendenfeld
3792c2720d Refactor: remove ED_ prefix from autokeying functions
No functional changes

Since the functions now live in a namespace,
they no longer need the prefix

as a result there are now 2 functions named
`autokeyframe_object`
which is fine because they take different parameters

If both are needed is for a future patch to investigate

Pull Request: https://projects.blender.org/blender/blender/pulls/113612
2023-10-12 16:32:29 +02:00
Christoph Lendenfeld
a3831fe7af Refactor: Move autokeyframing functions to animrig
No functional changes

The following functions have been moved
`autokeyframe_cfra_can_key`
`autokeyframe_object`
`ED_autokeyframe_object`
`ED_autokeyframe_pchan`
`ED_autokeyframe_property`

they are all in a new file
keyframing_auto.cc
while the declarations are in
ANIM_keyframing.cc

The autokeyframe makros also have been moved

Pull Request: https://projects.blender.org/blender/blender/pulls/113607
2023-10-12 15:44:58 +02:00
Julian Eisel
65b6bcfaa0 Merge remote-tracking branch 'origin/blender-v4.0-release' 2023-10-12 14:41:07 +02:00
Julian Eisel
a9238a54ba Fix broken inheritance hierarchy for light linking UI
Custom drop targets for views are supposed to use `DropTargetInterface` as the
base class, and view items `TreeViewItemDropTarget`. Light linking used
`TreeViewItemDropTarget` for both the view and the view item drop targets. This
is because they both used the same intermediate base class.

After suggestion from Sergey, this uses composition instead of multiple
inheritance, so `CollectionDropTarget` becomes a member instead of a base
class.

Pull Request: https://projects.blender.org/blender/blender/pulls/113550
2023-10-12 14:38:42 +02:00
Campbell Barton
b8ad624006 Cleanup: use doxygen doc-strings, spelling in comments 2023-10-12 09:26:53 +11:00