Commit Graph

103206 Commits

Author SHA1 Message Date
Aras Pranckevicius
446ff8a321 Merge branch 'blender-v4.0-release' 2023-09-28 14:22:11 +03: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
Jason Fielder
e64db67fa5 GPU: Add platform parameter for GPU architecture
Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/112566
2023-09-28 12:49:55 +02:00
Philipp Oeser
9fcc8de68f Merge branch 'blender-v4.0-release' 2023-09-28 11:49:22 +02: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
035209fb8f Merge branch 'blender-v4.0-release' 2023-09-28 11:25:39 +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
Jeroen Bakker
ad93324580 Vulkan: Add support for Framebuffer Depth Blit
This PR adds support for `GPU_framebuffer_blit` When used with `GPU_DEPTH_BIT`.
The challenge with is that not all GPUs support using a depth texture as a blit destination.

An AMD GPU doesn't support a depth buffer with stencil buffer as blit destination.
![image](/attachments/130e7e38-2dbc-4653-950c-2234bd5bad52)
> NOTE: AMD GPUs don't support 24 bit unsigned normalized depth textures at all.

In all cases when we use depth blitting we are blitting the whole texture
and in stead we can use a texture copy.

A negative effect is that we need to unbind the framebuffer when copying
depth textures, but a positive effect is that we can use a data transfer function what should
theoretically be faster.

This should be revisited when we are investigating in areas to improve the
performance of the Vulkan backend.

Pull Request: https://projects.blender.org/blender/blender/pulls/112674
2023-09-28 10:00:24 +02:00
Jeroen Bakker
e5a33b3b2c Vulkan: Rework Initializing/Allocating Textures
When initialy adding textures it wasn't possible to allocate during
initialization as its usage wasn't known. Bot Metal and Vulkan would do
a delayed allocation adding more checks when using textures.

Recently the behavior of setting texture usage was changed and now is
known when initializing textures. This PR makes advantage of this to
give correct feedback to the calling code if the texture can be created
and remove all the delayed allocating of textures.

Pull Request: https://projects.blender.org/blender/blender/pulls/112997
2023-09-28 09:38:52 +02:00
Campbell Barton
ca9c6372c9 Merge branch 'blender-v4.0-release' 2023-09-28 14:28:56 +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
046ae0c790 Merge branch 'blender-v4.0-release' 2023-09-28 14:13:52 +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
e85a1b19e6 UI: don't access recent-search.txt when disabled or in background mode 2023-09-28 13:39:00 +10:00
Campbell Barton
35d9e71614 Merge branch 'blender-v4.0-release' 2023-09-28 12:46:57 +10:00
Campbell Barton
d37429c76a Merge branch 'blender-v4.0-release' 2023-09-28 12:46:54 +10:00
Campbell Barton
76d28ce18f Merge branch 'blender-v4.0-release' 2023-09-28 12:46:50 +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
8edd706cde Merge branch 'blender-v4.0-release' 2023-09-28 11:23:05 +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
Hans Goudey
9e5cf73b4d Cleanup: Make PBVH iter mask not a pointer
After 97f2b01ea9, the iterator's mask data is just read only,
so there's no point in storing it as a pointer. This simplifies the code
using the mask data, since the default only needs to be handled once.
2023-09-27 18:21:36 -04:00
Sergey Sharybin
f03a015049 Merge branch 'blender-v4.0-release' 2023-09-27 23:45:33 +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
Hans Goudey
406de58674 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:10:24 -04:00
Hans Goudey
a3698d0577 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:10:24 -04:00
Germano Cavalcante
a35c05d287 Merge branch 'blender-v4.0-release' into main 2023-09-27 18:04:13 -03: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
2da37d3b76 Merge branch 'main' into blender-v4.0-release 2023-09-27 16:22:08 -04: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
b373eb6024 Merge branch 'blender-v4.0-release' into main 2023-09-27 17:04:10 -03: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
Brecht Van Lommel
a0b1d31e59 Merge branch 'blender-v4.0-release' into main 2023-09-27 20:17:16 +02:00
Brecht Van Lommel
e9fb0be754 Fix clang link error after recent changes in 462010c 2023-09-27 20:15:02 +02:00
Julian Eisel
77e60a4eb6 Merge branch 'blender-v4.0-release' 2023-09-27 19:56:07 +02:00
Julian Eisel
5017767e11 Fix tools header background aligns wrong if region is flipped to bottom
The region background draws rounded corner so it looks more or less like
a tab coming out of the region above/below. So this needs to change
together with the region alignment.
2023-09-27 19:55:11 +02:00
Hans Goudey
db9ad9f139 Merge branch 'blender-v4.0-release' 2023-09-27 13:51:40 -04:00
Hans Goudey
7449f0e14c Fix #109599: Setting custom normals can skip marking some edges sharp
Caused by a subtle logic change in 17d161f565 and follow ups.

Because they used to be stored in a singly-linked list, the old storage
for `corners_by_space` was backwards compared to the order each corner
was discovered in `split_loop_nor_fan_do`. I don't fully understand how
yet, but the logic when setting edges sharp based on divergence between
neighboring corner normals in a space relied on the iteration direction,
so as a fix, just iterate backwards over the corners in each space.
2023-09-27 13:47:25 -04:00
Hans Goudey
8774b20477 Fix #112961: Crash marking Collection as an Asset
An ID type's asset type info may be null.
2023-09-27 13:47:10 -04:00
Brecht Van Lommel
488469e7c5 Fix excessive padding at bottom of nodes with panels
After refactoring in 2f1b8f59e3.
2023-09-27 19:05:41 +02:00
Brecht Van Lommel
ea3814c3ed Fix subsurface scattering radius UI being unnecessarily compact
Now that this is in a panel this can take up more space.
2023-09-27 19:05:41 +02:00
Iliya Katueshenock
462010c61a Fix #112439: Don't allow hiding sockets of Reroute node
Reroute node consists only of a socket, it has no body.
Don't allow hiding sockets of reroutes anymore, since it could make the
node invisible or prevent links from being connected to it.

The versioning ensures that the sockets on reroute nodes are not hidden.

Pull Request: https://projects.blender.org/blender/blender/pulls/112965
2023-09-27 18:42:46 +02:00