Commit Graph

103211 Commits

Author SHA1 Message Date
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]: a280e8a68c
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
Sybren A. Stüvel
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
Campbell Barton
78fc3039a8 Fix #90732: UI "Copy to Selected" crash with custom properties
Copy to selected & Alt-LMB dragging buttons didn't account for
custom properties, An IDProperty from one item was applies to other
items in the selection.

Now ID property paths are resolved up for every selected item.
2023-09-29 13:56:16 +10:00
Campbell Barton
b581ea1cc2 Fix copy-to-selected mix up with custom property names
Don't pass custom property names to RNA_struct_type_find_property
since this meant custom-property names could intentionally collide with
RNA property names.
2023-09-29 13:50:56 +10:00
Campbell Barton
61652934cd RNA: add RNA_path_from_ptr_to_property_index
Split out the logic from RNA_path_from_ID_to_property that calculates
the path from a PointerRNA to a property.
2023-09-29 13:50:54 +10:00
Campbell Barton
8c590ef945 Cleanup: pass const ID properties to path creation functions 2023-09-29 13:50:53 +10:00
Campbell Barton
a3cb3a65b2 Fix UI "Copy Data Path" missing the trailing index for array properties
The index was missing when full_path was False.
2023-09-29 13:50:52 +10:00
Harley Acheson
5ccb289ef7 Fix #112642: Anchor Word Start For Double-click Word Select
In Interface text inputs, when double-clicking to select a word, set
the "initial selection position" to the beginning of the word. This way
you can continue to select forward by dragging before releasing mouse.

Pull Request: https://projects.blender.org/blender/blender/pulls/113037
2023-09-29 00:27:58 +02:00
Jeroen Bakker
2d864846e4 Fix #113002: Fix Crash When Loading Previous Settings
The default theme of blender has no `icon_border_intensity` and
therefore only loads the regular icons. When newly loaded theme has the
`icon_border_intensity` set it needs to reload the icon textures so both
icon maps would be loaded.

Without reloading the icons a GPU texture is missing and would crash
blender at first use. Starting Blender the second time it would load the
correct icons and would work as expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/113016
2023-09-28 20:44:15 +02:00
Julian Eisel
31e1a32378 Fix 1 pixel overlap in tool or asset shelf header background drawing
When the tool settings or asset shelf header would draw with some
transparency, the separator line between regions would visibly overlap
the background behind buttons, which looked unpolished. Ensure there is
no overlap (but also no gap, which became visible after accounting for
the separator line in the background drawing).
2023-09-28 19:30:05 +02:00
Jason Fielder
06f27b564c Fix: DRW: Flickering and sync in Metal
Flickering caused by in-flight SSBO data
overwrites has been resolved by ensuring
data updates go into a new buffer while
existing data is in flight.

GPU_finish has also been removed from
SSBO read due to its frequent mid-frame use
limiting performance.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/113019
2023-09-28 18:42:49 +02:00
Harley Acheson
18fcb9b3fb UI: Show Waiting Mouse Cursor While File Loading
Change the mouse cursor to a "waiting" one during the majority of the
time that a blend file is loading.

Pull Request: https://projects.blender.org/blender/blender/pulls/112986
2023-09-28 17:19:52 +02:00
Julian Eisel
b82f3e90ca Fix #112985: Outliner header context menu shows asset operators
The Outliner exposed its context to the header as well which makes some
operators available there. While technically this is all fine, it's a
bit odd to the user, since they don't expect data-editing operations
when right clicking on a header that itself doesn't list data. Instead
only expose the Outliner context in the main region.
2023-09-28 16:19:38 +02:00
Brecht Van Lommel
66056fead0 Fix #112632: crash batch generating previews with Cycles
Don't assume existence of GPU backend in (background) preview rendering.

Also add null pointer checks and rely on assert instead to detect
invalid usage of GPU_render_begin/end, so that potential future mistakes
don't cause crashes.

Pull Request: https://projects.blender.org/blender/blender/pulls/112971
2023-09-28 16:13:09 +02:00
Sybren A. Stüvel
fff9da576c Anim: add overview of bone collections to bone property panel
Add an overview of those bone collections the active/pinned bone is
assigned to.

This overview was originally there, showing the armature layers and the
bone group. This is now replaced by a list of the bone's collections. The
only possible interaction is unassigning the bone & toggling visibility
of the bone collections.
2023-09-28 15:52:45 +02:00
Philipp Oeser
cd557f0636 Fix: remove non-functional choice of weightpaint mode from lattices
Lattices would give the choice of going to weightpaint mode (which would
fail immediately because of `vwpaint::mode_toggle_poll_test`) because it
was marked as a compatible mode in `ED_object_mode_compat_test`.

I dont think this was ever supported properly, why this was marked as a
compatible mode is unknown (I stopped tracing git history at
deebf4f8f0).

Even if it was at some point, weightpaint mode nowadays is totally
depended on Mesh, so seems better to just remove it from Lattices.

Pull Request: https://projects.blender.org/blender/blender/pulls/112411
2023-09-28 15:43:50 +02:00
Jeroen Bakker
c9491b395c Cleanup: Make format 2023-09-28 15:15:08 +02:00
Hans Goudey
79d0b71751 Fix #112957: Incorrect PBVH multires grid iteration
The grid was pointer was moved to the next element at every loop, which
made `vi.grid` and `vi.mask` disagree. Instead, iterate the grid before
accessing data, so the pointers agree. To avoid unrolling the first loop
iteration or adding a branch for the first iteration, start the grid at
a -1 offset.

Pull Request: https://projects.blender.org/blender/blender/pulls/113015
2023-09-28 14:56:26 +02:00
Jacques Lucke
9ad6957574 Fix #107353: array cap broken on empty mesh
The array modifier used to output the start cap even if the
mesh is empty. This behavior was unintentionally changed in
8b2556e8d8. This patch brings back the old behavior.

The use case for this was to load an evaluated mesh of one
object into another object. So it was always kind of a hack, but
there is still no good reason to change the behavior.

Nowadays, one should just use the Object Info node in Geometry
Nodes to achieve the same result.
2023-09-28 14:55:31 +02:00
Jacques Lucke
03a9425f8a Fix: crash when entering edit mode on mesh used as start/end cap 2023-09-28 14:55:31 +02:00
Sybren A. Stüvel
6d0e6f0f3e Anim: remove pose.bone_layers operator
Remove the obsolete `pose.bone_layers` operator, it's been replaced by
bone collections.
2023-09-28 14:20:24 +02:00
Aras Pranckevicius
bf23d0e53c Fix #112011: PLY export broken when mesh contains faces with >255 vertices
MPoly -> offset indices refactor (7966cd16d6) did not realize
that due to forced triangulation the mesh changes, so we need
to re-fetch the faces array after triangulating. Fixes #112011
2023-09-28 14:21:23 +03:00
Philipp Oeser
16e4eeb9c0 Text objects: make CharInfo mat_nr zero-based
For text objects, the CharInfo mat_nr material index used to start at 1
(not at zero like for meshes or nurbs).
Code was mostly considering this (but not in all places, so material
index handling (removing/moving) could still go wrong.

As an alternative to !109746 (where it was made sure all places would
make the right assumption about mat_nr starting at 1), this PR now
changes the mat_nr to be zero-based.

This is more in line with other places handling material indices.

Versioning code is in place to properly convert old files.

Fixes #109491

Pull Request: https://projects.blender.org/blender/blender/pulls/112954
2023-09-28 11:46:52 +02:00
Lukas Tönne
9e79487c4f Fix #112588: Hide node panels when all sockets are hidden
The panel state gets a new flag to indicate if content is visible.
This gets updated in the visibility pass during node drawing.

Pull Request: https://projects.blender.org/blender/blender/pulls/113003
2023-09-28 11:24:48 +02:00
Campbell Barton
fc8b1411cd Cleanup: correct struct comments & help text for batch loading utility 2023-09-28 14:28:12 +10:00
Campbell Barton
be7c8fac6d Fix #112990: save pre/post/post/fail don't run for unwritable paths
When the destination path isn't writable - the save callbacks wouldn't
run. Supporting this can be useful so handlers can unlock a file
before saving, see #88493.
2023-09-28 14:13:05 +10:00
Campbell Barton
881bb81763 UI: don't access recent-search.txt when disabled or in background mode 2023-09-28 13:42:29 +10:00
Campbell Barton
c4a67b377b Cleanup: quiet missing declaration warning 2023-09-28 12:05:47 +10:00
Campbell Barton
ffbe9add7c RNA: EnumPropertyItem values don't exceed the underlying range
When the type of an enum is known (char, short, int .. etc)
check the values used in the EnumPropertyItem are valid for that type.

This would have made the error from [0] fail at build time.

[0]: 928721c59e
2023-09-28 12:05:47 +10:00
Campbell Barton
640d49c38a RNA: set range for "uchar" type int property
This avoids the need to explicitly set inline, extract the int range
into a function (needed to support validating the RNA range for enums).
2023-09-28 12:05:47 +10:00
Campbell Barton
928721c59e Fix broken UV header caused by out-of-range value in DNA
The enum value was outside 'char' range.
2023-09-28 11:20:53 +10:00
Clément Foucault
508fa8d4b8 Fix #112963: EEVEE: Wrong specular from lights
This was caused by the wrong LUT being sampled.

This cleans-up the utilTex layer define usage
and implement the small optimization marked
as todo.
2023-09-27 23:19:18 +02:00
Hans Goudey
8e188ed55b Fix #112817: Nodes incorrectly "fully masked" after expand face sets
The expand operator reused `SCULPT_UPDATE_MASK` even when it
changed face sets, not the mask. That triggered incorrect behavior in
`node_update_mask_redraw` when there was no mask layer, which caused
nodes to be incorrectly marked as fully masked (and therefore optimized
out of later operations).
2023-09-27 17:11:35 -04:00
Hans Goudey
ca447ef542 Cleanup: Move sculpt mask update to a separate function
There's no reason to use a general "update vertex data" function,
that just confuses things.
2023-09-27 17:11:28 -04:00
Germano Cavalcante
e7a0fbdf30 Merge remote-tracking branch 'origin/blender-v4.0-release' into blender-v4.0-release 2023-09-27 18:03:33 -03:00
Germano Cavalcante
bcaac0421b Fix snap versioning error 2023-09-27 18:03:01 -03:00