Commit Graph

120055 Commits

Author SHA1 Message Date
Iliya Katueshenock
e6a0b4404c Fix #110415: Crash with single point curves in Interpolate Curves node
Single point curves should be handled separately, because they don't
have any curve segments.

Pull Request: https://projects.blender.org/blender/blender/pulls/110477
2023-10-19 10:41:33 +02:00
Hans Goudey
9a458314f2 Cleanup: Use proper case for "uv_phi" class name 2023-10-19 10:37:04 +02:00
Hans Goudey
aa34e2f2aa Cleanup: Remove unnecessary namespace specification 2023-10-19 10:37:04 +02:00
Sergey Sharybin
aa8c97faeb Cleanup: Fix -Wpessimizing-move warning in curve trim
Pull Request: https://projects.blender.org/blender/blender/pulls/113923
2023-10-19 10:26:39 +02:00
Sergey Sharybin
8c0446981d Cleanup: Fix -Wformat in playanim
Depending on compiler and bitness, size_t and uint64_t can be different
types. Since uint64_t format is used explicitly cast size_t to uint64_t
to solve compiler warning.

Happens with Clang 15 on macOS.
2023-10-19 10:26:38 +02:00
Hans Goudey
a5eaf6698a Geometry Nodes: Optimize joining of instances
Restore lost performance from removing `reserve` in ff4d5b6f04
in a better way. First build offsets so we know where in the result the
source data should go, then copy the data in parallel.

Joining geometries containing 1 million instances each took 194 ms
before the change and only 15.6 ms afterwards.

Pull Request: https://projects.blender.org/blender/blender/pulls/113886
2023-10-19 10:23:59 +02:00
Hans Goudey
564c25291f Merge branch 'blender-v4.0-release' 2023-10-19 10:03:59 +02:00
Hans Goudey
f6d45d248c Fix #113894: Node tool crash with deleted group output node 2023-10-19 10:02:30 +02:00
Campbell Barton
e7e4e63313 Cleanup: spelling in comments, white-space in comments 2023-10-19 18:53:16 +11:00
Campbell Barton
4a813ba5af Cleanup: simplify checks for IME event types
Use a separate block for IME start/event/end for clarity.
2023-10-19 18:01:40 +11:00
Campbell Barton
a6e3cfce79 Cleanup: quiet clang-tidy warnings & use snake case for class members 2023-10-19 17:51:21 +11:00
Campbell Barton
a38a49b073 GHOST/Wayland: IME support using the text-input protocol
Tested with IBUS on GNOME 45.
Added a capabilities flag to GHOST since support for IME works on
Wayland but not on X11, so runtime detection is needed.
2023-10-19 17:29:32 +11:00
Jeroen Bakker
4830521a31 Cleanup: Make format 2023-10-19 08:05:27 +02:00
Jeroen Bakker
62f721467b Merge branch 'blender-v4.0-release' 2023-10-19 08:03:51 +02:00
Jason Fielder
62219f8da9 Metal: Re-enable workbench NEXT shadows
With the shift to GPU-driven rendering pipeline,
the SSBO vertex fetch paradigm used to
implement workbench shadows on Metal
instead of utilising the geometry shader
path no longer worked correctly.

This is because the draw submission
required vertex amplification up-front,
based on the expected output geometry
amount for a given input geometry.

This patch aims to resolve this
issue through addition of API to
enable the features within the
GPU driven pipeline.

Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113498
2023-10-19 08:01:17 +02:00
Richard Antalik
f62dde8b1f Merge branch 'blender-v4.0-release' 2023-10-19 02:10:24 +02:00
Richard Antalik
c7384ba6f3 Fix #110878 VSE duplicating first frame and offsetting rest.
Conversion from timeline frame to frame index was done by casting to
integer, which followed logic of ffmpeg seeking. However this is not
best approach in some cases - for example when FPS of scene and movie
differs by a very small amount. In this case the first frame could be
duplicated and all other frames will appear as offset by one frame.

In particular this may happen scene is set to 29.97 fps and movie is
encoded at 30000/1001 fps. A frame will still have to be duplicated, but
it should be frame where decimal of frame index crosses 0.5 to keep
audio and video in sync as best as possible.

Pull Request: https://projects.blender.org/blender/blender/pulls/113870
2023-10-19 02:08:20 +02:00
Richard Antalik
1d9519004a Merge branch 'blender-v4.0-release' 2023-10-19 02:03:36 +02:00
Richard Antalik
d4fd65ffc9 Fix issues when adding retiming key outside of strip boundary
When retiming key is added to frame before strip starts, this causes
crash on null dereference. After adding null check, this creates
retiming data, even though operation is not valid. To prevent creating
empty retiming data, `SEQ_retiming_data_ensure()` is only executed, when
operator actually adds a keyframe.
2023-10-19 02:02:52 +02:00
kosarev
f9a36b1548 blenloader: Refactor the write wrappers.
- Decouple the compressing and non-compressing wrappers.

- Turn the open(), close() and write() callbacks into proper virtual methods.

- Change the write() interface to take a void pointer and return
  a bool to simplify its use.

- Eliminate the need for explicit initialization of the wrappers' fields.

Co-authored-by: Ivan Kosarev <mail@ivankosarev.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113071
2023-10-19 01:54:00 +02:00
Iliya Katueshenock
4a5bfb273f Geometry Nodes: Avoid corner domain for Blur Attribute viewing
Face Corner is not supported.
In case prefer domain is used, face corner shouldn't be proposed.
This will make the viewer node preview the values on the point
domain instead in the viewport.

Pull Request: https://projects.blender.org/blender/blender/pulls/113905
2023-10-18 20:11:47 +02:00
Hans Goudey
86bf9b1163 Cleanup: Remove disabled PBVH BMesh code
The large amount of disabled code makes this area trickier to deal with,
and this particular code wasn't helpful to the reader anyway.
2023-10-18 19:40:32 +02:00
Harley Acheson
96c7cac549 UI: Modifier Property Icons
Add icons to some Modifier properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/113793
2023-10-18 18:59:11 +02:00
Hans Goudey
062169698a Cleanup: Use C++ types instead of BLI_buffer in pbvh_bmesh.cc 2023-10-18 18:54:34 +02:00
Hans Goudey
45478706b8 Cleanup: Comment style, reduce variable scope in pbvh_bmesh.cc
Just superfical cleanups to make working int his file more pleasant.
2023-10-18 18:54:34 +02:00
Miguel Pozo
fc1ee65104 EEVEE-Next: Skip bake if there's not enough VRAM
* Skip the bake if there's not enough GPU memory to allocate all the
   required resources.
* Print bake messages to the command line.

Pull Request: https://projects.blender.org/blender/blender/pulls/113509
2023-10-18 18:49:21 +02:00
Pablo Vazquez
f0e812d3d8 UI: Use single column layout on Tangent node
The layout inside nodes is usually a column, not split rows,
since nodes are narrow and read top-down.

Pull Request: https://projects.blender.org/blender/blender/pulls/113902
2023-10-18 18:37:25 +02:00
Jason Fielder
19765a1f99 GPU: Ensure MTL texture tests are passing and add 1D/3D texture tests
Changes to ensure all supported texture tests are passing with the
Metal backend and add additional tests to cover texture_3d and
texture 1d test cases.

Authored by Apple: Michael Parkin-White

Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113889
2023-10-18 18:03:00 +02:00
Brecht Van Lommel
f7dfde9e73 Fix build error when not using unity build 2023-10-18 17:59:51 +02:00
Clément Foucault
5d1489c61d GL: Allow clearing of 3D texture using the framebuffer workaround
There was no actual issue when binding the whole texture as
layers. Cleanup the implementation and remove the assert.

Pull Request: https://projects.blender.org/blender/blender/pulls/113897
2023-10-18 17:56:38 +02:00
Hans Goudey
ba83825cfa BMesh: Add face duplication check to validation function
Check for multiple faces that use the same vertices. The implementation
uses a a Map with a Set of vertex pointers, so is not necessarily fast,
but this is just a debug check anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/113899
2023-10-18 17:32:39 +02:00
Falk David
37d2eaee4e Fix: GPv3: Crash renaming a layer
When renaming a layer to a (long) name that was already taken
by another layer, Blender would crash.
This was because the memory for the unique string was held by
`std::string` which cannot grow.
The solution is to use `char unique_name[MAX_NAME]`.
2023-10-18 17:01:25 +02:00
Brecht Van Lommel
b867f16e27 Cleanup: compiler warnings 2023-10-18 16:57:08 +02:00
Julian Eisel
236e9ee6cb Merge branch 'blender-v4.0-release' 2023-10-18 16:11:35 +02:00
Julian Eisel
f622b4ce96 Fix #113201: Assets in same folder as current file ignored in All library
Note: Initially committed as 7705e49bcd, but got reverted with
1f0520034a. Note includes fixes for unit tests.

If an asset library was pointing to the same path as the current file is saved
in, the assets from this library wouldn't be loaded. This is because the asset
library service assumed the absolute library root path is a way to uniquely
identify an asset library.

Instead, identify the asset library using both the root path and the library
type.
2023-10-18 16:10:42 +02:00
Michael Kowalski
d96b137188 Merge branch 'blender-v4.0-release' 2023-10-18 09:37:49 -04:00
Michael B Johnson
686487ca17 Fix: USD: Use color3f for color nodes
Blender was writing out color attributes on USDPreviewSurface as
float3 instead of the more accurate color3f.  While this is somewhat
technically okay, since color3f is a role alias for float3, it does cause
issues in applications that are correctly expecting color3f.

The material writer code actually expects color3f in other
sections, but was using float3 in this section erroneously.

Co-authored-by: Dhruv Govil <dgovil2@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113695
2023-10-18 14:52:06 +02:00
Hans Goudey
5b108ae522 Cleanup: Resolve clang compile warnings
Of the two overloaded functions clang chose the non-span version with
only a single item in the initializer list. Resolve that by not using an
intializer list in that case.
2023-10-18 14:23:57 +02:00
Campbell Barton
6ed3b4a5a6 Cleanup: format, quiet unused argument warning 2023-10-18 22:09:27 +11:00
Campbell Barton
3e26a1a39c Cleanup: set WITH_INPUT_IME=OFF when unsupported
This avoids having to do platform checks before checking WITH_INPUT_IME.
2023-10-18 22:04:25 +11:00
Pratik Borhade
2a5c499585 GPv3: Assign material
Assign active material to selected strokes. This is similar to legacy GP
operator `GPENCIL_OT_stroke_change_color`.
Implements #113481

Pull Request: https://projects.blender.org/blender/blender/pulls/113573
2023-10-18 12:57:57 +02:00
Bastien Montagne
c5a408f5a1 WM Jobs: Add job's own reporting mechanism.
wmJob's shared data (with their worker threads), #wmJobWorkerStatus, now
also contains a #ReportList pointer.

Job worker code is now expected to use `BKE_report` APIs to populate this
new shared reportlist, instead of calling the (absolutely) not
thread-safe `WM_reports` API. This will be tackled in later commits.

Note that since commit 9859622a66, #ReportList and `BKE_report` API
is now thread-safe, so no further handling for this is required in the
wmJob code itself.

The periodic wmJob update handling (done through timers currently)
takes care of moving reports from the job data to the WM data.

Implements #112537.

Pull Request: #113548.
2023-10-18 12:48:52 +02:00
Bastien Montagne
9727373821 WM Reports: Add public API to move reports from a ReportList to WM one.
There was already such a `wm_add_reports` function, but it was private.
It is now available in the public API, and renamed to
`WM_reports_from_reports_move`.
2023-10-18 12:48:52 +02:00
Pablo Vazquez
9f2d32c154 UI: Use proper icon for nodes with UV Maps picker
It was set to none, which draws as a dot instead of the already familiar
UV Map icon used in the UV Maps list and other places.

Affects:
* UV Map
* Tangent
* Normal Map

Following !113793 efforts to unify icons.
2023-10-18 12:36:25 +02:00
Falk David
a89bb7632a GPv3: Separate/Delete Geometry node
This implements deleting a selection of layers on a grease pencil geometry.

Pull Request: https://projects.blender.org/blender/blender/pulls/113828
2023-10-18 11:54:56 +02:00
Falk David
080823f93c Fix: GPv3: Memory leak in set_name
The `set_name` function was not freeing the previously
allocated string and would leak the memory.
2023-10-18 11:50:41 +02:00
Hans Goudey
95201c6cbf Merge branch 'blender-v4.0-release' 2023-10-18 11:32:04 +02:00
Hans Goudey
b2fe1bf624 Fix #113824: Setting curves select mode changes active attribute
Currently the active attribute is stored as an index. This should be
changed to a string, but until then, adding or removing an attribute
changes the indeices. The workaround is to store the name and fix
the active attribute after the change.
2023-10-18 11:31:34 +02:00
Falk David
bc0e5cf8bd Cleanup: GPv3: Use helper to duplicate drawings 2023-10-18 11:27:01 +02:00
Falk David
74facf9841 GPv3: Add wrapper class for DrawingReference
Adds a simple C++ wrapper so we don't have to use
`MEM_dupallocN`, `MEM_freeN` etc.
2023-10-18 11:27:01 +02:00