Commit Graph

129827 Commits

Author SHA1 Message Date
Julian Eisel
1ef36fffc2 Merge branch 'blender-v4.0-release' 2023-10-31 15:00:21 +01:00
Julian Eisel
af363a6ba2 Fix asset shelf can't resized by dragging header edge anymore
Regression from 7ec7dac860 (I assume). While the block active state is
relevant during drawing to avoid glitches, it should be ignored during
handling. Explained further in comment.
2023-10-31 14:59:45 +01:00
Christoph Lendenfeld
fef222efc3 Fix: NLA mapping not taken into account when framing FCurves
The functionality to frame channels in the Graph Editor
did not take into account any NLA mapping, causing the
viewport to frame the wrong part.

Fix it by mapping the `rctf` x-values

I had to remove the `const` on a parameter from the function
since `ANIM_nla_mapping_get` doesn't take a `const`.

Pull Request: https://projects.blender.org/blender/blender/pulls/114325
2023-10-31 14:52:45 +01:00
Michael Kowalski
1e7f5b1e61 USD: fix cache reader open error handling.
This commit fixes error handling logic implemented in #113524.

- No longer calling WM_reportf, which is not thread safe.
- Freeing the reader before returning early.

Pull Request: https://projects.blender.org/blender/blender/pulls/114298
2023-10-31 14:50:47 +01:00
Aras Pranckevicius
0eb6aef3b0 PLY: import/export custom vertex attributes (#108948)
Implements #108948 - support for custom point domain attributes for PLY
import and export. Notes:

- Custom attributes are always represented as scalar floats. PLY itself
  has some data types that blender can't fully represent, e.g. double or
  uint32, or some that fit into a float just fine but blender does not have
  them as separate types (e.g. int16).
- When importing, any PLY vertex attribute that is not one of "standard"
  names (position, normal, etc.) gets turned into a custom attribute.
- For exporting, more complex custom attributes (e.g. 2D/3D floats,
  quaternions, colors) get turned into several PLY attributes, with "_x"
  like suffix.

Custom attribute import/export is on by default in the UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/114320
Reviewed By: Hans Goudey
2023-10-31 14:07:51 +01:00
Jacques Lucke
874029fd5c Geometry Nodes: don't show Layer domain unless grease pencil 3 is enabled 2023-10-31 14:04:03 +01:00
Jacques Lucke
4ab960b5a4 Merge branch 'blender-v4.0-release' 2023-10-31 13:47:00 +01:00
Jacques Lucke
c29857fffa Fix #113532: geometry nodes is always reevaluated after undo
The issue was that the undo system detected that node trees have been changed
even though they have not. This is because the memory dump of the node tree
changed after unrelated changes. The root issue was that
`bNodeTreeInterface::write` also wrote the struct, and the pointer of the
`bNodeTreeInterface` itself. While this pointer is generally stable, it is not
during file-write, because when IDs are written, a shallow copy is created
first (see `BLO_write_init_id_buffer_from_id`). The temporary buffer for this
shallow copy is allocated on the heap, so its pointer may change over time.

The fix is to simply not write the `bNodeTreeInterface` separately, since it's
already embedded in `bNodeTree`.

Pull Request: https://projects.blender.org/blender/blender/pulls/114322
2023-10-31 13:46:31 +01:00
Jacques Lucke
245da40f81 Fix #114251: Angle input of Compare node disconnected on reload
The issue was that `Angle` also starts with an `A`, just like the input
that is supposed to be handled by this compatibility code.
2023-10-31 13:44:09 +01:00
Jeroen Bakker
17bff13836 Vulkan: Replace Stencil Test Not Working
`GPU_STENCIL_OP_REPLACE` was different compared with OpenGL. This PR
sets the same operations that OpenGL uses.

Pull Request: https://projects.blender.org/blender/blender/pulls/114314
2023-10-31 13:41:15 +01:00
Pablo Vazquez
f9928a0f56 Merge branch 'blender-v4.0-release'
# Conflicts:
#	source/blender/blenkernel/BKE_blender_version.h
2023-10-31 13:09:51 +01:00
Pablo Vazquez
86ccbc4353 Fix #113683: Wrong colors in UIList items after importing 3.6 theme
Theme changes for active/hover elements in 4.0 were missing versioning.
2023-10-31 13:07:54 +01:00
Pablo Vazquez
fd1a5b52c1 Theme: do not mark pulldown menus as active on hover
Match the color of regular menu items on hover.

Do versioning comes right after since it's needed for another bug.
2023-10-31 13:04:59 +01:00
Jeroen Bakker
0dbc13529b Cleanup: Remove Debug Statement
In vulkan texturing code.
2023-10-31 11:57:52 +01:00
Bastien Montagne
89bd460a7f Merge branch 'blender-v4.0-release' 2023-10-31 11:57:00 +01:00
Bastien Montagne
46c180015a Fix #114134: Make Local (All) operator is crashing Blender with Library Override.
Dummy mistake in own a238ab737b, forgot to do a NULL check...
2023-10-31 11:56:18 +01:00
Campbell Barton
5e19245dee Merge branch 'blender-v4.0-release' 2023-10-31 21:49:38 +11:00
Campbell Barton
acc06592fe Merge branch 'blender-v4.0-release' 2023-10-31 21:49:35 +11:00
Campbell Barton
17d372750b Merge branch 'blender-v4.0-release' 2023-10-31 21:49:33 +11:00
Campbell Barton
ab41558186 Fix #113881: Sculpt Curves: R shortcut conflict
The "Curves" key-map poll function now only works in edit-mode.

Ref !114297.
2023-10-31 21:48:30 +11:00
Campbell Barton
592345631a Docs: improve wording for bpy.app.driver_namespace 2023-10-31 21:48:30 +11:00
Jeroen Bakker
f665680024 Vulkan: Mipmap Generation Pipeline Barriers
This PR replaces submissions with pipeline barriers when generating
mipmaps. This would reduce the amount of submissions and improve
performance during mipmap generation as dependencies will be tracked
between commands.

Pull Request: https://projects.blender.org/blender/blender/pulls/114306
2023-10-31 11:46:07 +01:00
Julian Eisel
7c739ad560 Fix #114287: Drawing in post-view draw handlers broken
Mistake in 4d668e6825. `draw_seq_strips()` would use
`UI_view2d_view_orthoSpecial()` to only scale drawing horizontally, but didn't
reset the matrix state for normal view-space drawing. Result is that the
preview range drawing would be broken, and so were add-ons using the
`POST_VIEW` draw callback.

Pull Request: https://projects.blender.org/blender/blender/pulls/114285
2023-10-31 11:41:47 +01:00
Campbell Barton
f60d1b3537 Merge branch 'blender-v4.0-release' 2023-10-31 21:36:37 +11:00
Campbell Barton
3d3b8ae736 Merge branch 'blender-v4.0-release' 2023-10-31 21:36:34 +11:00
Campbell Barton
ea86a77bc5 Docs: add notes on populating bpy.app.driver_namespace
Address issues raised by #114155.

Also fix sphinx documentation generation using incorrect identifiers
when looking up references from PyStruct types
(was looking for `bpy.app.bpy.app.driver_namespace.py`).
2023-10-31 21:34:32 +11:00
casey bianco-davis
c57fe9a6e0 Curves: Add radius transform mode to edit mode
This adds the radius control operator and active tool
to curves edit mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/114017
2023-10-31 11:33:32 +01:00
Michael Jones
f2bb4c617f Cycles: Apple M3 tuning including hardware raytracing
This PR adds tunings for the [newly announced](https://www.youtube.com/watch?v=ctkW3V0Mh-k) M3 family of chips. In particular, MetalRT will be enabled as the automatic default for intersection testing on M3 and beyond to take advantage of hardware raytracing. This will result in significant path-tracing speedups, as well as faster BVH builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/114296
2023-10-31 11:14:16 +01:00
Sietse Brouwer
faeb9e7775 Fix: missing attribute finish() in curves selection code
Fixes a missing attribute `finish()` in the curves selection code.

Pull Request: https://projects.blender.org/blender/blender/pulls/114147
2023-10-31 10:31:50 +01:00
Jeroen Bakker
e7148fc28e Vulkan: Enable Optional Vulkan 12 Features
`shaderOutputLayer` and `shaderOutputViewportIndex` are optional in
Blender, but when used they should be activated on physical device level.
This wasn't the case and when used the validation layer reported an error.

This PR activates the features when creating the device if the features
are available.

Pull Request: https://projects.blender.org/blender/blender/pulls/114303
2023-10-31 08:37:31 +01:00
Campbell Barton
6cc0d10d5f Merge branch 'blender-v4.0-release' 2023-10-31 16:26:53 +11:00
Julien Kaspar
ef0b7337a6 Fix #113920: Missing IC shortcuts
Add various shortcuts that were missing from the industry compatible
key-map. Various grease pencil shortcuts that were intended to be there
are now present.

These issues are now fixed:
- `Alt A` = Missing from GP sculpt mode.
- `Shift S` = Missing.
- `Shift Alt S` = Insert Blank Keyframe - Not added to Edit mode.
- `Y` = Active Layer Menu - Not added to Edit mode.
- `Shift Y` = Merge Down - Does not exist.
- `Shift Backspace/Delete` = Delete All Active Frames is missing from
  every mode except Draw.
- `Backspace/Delete` = Delete Menu is missing from all modes except
  Edit.
2023-10-31 16:01:04 +11:00
Lukas Stockner
d15013b583 Merge branch 'blender-v4.0-release' 2023-10-31 05:48:58 +01:00
Campbell Barton
4bec9d0d71 Fix #114282: Extrude to Cursor tool no longer tweaks on drag
Regression in [0] which only ran drag events if the press event passed
through.

Resolve using the same logic as select picking
(see: WM_operator_flag_only_pass_through_on_press).

[0]: 4d0f846b93
2023-10-31 14:55:12 +11:00
Alaska
a15f9e49ec Shader: Only clamp undefined or unsupported inputs of Principled BSDF
Adjust clamping of inputs in the Principled BSDF to avoid errors and
inconsistencies between render engines, while trying to leave as many
inputs as possible unclamped for artisitc purposes.

Pull Request: https://projects.blender.org/blender/blender/pulls/112895
2023-10-31 03:14:04 +01:00
Campbell Barton
67b078aa6f Merge branch 'blender-v4.0-release' 2023-10-31 10:45:28 +11:00
Campbell Barton
0e8e8fa462 CMake: mark WITH_COMPILER_ASAN_EXTERN as advanced, quiet warning 2023-10-31 10:42:06 +11:00
Campbell Barton
b27ff093ca Build: resolve error configuring FFMPEG on Linux
Configure failed to find vorbis & vorbisenc on Linux with the errors:

ERROR: vorbis not found using pkg-config
ERROR: vorbisenc not found using pkg-config

the issue was caused by configures test program failing to link the test
code against the static library because functions in libm weren't found.

Resolve by adding `$libm_extralibs` to libvorbis.

Note that it's strange this issue didn't come up before,
since it occurs on a clean build it seems necessary.
2023-10-31 10:38:49 +11:00
Iliya Katueshenock
dca2490689 Fix #114240: Initialize output alpha for RGB color
Pull Request: https://projects.blender.org/blender/blender/pulls/114270
2023-10-30 22:19:58 +01:00
Brecht Van Lommel
4d244bb86d Merge branch 'blender-v4.0-release' 2023-10-30 21:50:35 +01:00
Brecht Van Lommel
39107b3133 Revert changes from main commits that were merged into blender-v4.0-release
The last good commit was 8474716abb.

After this commits from main were pushed to blender-v4.0-release. These are
being reverted.

Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
2023-10-30 21:40:35 +01:00
Thomas Barlow
adc79ac8d8 PyAPI: Enable MeshPolygon.loop_start raw array access
This patch replaces MeshPolygon.loop_start's use of
RNA_def_property_int_funcs with RNA_def_property_int_sdna to enable raw
array access.

RNA_def_property_int_funcs disables the PROP_INTERN_RAW_ACCESS flag,
which forces rna_raw_access to fall back to its slower loop when using
bpy_prop_collection.foreach_get/foreach_set from Python.

Because MeshPolygon uses the MIntProperty struct and loop_start accesses
the "i" field of MIntProperty directly, it can use
RNA_def_property_int_sdna like other props that directly access the "i"
field of a StructRNA using the MIntProperty struct.

This then speeds up the Python API bpy_prop_collection.foreach_get/
foreach_set access of MeshPolygon.loop_total to the same speeds as
generic int attributes.

Given a mesh with 98304 faces:

foreach_get with a compatible buffer object:
- Face int attribute: ~0.23ms
- MeshPolygon.loop_start (before): ~1.8ms
- MeshPolygon.loop_start (after): ~0.23ms

foreach_get with a Python list:
- Face int attribute: ~2.2ms
- MeshPolygon.loop_start (before): ~3.4ms
- MeshPolygon.loop_start (after): ~2.2ms

foreach_set with a compatible buffer object:
- Face int attribute: ~0.25ms
- MeshPolygon.loop_start (before): ~2.3ms
- MeshPolygon.loop_start (after): ~0.25ms

foreach_set with a Python list:
- Face int attribute: ~1.1ms
- MeshPolygon.loop_start (before): ~3.1ms
- MeshPolygon.loop_start (after): ~1.1ms

Pull Request: https://projects.blender.org/blender/blender/pulls/114262
2023-10-30 21:03:34 +01:00
Julian Eisel
b659595ab2 Merge remote-tracking branch 'origin/blender-v4.0-release' 2023-10-30 20:26:09 +01:00
Clément Foucault
b26f176d1a Fix #114096: Workbench: Broken thumbnail shadows on Mac
This is the same as 5d06632565
but ported to the no-geometry shader version.

However the rendering is still broken for another reason.
See #114286.
2023-10-30 19:46:09 +01:00
Miguel Pozo
2fc17f5afc FIx: Workbench: Shadow debug mode 2023-10-30 19:15:31 +01:00
Julian Eisel
6e160b9054 Merge branch 'blender-v4.0-release' 2023-10-30 18:20:21 +01:00
Julian Eisel
2e1244f3cf Fix resizing asset shelf header edge not working without region overlap
If region overlap was disabled, the full background of the asset shelf
header would be drawn, unlike usually where we keep the space between
button sections transparent. But resizing the region by dragging wasn't
possible from the space between the button sections, even though the
header was fully opaque.

Button section drawing should only be respected when region overlap is
enabled.
2023-10-30 18:19:08 +01:00
Brecht Van Lommel
931c176b06 Merge branch 'blender-v4.0-release' into main 2023-10-30 18:09:42 +01:00
Brecht Van Lommel
9b2deb37a0 Fix Cycles render not stopping on OpenImageDenoise error
Stop so that render farms do not save an image that failed to be denoised
properly and assume it is correct.
2023-10-30 18:08:34 +01:00
Brecht Van Lommel
10645237e8 Cycles: change default Principled Hair BSDF back to Chiang
The Huang model has issues with fireflies in various scenes, and the
defualt choice is somewhat arbitrary anyway as they have both pros and
cons. For now be conservative and keep the default the same as before.
2023-10-30 18:08:34 +01:00