Commit Graph

128534 Commits

Author SHA1 Message Date
Lukas Tönne
71732a9600 Fix #113014: Improved sorting to keep node group outputs above inputs
The position validation when manipulating node group items now includes
outputs..inputs order in addition to sockets..panels order. The method
for finding a valid position has been simplified, it's just a single
iteration of insertion sort.

Versioning has been added to ensure files from 4.0 alpha with
potentially unsorted sockets get re-sorted. This uses `std::stable_sort`
so that sockets keep their relative order apart from the input/output
grouping.

Pull Request: https://projects.blender.org/blender/blender/pulls/113060
2023-10-03 12:18:36 +02:00
Bastien Montagne
19ac7c0f87 I18N: Updated UI translations from weblate/git repo (67dc845a5b11). 2023-10-03 12:14:42 +02:00
Lukas Tönne
a06403cd3b Nodes: Include rotation socket type in anonymous attribute inferencing
Rotation socket is missing in `is_possible_field_socket` for detecting socket types that can be fields.

Pull Request: https://projects.blender.org/blender/blender/pulls/113197
2023-10-03 11:39:47 +02:00
Jacques Lucke
48fe3aab36 UI: start search in menu when pressing spacebar
This way one can easily access the item that has been searched for most
recently if `Sort by Most Recent` is enabled in the user preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/113144
2023-10-03 11:39:00 +02:00
3d6713e086 Fix #113178: .dae file with collection-less armature crashes on import
If the DAE file was written with something other than Blender 4.0, it
doesn't have the bone collections info. That resulted in a nullptr, which
is now handled properly.
2023-10-03 10:34:44 +02:00
Campbell Barton
41d62f36d5 Fix uninitialized variable use accessing the screen size under Wayland
It's possible for there to be no outputs under Wayland
(when unplugging monitors for e.g.) so this must be accounted for.

Also avoid calculating the window position when the GHOST backend
doesn't support window positions (which is the case for Wayland).

Add checks for the SDL backend too, where accessing the
screen & desktop size may fail.
2023-10-03 15:40:58 +11:00
Campbell Barton
dea7a94e0c Cleanup: remove redundant call to GHOST_GetMainDisplayDimensions
A maximum window size was calculated but not used
(dating back to the first commit).
2023-10-03 15:09:53 +11:00
Campbell Barton
26bb029ad8 Fix #113154: Hang double-clicking on UI elements outside a text field
The logic to handle word selection from double clicking ran even when
the event wasn't inside the button. This would pass an invalid position
to BLI_str_cursor_step_bounds_utf8 which hung.

Resolve by limiting word-selection to when the event is inside
the text editing field as well as clamping the position to ensure
it's within the allowed range.
2023-10-03 13:57:33 +11:00
Campbell Barton
779239f5e1 Cleanup: spelling in comments 2023-10-03 11:16:55 +11:00
Campbell Barton
69d18c6063 Cleanup: quiet unknown escape sequence warning 2023-10-03 11:08:49 +11:00
Harley Acheson
68bde462e5 Cleanup: Make format
Formatting changes resulting from Make Format
2023-10-02 17:06:55 -07:00
Pratik Borhade
fcd6b6f4f6 Fix #112630: Skip grave and acute quotations when selecting
Treat grave and acute accent characters as delimiters. Allows selection
of words in the same way as if surrounded by double and single
quotation marks.

Pull Request: https://projects.blender.org/blender/blender/pulls/112652
2023-10-03 01:56:59 +02:00
Harley Acheson
e196f0a874 Fix #113044: Reset Fonts When Loading New Files
Close user-loaded fonts when loading a new blend file so that the
global_font slots are not taken up by the old file's fonts.

Pull Request: https://projects.blender.org/blender/blender/pulls/113104
2023-10-03 01:21:03 +02:00
Germano Cavalcante
ba3f8e957f Cleanup: fix unused variable warning
Caused by e7ba91a6f3
2023-10-02 18:40:42 -03:00
Hans Goudey
85580c5835 Fix #113142: Sculpt fairing operators don't update normals
Tagging the PBVH nodes isn't enough, each vertex has to be tagged too.
2023-10-02 17:36:44 -04:00
Germano Cavalcante
e7ba91a6f3 Fix #113130: Versioning error in snap type in animation editors
Caused by fb556c75df

The ideal would be to increase the version file, but this would make
the versioning code a bit messy, and it was a recent error
(it shouldn't affect many users).
2023-10-02 17:26:07 -03:00
Germano Cavalcante
c706de891c Fix snap to endpoint being represented as loose point
Since different symbols are implemented, there is a distinction between
endpoint and loose point, which was partially missing in the snap code
for Mesh.
2023-10-02 16:33:05 -03:00
Brecht Van Lommel
94e2973f0b Build: support OpenColorIO 2.3
For Linux distributions or others that upgrade before we do.

Ref #113157

Pull Request: https://projects.blender.org/blender/blender/pulls/113163
2023-10-02 19:31:19 +02:00
Brecht Van Lommel
a455eca7a0 Fix #112931: Cycles mesh light sampling artifacts 2023-10-02 19:18:42 +02:00
Brecht Van Lommel
ed36398e16 Fix #109907: Cycles correlation issue with LCG random numbers
This showed up in 3.6 with multiscatter GGX, but could still be an issue
in current principled hair BSDF implementations.
2023-10-02 18:41:56 +02:00
Jacques Lucke
9a8f65ef13 Fix #113159: improve best word match heuristic in string search
That was accidentally broken as side effect of 56e98f8ba6abf9.
2023-10-02 18:12:41 +02:00
Jacques Lucke
768ced88dd Fix: String Search: avoid casting match scores to int 2023-10-02 18:12:40 +02:00
Jacques Lucke
17f465f775 Fix: Geometry Nodes: dangling pointer in geometry after modifier evaluation
This case probably hasn't been triggered before because we rarely move individual
const-components around between geometry sets. This happened in #113083 in the
optimization when all elements are in the same group.

Pull Request: https://projects.blender.org/blender/blender/pulls/113160
2023-10-02 17:43:22 +02:00
Miguel Pozo
0ed6172833 Fix #112164: Draw: Circle select tool low performance
Since garbage collection of texture pools happens every time
`drw_manager_init` is called, interleaved calls to different
`DRW_draw`/`DRW_render` functions can result in a constant cycle of
creating/releasing textures.

This PR changes texture pools to only release textures that have not
been used for N garbage collection cycles.
I chose 8 as default since I think is high enough to avoid the issue
while it's unlikely to cause any major spike in memory consumption.

Pull Request: https://projects.blender.org/blender/blender/pulls/113024
2023-10-02 16:43:48 +02:00
Charles Wardlaw
f536513952 Fix #112463: crash or invalid results importing USD uniform colors
The code assumed quads and failed with triangles

Co-authored-by: Michael Kowalski <makowalski@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112589
2023-10-02 16:32:00 +02:00
Sergey Sharybin
0e01667e25 Fix Split Strips operator not showing shortcut
This is because the menu entry was using different operator
properties from what the shortcut is defined for. It was needed
to make it so an operator which is called from the menu does not
have dependency on the mouse location.

Now it is achieved by resolving MOUSE side to RIGHT from the
operator's exec().

Ref #112598

Pull Request: https://projects.blender.org/blender/blender/pulls/113143
2023-10-02 16:20:31 +02:00
Pratik Borhade
3a00ba53a1 Fix #113078: Texture paint masking options are always visible
Caused by ef18cdf8dc. Commit did not properly remove the mask panels
from tool settings

Pull Request: https://projects.blender.org/blender/blender/pulls/113085
2023-10-02 13:13:13 +02:00
6ed12635cf Anim: Warn when a bone is added to a hidden bone collection
New bones (Shift+A in armature edit mode) are added to the active bone
collection. This collection can be hidden, causing the newly added bone
to be invisible. This is consistent with adding objects to hidden scene
collections, but can be confusing nonetheless. Now a warning is issued,
at least for the armature/bone case.
2023-10-02 12:38:44 +02:00
a2613e0318 Anim: remove bone group operators
Remove the Pose mode operators that manipulate bone groups.

Bone groups were removed in Blender 4.0 and replaced with Bone Collections.
2023-10-02 12:02:06 +02:00
26fbeef755 Anim: change UI label from 'Edit Bone Color' to just 'Bone Color'
The `armature.bones["name"].color` property is *the* bone color, which is
intended to be used as the primary way of coloring bones. THis is now
reflected better in the UI.

The per-armature-object bone color (i.e. `ob.pose.bones["name"].color`) is
seen as a secondary.
2023-10-02 11:57:15 +02:00
26c2d2e0b8 Anim: add 'move bone to collection' operator to pose mode menu
Add the 'move bone to collection' operator to the pose mode menu. It was
already in the armature edit mode menu.

The operator was already available in the pose mode keymap, it just wasn't
discoverable via the menu.
2023-10-02 11:57:15 +02:00
Xavier Hallade
d8e8e8eb9a Cycles: oneAPI: fix device compilation with latest MSVC
<algorithm> header include is missing from some sycl headers, this will
be fixed upstream with https://github.com/intel/llvm/pull/10424,
meanwhile, we work around it by including it directly.
2023-10-02 09:17:17 +02:00
Campbell Barton
883033a096 Curve: adjust behavior of invert selection for bezier handlers
Since [0] picking a bezier knot doesn't pick the handles,
this meant picking a vertex, then inverting the selection would
delete that vertex, which isn't useful/expected behavior.

Invert selection now considers knots selected whenever any of it's
handles are selected (matching the graph editor).

This change has also been made for grease-pencil bezier editing.

[0]: 618f39fca23ca7734a09a8f08efced8379efd2b3
2023-10-02 12:10:08 +11:00
Lukas Stockner
b1a91c99bc Fix #111588: Cycles: Vector displacement with adaptive subdiv breaks normal
The compact form of the differential is not enough here, we need to store
and use the full vectors for bump evaluation.

Pull Request: https://projects.blender.org/blender/blender/pulls/112987
2023-10-02 02:19:51 +02:00
Harley Acheson
4d35344010 UI: UI: Anchor Right When Double-Clicking Last Word
Merging #113125 into blender-v4.0-release. Accidentally
committed to main first.
2023-10-01 09:56:12 -07:00
Harley Acheson
fef8b38acb UI: Less Cursor Changes While Loading Files
Less changes of mouse cursor while loading blend files. And no changes
to it while reading the homefile.

Pull Request: https://projects.blender.org/blender/blender/pulls/113123
2023-10-01 17:44:53 +02:00
Campbell Barton
c2ff509159 Fix incorrect function name in foreach_get/foreach_set exceptions 2023-10-01 14:19:44 +11:00
Campbell Barton
18f8579e38 Follow up to fix for #111117, remove array/collection length lookup
Revert a change from [0]. There is no need to count items in the
collection/array as the property iterator can detect this.

[0]: a280e8a68c15ee3ec0978fb594b29d083fd2bcd6
2023-10-01 14:07:56 +11:00
Martijn Versteegh
3f633503d3 Fix #111117: Partially revert a280e8a6
The size check was incorrect for mixed triangle/ngon/quad meshes.

Pull Request: https://projects.blender.org/blender/blender/pulls/112879
2023-10-01 00:17:46 +02:00
Jacques Lucke
cc7da09c1b Geometry: add utility to check for bad geometry element index dependence
Sometimes .blend files have compatibility issues between Blender versions,
because .blend files depended on the specific order of geometry elements
generated by some nodes/modifiers (#112746, #113018). While we make
guarantees about the order in some places, that is relatively rare, because it
makes future improvements much harder. The functionality in this patch
makes it easier for users to notice when they depend on things that are not
expected to be stable between Blender builds.

This is achieved by adding a new global flag which indicates whether some
algorithms should randomize their output. The functionality can be toggled
on or off by searching for `Set Geometry Randomization`. If there are no
differences (or acceptable minor ones) when the flag is on or off, one can
be reasonably sure that one does not on unspecified behavior (can't be 100%
sure though, because randomization might be missing in some places). If
there are big differences, one should consider fixing the file before it comes
to an actual breakage in the next Blender version.

Currently, the setting is only available when `Developer Extras` is turned on,
because the setting is in no menu.

With this patch, if we get bug reports with compatibility issues caused by
depending on indices, one of the following three cases should always apply:
* We actually accidentally broke something, which requires a fix commit.
* Turning on geometry randomization shows that the .blend file depends on
  things it shouldn't depend on. In this case the user has to fix the file.
* We are missing geometry randomization somewhere, which requires a fix
  commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/113030
2023-09-29 21:44:36 +02:00
Iliya Katueshenock
1c4c76ccbf Fix #113011: delete unused anonymous attributes in capture attribute node
A lot of Capture Attribute nodes in sequence can create a huge number of attributes.
If these attributes are not used, they should be removed.

The speed of the Capture Attribute and Store Named Attribute nodes is now identical
(for the better). There are also no extra RAM usage now.

Pull Request: https://projects.blender.org/blender/blender/pulls/113053
2023-09-29 21:23:15 +02:00
Hans Goudey
54ca0c93f9 Fix: Set node interface item active when added with link-drag-search 2023-09-29 13:18:45 -04:00
Harley Acheson
82bfc41d0c UI: Allow Separate Configuration of Subpixel Antialiasing
Separate user configuration of subpixel antialiasing from the hinting
options. For example, this allows turning this on while hinting is
"None", or off when hinting is "Full".

Pull Request: https://projects.blender.org/blender/blender/pulls/113027
2023-09-29 19:02:25 +02:00
Philipp Oeser
cfde3973d1 Fix: Theme color for sub-channels not exposed in NLA Preferences
Subchannel (mesh, shapekey, lattice, speaker, ...) color could not be
changed from NLA Preferences, `ds_subchannel` was only initialized in
userdef_default_theme.c [making it more or less hardcoded].

Now expose this in Preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/113045
2023-09-29 17:12:17 +02:00
Lukas Tönne
d1435f6729 Node groups: Add undo steps after drag and drop of interface items
These have to be added manually by the drop targets.

Pull Request: https://projects.blender.org/blender/blender/pulls/113061
2023-09-29 16:29:26 +02:00
Nate Rupsis
d1f250c0bc FIX #110946: vgroup normalize all check if armature is deforming before normalizing
If an armature is present, but not active the group_select_mode defaults to WT_VGROUP_BONE_DEFORM, and throws an error because it can't find any active vertex groups.  we're now checking to see if any bone is actively deforming before switching to WT_VGROUP_BONE_DEFORM (else defaulting to WT_VGROUP_ALL)

Pull Request: https://projects.blender.org/blender/blender/pulls/112648
2023-09-29 15:31:57 +02:00
Philipp Oeser
2d1cbac809 Fix #113052: Node panel state change not updating Node Editor
When collapsing/expanding panels from the Properties Editor, the Node
Editor was not updated immediately.

Now add notifier for this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/113054
2023-09-29 13:17:52 +02:00
d6b86f278b Anim: keymap, replace 'show all layers' with 'show all collections'
Make the Ctrl+ACCENT_GRAVE hotkey call the 'show all bone collections'
operator (`armature.collection_show_all`), instead of 'show all armature
layers' (`armature.layers_show_all`).

This was the last reference to `armature.layers_show_all`, and the operator
has been removed.
2023-09-29 11:52:44 +02:00
Lukas Tönne
164fbc2863 Fix #113013: Make in_out socket property read-only and remove the button
Pull Request: https://projects.blender.org/blender/blender/pulls/113048
2023-09-29 10:29:57 +02:00
Peng Yan
26b2cc3ffb Fix error in area calculation for polyfill beautify calculation 2023-09-29 17:13:17 +10:00