Commit Graph

104380 Commits

Author SHA1 Message Date
Campbell Barton
efef0bac5f CMake: remove redundant white-space as part of multi-line strings 2023-11-04 16:41:19 +11:00
Campbell Barton
243516e1d3 Cleanup: quiet warning from missing include 2023-11-04 14:34:45 +11:00
Campbell Barton
134393e846 Cleanup: spelling in comments 2023-11-04 14:08:13 +11:00
Campbell Barton
10e7d5da84 Cleanup: remove unused variables 2023-11-04 14:08:11 +11:00
Bastien Montagne
9b0ea21a5b USD: Fix Export progress report.
This progress report was utterly broken and useless when not exporting
animations, and not great either with animation export. This commit
fixes:
* Not generating any progress report when exporting a single frame.
* Assuming actual data export covers 100% of progress.

That last point is the biggest change, now actual export (be it
animated or still) only covers 75% of the whole range. The rest is used
to cover depsgraph building and updates (which can be noticiably slow
with big scenes), stage writing, etc.

Progression is still far from linear in time, but at least it gives
better feedback on actual progress of the whole export.

Pull Request: https://projects.blender.org/blender/blender/pulls/114416
2023-11-03 18:00:45 +01:00
Aras Pranckevicius
6833202ab3 PLY: improve import of custom vertex normals
Several improvements how PLY files containing vertex normals are imported:
- When they are present on a regular mesh, the code no longer sets
  all faces as "flat" (since that makes custom normals be ignored).
- When they are present on a pure point cloud (i.e. no faces),
  custom vertex normals are added as a float3 point domain attribute
  (ref #114371).
2023-11-03 17:41:27 +02:00
Sergey Sharybin
27faf83fff Merge branch 'blender-v4.0-release' 2023-11-03 15:41:29 +01:00
Sergey Sharybin
e623d07362 Fix missing relations built for camera referenced by markers
A missing part since PR #110139: the nodes and relations builders
needs to be in-sync and build the same objects. The relations builder
was missing relations building for camera referenced by markers.

Pull Request: https://projects.blender.org/blender/blender/pulls/114443
2023-11-03 15:41:05 +01:00
Miguel Pozo
e3d4db5ded Fix: EEVEE-Next: Planar display probe shader compilation 2023-11-03 15:26:19 +01:00
Philipp Oeser
16dd73b895 Merge branch 'blender-v4.0-release' 2023-11-03 15:11:09 +01:00
Philipp Oeser
e7ad3af301 Fix #114216: crash moving "instanced" NLA strips between tracks
Code tried to move such strips (using the same action on equal IDs such
as meshes or shapekeys) between tracks multiple times [even though they
were actually moved already] which could end up with the wrong track
index and things just went downhill from there.

So now skip strips we cannot find in the original track, saves
us from the whole codepatch about "Moving strip into track in the
requested direction".

Pull Request: https://projects.blender.org/blender/blender/pulls/114458
2023-11-03 15:10:32 +01:00
Jeroen Bakker
e77cf08b02 Cleanup: Vulkan: Replace FlagBits with Flags
Vulkan API uses Flags and FlagBits for enumerations. The FlagBits
contains the options that can be hold with the Flags data type.

This wasn't well understood at the beginning of the project and
the FlagBits where used where Flags should have been used. This cleanup
fixes this, improving the readability of the code where bit
manipulations where used.

Pull Request: https://projects.blender.org/blender/blender/pulls/114459
2023-11-03 14:42:12 +01:00
Jeroen Bakker
e2215fea35 Vulkan: Specify Pipeline Stages When Adding Barriers
This PR adds support to specify pipeline stages when adding barriers.
This would make it possible more carefully specify barriers.

Pull Request: https://projects.blender.org/blender/blender/pulls/114457
2023-11-03 14:24:39 +01:00
Jeroen Bakker
2193bd4b89 Fix #114414: Drawing Artifacts Grayscale Byte Images
Single channel JPEG files are stored in 4 channels image buffers, with their
bit planes set to 8.

When creating the GPU texture the number of bit planes is used to identify
if the data could be stored as a single channel texture, but in this case
the source data contains 4 channels and doesn't align with the GPU
texture format.

In Blender 3.6 the way how bit planes were stored changed (the planes
used to be 32 for the grayscale byte images matching the number of channels,
but now is set to 8, matching the original loaded image).

Since Blender 3.5 the grayscale byte images are uploaded using a single channel
GPU format, which leads to the mentioned artifacts. Grayscale byte buffers never
seems to have worked since its introduction in
https://archive.blender.org/developer/D15484

This PR disables using the grayscale GPU textures when it sourced from
a byte image.

Pull Request: https://projects.blender.org/blender/blender/pulls/114441
2023-11-03 13:54:05 +01:00
Bastien Montagne
d6e1a6d616 Merge branch 'blender-v4.0-release' 2023-11-03 13:01:07 +01:00
Bastien Montagne
9c2164ba7c Fix #114430: UI: Blender no longer displays a warning for too new .blends
Root of the issue was that a1d7ec7139 (from !110109, new comptibility
handling) missed to update code of `handle_subversion_warning`, file
version numbers should be checked here now, not the minversion ones.

On top of that, this report has been changed to a `RPT_WARNING` instead
of a `RPT_ERROR`, and reports 'print level' for file reading was set to
`WARNING` level way too late to have any effect in existing code...
2023-11-03 12:55:29 +01:00
Christoph Lendenfeld
794565ba0d Refactor: Rename functions in animrig to remove prefix
No functional changes.

Since the following functions are now in a C++ namespace, their prefix can be removed:
* ANIM_setting_get_rna_values -> get_rna_values
* ED_action_fcurve_find -> action_fcurve_find
* ED_action_fcurve_ensure -> action_fcurve_ensure

Pull Request: https://projects.blender.org/blender/blender/pulls/114450
2023-11-03 12:03:35 +01:00
Jeroen Bakker
747ec05f69 Cleanup: Make format 2023-11-03 12:00:38 +01:00
Clément Foucault
60df70b082 EEVEE-Next: Fix empty layers utiltex
This fixes interpolating of invalid data for
very high roughness.
2023-11-03 11:54:18 +01:00
Christoph Lendenfeld
cfb50a2e2e Cleanup: Comments in animrig
No functional changes.

For all the recently moved keyframing code I did the following:
* Remove comments that just repeat what the code is doing.
* Move comments for public functions to their location in the header file.
* Make sure comments are formatted properly with a capital letter at the start and a dot at the end.

Pull Request: https://projects.blender.org/blender/blender/pulls/114448
2023-11-03 11:53:42 +01:00
Bastien Montagne
d1e732a114 FFMPEG: Cleanup: Remove storage of last FFMPEG frame read as ImBuf in anim data.
The `anim` data (e.g. of a VSE sequence) would store the last frame read from
FFMPEG as an image buffer, increasing its refcounting and preventing it
to be freed until the whole `anim` data itself gets freed.

In current code, there is no reason to keep a reference to this image
buffer in the `anim` data, so removing it. This may also give a few
percent improvement on the memory usage of the VSE in some cases.

Found while investigating #114342.

Pull Request: https://projects.blender.org/blender/blender/pulls/114395
2023-11-03 11:18:21 +01:00
Christoph Lendenfeld
0f5e7c7469 Refactor: Move fcurve functions to animrig
No functional changes.

Moving the following two functions to animrig
`ED_action_fcurve_ensure`
`ED_action_fcurve_find`

Pull Request: https://projects.blender.org/blender/blender/pulls/114445
2023-11-03 11:15:27 +01:00
Bastien Montagne
ba37c59e13 Merge branch 'blender-v4.0-release' 2023-11-03 11:04:23 +01:00
Bastien Montagne
cc6c5cb7f4 Fix #114415: USDZ conversion happens outside of main thread.
USDZ conversion currently requires to change the 'current working
directory', due to internal USD library limitations.

This can only be done from main thread (and is highly discouraged in
general). This implies that USDZ conversion cannot happen from the Job
worker thread.

This commit moves it to the `endjob` callback of the USD export job
instead, as it is guaranteed to be executed from caller thread, i.e.
main thread in this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/114420
2023-11-03 10:55:55 +01:00
Christoph Lendenfeld
5beb513be1 Refactor: move ANIM_setting_get_rna_values to animrig
No functional changes.

Moving `ANIM_setting_get_rna_values` to the animrig folder and into the `blender::animrig namespace`

Pull Request: https://projects.blender.org/blender/blender/pulls/114444
2023-11-03 10:55:10 +01:00
Iliya Katueshenock
510a5d3403 Fix: Nodes: Float draw position for sockets
Here is too many inconsistencies in used data type for coordinates.
That commit change int to float for socket draw. There is still many
node/text/other ui draw code with mix up int's and clamped floats
(to looks like int's). That fix is just small step to finally just use float.

Pull Request: https://projects.blender.org/blender/blender/pulls/114114
2023-11-03 10:36:20 +01:00
Hans Goudey
44b79af4fc Cleanup: Sculpt: Simplify face and face set iteration
This commit removes knowledge about face sets from the PBVH,
and changes iteration over faces to not depend on the PBVH face
iterator abstraction. Though this adds slightly more boilerplate to
iteration over faces, it makes the whole process more data oriented
and allows use of index-based utilities like `gather` and `scatter`
in the mesh case, and simpler iteration over BMesh faces for
dynamic topology.

Setting face sets is now specialized per PBVH type in a few places
in a similar way. The general goal is to reduce branching and function
calls at the lowest level of hot loops, and to make code more aware
of the data structures it uses, both for performance and clarity.

Since the remaining uses of the face iterator are removed,
the iterator itself is removed too.

Related commits:
- 97f2b01ea9
- 756dea7ca1
- a6a2af5fdd

Pull Request: https://projects.blender.org/blender/blender/pulls/114417
2023-11-03 10:27:38 +01:00
Philipp Oeser
9faf0bbeba Merge branch 'blender-v4.0-release' 2023-11-03 09:46:08 +01:00
Aras Pranckevicius
42ee315b60 Fix #114304: OBJ import crash when some faces have normals, and others do not
The file that reproduces this had some faces of a mesh with vertex
normals, while some other faces were without vertex normals.
The parsing code assigns INT32_MAX as a fallback of "I could not parse
the normal index as a number" case, but later on code was not
catching this "normal index might be invalid" case. Fixes #114304
2023-11-03 09:45:32 +01:00
Iliya Katueshenock
3d971feb36 Curves: Sculpt mode frame selected operator support
Implementation of Frame Selected operator for curves sculpt mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/109924
2023-11-03 09:42:56 +01:00
Philipp Oeser
0a3b44ed64 Fix #114358: Trace Image to Grease Pencil misses first frame in sequence
Off by one when it comes to setting `ImageUser` > `framenr`

Pull Request: https://projects.blender.org/blender/blender/pulls/114365
2023-11-03 09:42:41 +01:00
Hans Goudey
df4df75317 Cleanup: Simplify construction of Group ID VectorSet 2023-11-03 09:35:38 +01:00
Sergey Sharybin
783eb3f390 Merge branch 'blender-v4.0-release' 2023-11-03 09:28:36 +01:00
Sergey Sharybin
e24c7f1954 Fix #114129: Crashes on boolean operation macOS Intel
The issue crash was caused by non-safe cast from a bare C array
float[4][4] to float4x4*. Such cast is not safe because it might
break alignment.

Modified the code so that the transform matrices are passed by
value.

Technically it could mean higher memory usage, but odds that the
actual geometry which is a part of boolean operation consumes much
more memory. Additionally, avoiding indirection could potentially
lead to better performance.

Pull Request: https://projects.blender.org/blender/blender/pulls/114421
2023-11-03 09:27:59 +01:00
Hans Goudey
0ff4060cd3 Cleanup: Remove unnecessary struct keywords in sequences headers
Also remove const for non-pointer arguments which is meaningless in
the declaration, move a scene enum to the "enums.hh" header, and add
missing forward declaration of structs.
2023-11-03 09:05:31 +01:00
Aras Pranckevicius
d59c6d3e5c PLY: fix unreported crash when exporting multiple objects with different presence of vertex colors
Similar to e98cc412e, exporting PLY essentially merges all meshes into
one. And if any of them has vertex colors to export, they all
should get a fake/dummy vertex color entry.
2023-11-03 08:52:36 +02:00
Richard Antalik
21ea67f962 Merge branch 'blender-v4.0-release' 2023-11-03 02:06:08 +01:00
Richard Antalik
5d765a0d31 Fix #114342: Crash when opening too many movies at once
Adding strips or changing filepaths caused thatde movie files were loaded,
but memory was only released after new frame was rendered. Since FFmpeg
can take a lot of memory per strip, this can cause crash.

Free memory for each strip immediately after it is not needed after
these operations.

Pull Request: https://projects.blender.org/blender/blender/pulls/114381
2023-11-03 02:01:17 +01:00
Richard Antalik
4d37fb80b1 Cleanup: Convert VSE headers from .h to .hh 2023-11-03 01:33:54 +01:00
Aras Pranckevicius
e98cc412ef Fix #114346: PLY export crash with multiple objects that have different custom attributes
Custom attribute export (#114320) code did not realize that
PLY exports everything as one single "mesh" with the same vertex
data for everything. So if exporting several input meshes and they
have different vertex attributes, the result needs to have a union
of all present attributes, with fake/zero data for the ones
that were not actually present. Fixes #114346.
2023-11-02 22:58:26 +02:00
Aras Pranckevicius
afe297231d Fix #114304: OBJ import crash when some faces have normals, and others do not
The file that reproduces this had some faces of a mesh with vertex
normals, while some other faces were without vertex normals.
The parsing code assigns INT32_MAX as a fallback of "I could not parse
the normal index as a number" case, but later on code was not
catching this "normal index might be invalid" case. Fixes #114304
2023-11-02 21:35:02 +02:00
Aras Pranckevicius
539b0fd4b5 Unbreak build from missing headers 2023-11-02 21:07:04 +02:00
Clément Foucault
0684b68eb4 EEVEE-Next: Make Ambient Occlusion Pass use Horizon Scan
This adds a new way of computing occlusion using visibility bitmask. To
make it more algorithm agnostic, we name it horizon scan.
This cleans-up / simplify the code compared to the Horizon based solution.
There is no more trickery for fading influence of distant samples which
makes the result match cycles closer.

This introduces a new thickness option. Maintaining it relatively low
makes it possible to avoid over occlusion because of in front geometry.
Making it too low will cause under occlusion.

Related #112979

Pull Request: https://projects.blender.org/blender/blender/pulls/114150
2023-11-02 19:22:01 +01:00
Brecht Van Lommel
14f470cdae Merge branch 'blender-v4.0-release' into main 2023-11-02 19:02:35 +01:00
Hans Goudey
937b12e983 Fix: Missing include in previous commit 2023-11-02 18:36:21 +01:00
Hans Goudey
b8c5af45ba Fix: Use native path separator for node tools redo panel title
Use the platform dependent `SEP_STR` instead of a hardcoded back slash.
2023-11-02 18:35:35 +01:00
Falk David
91db8fc5a0 GPv3: Multi-frame editing
Adds a new scene tool setting `use_grease_pencil_multi_frame_editing`.

The `foreach_*_drawing` functions are moved to the `ed::greasepencil` namespace in the editor, since they are now context sensitive and depend on the toolsetting. They are now named `retrieve_editable_drawings` and `retrieve_visible_drawings` and return
an array of drawings instead of calling a callback function.

Pull Request: https://projects.blender.org/blender/blender/pulls/114283
2023-11-02 17:10:59 +01:00
Falk David
05d6818aa2 Fix #110038: Crash when sculpting on GP object with modifier
When trying to sculpt a Grease Pencil object with a line art modifier
(other modifiers probably also casue issues), Blender would crash.
I wasn't able to track down the exact issue but it's related to how
the update-cache stores pointers to original data.

This reverts part of e2befa425a to not make use of the update
cache while sculpting. Combined with modifiers, this approach
is just too unstable right now.

Pull Request: https://projects.blender.org/blender/blender/pulls/114410
2023-11-02 17:08:36 +01:00
Miguel Pozo
b679ea939a EEVEE-Next: Per probe viewport display
* Add viewport display support for Sphere and Plane probes.
* Make all probe display options per object instead of per scene.
  (Uses the already existing `LIGHTPROBE_FLAG_SHOW_DATA`
   and adds a new `data_display_size ` property to the `LightProbe` DNA)
* Python `show_data` property has been deprecated and renamed to
   `use_data_display` (`data_display_size ` has been exposed as well).

Pull Request: https://projects.blender.org/blender/blender/pulls/114176
2023-11-02 17:08:13 +01:00
Hans Goudey
d8f59dce26 Merge branch 'blender-v4.0-release' 2023-11-02 16:41:40 +01:00