Commit Graph

128473 Commits

Author SHA1 Message Date
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
007cea4653 Anim: rename the 'Skeleton' panel to 'Pose'
In the Armature properties, rename the 'Skeleton' panel to 'Pose'. This
panel used to house the armature layers, but they have been transformed
into bone collections, which have their own panel. Also the term 'skeleton'
is not used in Blender, so having that as title here felt out of place.

There are some ideas to introduce different 'poses', to disconnect the
mesh binding pose from the animation reference pose. This rename sets
things up for exposing such functionality.
2023-09-28 16:32:02 +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
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
deebf4f8f0d7).

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
f2bda4ab3a Anim: move 'solo bone collection' operator to menu and add 'show all'
Move operators that act on the active bone collection to a 'specials'
context menu, just like other UILists.

The menu now contains:
- Solo the active bone collection (i.e. make it visible and hide others).
- Show all bone collections.
2023-09-28 14:38:54 +02:00
85b62251a6 Lattice: avoid error when drawing properties panel
Avoid an error when drawing the Lattice properties panel. The code for
drawing mesh attributes warnings didn't account for the fact that lattices
also have vertex groups, and thus that particular code can be called
without an active mesh.
2023-09-28 14:20:24 +02:00
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
2d04919a82 Anim: Add operator to 'solo' the active bone collection
With armature layers it was possible to, with one click, show a single
layer and hide all the others. This is now possible with bone collections
as well.

For that I added a new operator `armature.bone_collection_solo_visibility`,
with a button next to the list of bone collections. The icon is
`SOLO_ON`, which is also used in the NLA.
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 (7966cd16d6dc4) 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
1930ebdb4f Anim: add operator to sync bone colors between selected bones
Blender's "Copy to Selected" feature only copies single properties, while
bone colors consist of four properties (palette + 3 custom colors). These
can now be copied with a single click.
2023-09-28 11:21:02 +02:00
4473bdc6ab Anim: bone color properties panel layout tweaks
More consistent layout for bone colors. The custom colors and regular
colors now have the layout in the UI.
2023-09-28 11:19:53 +02:00
Campbell Barton
afeb3e7784 Fix #112761: Sequencer tweak tool does not box-select
Clicking and dragging over and empty space wasn't box selecting.
2023-09-28 16:42:50 +10:00
Campbell Barton
fc8b1411cd Cleanup: correct struct comments & help text for batch loading utility 2023-09-28 14:28:12 +10:00
Campbell Barton
d4f1a9b0ad Build: resolve build error on MSVC
Address error introduced by [0].

[0]: 6b967287c964e4deb9755d35f37998ba9ff06c34
2023-09-28 14:23:11 +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
62238464d8 Cleanup: format 2023-09-28 12:53:18 +10:00
Julien Kaspar
fa27e6561e Keymap: restore most used brush shortcuts
Based on feedback from users this PR brings back the most commonly used
brush shortcuts in sculpt mode. Essentially reverting some of the
changes from #108712

There are multiple reasons behind this decision:

- Anyone coming from a previous version will instinctively reassign the
  brush shortcuts to the same keys as before, introducing shortcut
  conflicts as a result. Having the shortcuts there by default makes this
  case less likely as it makes available brush shortcuts more obvious.
- The default `paint.brush_select` operator is hard to set up manually
  and is offering behavior that isn't available with the
  `wm.tool_set_by_id` which is far easier to create from the UI
- There are too many brushes available to know which ones are the most
  common ones.

There are some additional changes:
- `S` is now used for the Smooth brush.
- Draw brush is now assigned to `V` to avoid conflicts on `X`.
- `Shift T` is using the Scrape instead of Flatten brush.
- `C` is using the Clay Strip instead of Clay brush.

Removing the brush shortcuts can be revisited later once the brush
management is overhauled.

Ref !112898.
2023-09-28 12:52:49 +10:00
Julien Kaspar
a3d0006ac1 Keymap: IC, minor adjustments based on user requests
Some small adjustments based on user requests from the community.

- The shortcut on 4 for Object Mode was much preferred.
  As a compromise the mode pie menu moved to 5.
- The region selection shortcut from the default keymap was not added.
  It's now available on Ctrl Shift Alt LMB.

Ref !112628.
2023-09-28 12:52:47 +10:00
Julien Kaspar
a0e5b03126 Keymap: IC, regions shortcuts and fixed inconsistencies
This is a followup fixes related to #105298

This PR adds shortcuts to toggle the sidebar, toolbar, channels and
other regions across various editors with the Ctrl-LeftBracket &
Ctrl-RightBracket shortcuts.

An additional shortcut to toggle the Asset Shelf in the 3D Viewport via
Shift Spacebar was also added. This shortcut will be important for
various workflows in the future.

To avoid shortcut conflicts and improve consistency, Ctrl-L is now
consistently being used for select_linked operations.

Ref !112042.
2023-09-28 12:52:46 +10:00
Campbell Barton
6b967287c9 MEM_guarded_alloc: restore execinfo.h back-trace on Linux/Apple
Recently [0] replaced back-traces from `execinfo.h` with ASAN's
`__asan_describe_address` since the linking options to hide symbols
cause the stack-traces only to include addresses (without functions).
Although using ASAN makes sense when enabled, in my tests the
stack-traces are sometimes empty. Using CMAKE_BUILD_TYPE=RelWithDebInfo
for e.g. wasn't showing a stack-trace for the leak fixed in [1].

A utility is now included to conveniently expand the addresses from
these stack traces (`tools/utils/addr2line_backtrace.py`).

Restore support for the execinfo stack-trace reporting, used when ASAN
is disabled.

[0]: 2e79ca320557073ccf00f021dca988be6f361acd
[1]: a9f0d19197e83ae6be7c1ccc71770361be16f742
2023-09-28 12:45:04 +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]: 928721c59eb01ede39f97946cb8a9606c0e62fb3
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
Ray Molenkamp
751c9ef620 CMake/MSVC: Fix build error for RelWithDebInfo configuration
CMake decided to link the Debug libs for MaterialX because no specific
RelWithDebInfo configuration was provided, strange default imho but
not difficult to fix.
2023-09-27 18:03:16 -06:00
Harley Acheson
13f5879e3c UI: Splash Screen Changes
Updated splash screen with different options depending on whether the
user is new or upgrading. Simplifies the process for new users and
makes the choices more distinct when upgrading. Returning users also
get a link to "What's New".

Pull Request: https://projects.blender.org/blender/blender/pulls/111123
2023-09-28 01:25:46 +02:00
Hans Goudey
1badb464b0 Fix: Compile error from unused module requested in CMake
The `clangSupport` module isn't provided in the precompiled
libraries anymore, and Blender compiles without it.

Pull Request: https://projects.blender.org/blender/blender/pulls/112981
2023-09-27 23:58:03 +02:00
Francesco Siddi
e0fe8d4698 Fix AppIcon on macOS
The 128x128 version presented some resizing artifacts. It has now
been re-done specifically for that resolution. This icon is only
visible in non-retina displays.

Pull Request: https://projects.blender.org/blender/blender/pulls/112807
2023-09-27 23:45:10 +02: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
Hans Goudey
2ec192a54a Fix: Extra menu separator with node tools in nested menus 2023-09-27 16:14:49 -04:00
Hans Goudey
772061d57f Fix: Missing node group name in non-asset node tool redo panel
We need to store the name as an operator property for this case.
2023-09-27 16:14:49 -04:00
Germano Cavalcante
fb556c75df Snap: New icons
For Blender 4.0 we decided to support individual icons for different
snap elements.

This was originally contributed by Erik Abrahamsson as !107054 with
some contributions by myself (Germano).

This set of icons being simple geometric symbols, that should be
familiar to CAD artists.

Note that Face and Volume share the same icon (circle). This is
deliberate since they communicate a similar functionality - are not
aimed at precision snapping the same way the vertex or perpendicular
are.

Also note that later we should also try to change the icons shown in
the snap menu to match the symbols that the artists see in the preview
window.

———

On the decision process:

The version currently in main (and rolled back here) was an initial
attempt of aggregating more information to the icons (e.g., by aligning
the icons to the target edges) while making them more suitable to
Blender. After presenting both options to (parts of the) community,
there was nothing fundamentally broken found with either option, though
options diverged over personal preference.

With that in mind, in the latest UI module meeting it was agreed to use
the original proposal then.

This final call was proposed by Dalai Felinto on his role of
commissioner (stakeholder) for the snap polishing tasks (#73993) and
designer for the related Snap Base design #66484.

———

This commit reverts commit 9c2e768f5b.

The reverted icons (referred originally as minimalistic icons) may be
proposed later as a separate theme option.
2023-09-27 16:59:16 -03:00
Hans Goudey
dfa55f036e Fix: Assert requesting vertex group for unsupported object type
Opening the "Heist" 3.4 splash screen would trigget an assert
in `BKE_id_defgroup_list_get`.
2023-09-27 15:33:34 -04:00
Damien Picard
1dfbc1ef83 UI: fix and improve a few messages
- "Tapping Alt...": remove newline in tooltip.
- Add descriptions for the From Left and From Right of the Shear
  Keyframes operator's direction items, instead of just "foo":
  - "Shear the keys using the left key as reference", and
  - "Shear the keys using the right key as reference".
- "Affects the value" -> "Affect", use the imperative.
- "Increase or decrease the value of selected keys \n
  in relationship to their average"
  -> "Scale selected key values by their combined average":
  remove the newline and rephrase the unclear description. New
  description by Harley Acheson.
- "Redefine equalizer graphs": this is an operator name, it should be
  title case.
- "USD Skeleton Import" warning: inconsistent whitespace.
- "%s: Joint weights and joint indices size mismatch size mismatch for
  prim %s": remove duplicated "size mismatch".
- "USD export:  couldn't copy texture tile from %s to %s": remove
  duplicate whitespace, change "couldn't" to "could not" to respect
  the style guide.
- "Temp. Diff." -> expand the abbreviation to "Temperature Difference"
- "Registering node tree class:" do not use formatting just to reduce
  redundancy in a few messages, but write it explicitly each time.
  This is more legible, and much better for translations.
- "Absolute time alignment while translating" -> "Absolute time
  alignment when transforming keyframes" because this applies to all
  transforms, not translation only.
- "# characters defines the [...] length of frame numbers" ->
  "define" (typo), "padding" is more specific than length.

Pull Request: https://projects.blender.org/blender/blender/pulls/112975
2023-09-27 21:29:02 +02:00
Alaska
c8365bb217 Fix #103284: Cycles uses sampling pattern from debug UI
The sampling pattern is only a debug setting at this point
and should not be used without the debug UI enabled where
users can actually see and edit the value.

Pull Request: https://projects.blender.org/blender/blender/pulls/112606
2023-09-27 20:31:14 +02:00