Commit Graph

104842 Commits

Author SHA1 Message Date
Jeroen Bakker
53ebe40ed2 Fix: EEVEE Compiler Issue Emission Shader
Due to recent changes the local variables where not explicitly cast, that failed
when compiling on Metal.

Pull Request: https://projects.blender.org/blender/blender/pulls/115463
2023-11-27 08:46:23 +01:00
Habib Gahbiche
46131a6813 Cleanup: silence warning inconsistent-missing-override
Silence warning `'call' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]`

Pull Request: https://projects.blender.org/blender/blender/pulls/115440
2023-11-27 08:01:12 +01:00
Hans Goudey
d1a3108fa2 Fix #115291: Object dimension setting ignores modifiers
The factor needs to be calculated against the evaluated bounds rather
than the bounds of the original geometry. Error in 1cbd0f5a85.
2023-11-26 23:09:29 -05:00
Hans Goudey
b022457bfe Cleanup: Use attribute propagation utility function in fillet curves
Using a shared type-agnostic attribute propagation function gives a 32
KB reduction in binary size with no observable performance difference.
2023-11-26 20:51:47 -05:00
Harley Acheson
ce5305451c Fix #115444: Revert "Refactor: Text Editor Formatted Output"
This reverts commit fe50189193.

Pull Request: https://projects.blender.org/blender/blender/pulls/115458
2023-11-27 01:41:26 +01:00
Campbell Barton
89fd0d0537 Fix uninitialized use_scene_unit for STL export 2023-11-27 10:59:54 +11:00
Campbell Barton
4e10a4f635 Cleanup: various C++ updates from C 2023-11-27 10:59:54 +11:00
Campbell Barton
1eff48a838 Cleanup: spelling in code 2023-11-27 10:55:39 +11:00
Campbell Barton
27c660707d Cleanup: spelling in comments, variables 2023-11-27 09:54:36 +11:00
Campbell Barton
e084553e88 Cleanup: add missing include 2023-11-27 09:31:37 +11:00
Campbell Barton
343b48663b Cleanup: format 2023-11-27 09:30:52 +11:00
Campbell Barton
c7ead98d4e License headers: add SPDX copyright entries 2023-11-27 09:27:52 +11:00
Iliya Katueshenock
86b1d6de34 Cleanup: formatting
Pull Request: https://projects.blender.org/blender/blender/pulls/115377
2023-11-26 14:20:41 +01:00
Habib Gahbiche
9cc038f580 Fullframe compositor: unify behavior of size inference with realtime-compositor
Make size inference consistent with the viewport compositor (from a user's perspective). This patch uses constat folding to create a constant output out of constant inputs. This is consistent with the results of the realtime compositor.

Nodes not included in this patch require further refactoring or discussion. They will be addressed in future patches.

Pull Request: https://projects.blender.org/blender/blender/pulls/114755
2023-11-26 12:14:35 +01:00
Pratik Borhade
b0cb58ca0e Fix #115368: Auto smooth node is added every time if the file has linked object
To avoid this, clear `ME_AUTOSMOOTH_LEGACY` flag once auto-smooth node is
added to object from legacy files.

Pull Request: https://projects.blender.org/blender/blender/pulls/115394
2023-11-26 07:14:44 +01:00
Ray Molenkamp
1b6cd937ff Cleanup: CMake: Modernize bf_imbuf dependencies
Pretty straightforward

- Remove any bf_imbuf paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/115425
2023-11-25 23:37:24 +01:00
Ray Molenkamp
6b70c04724 Cleanup: CMake: Modernize bf_depsgraph dependencies
Pretty straightforward

- Remove any bf_depsgraph paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/115422
2023-11-25 22:51:59 +01:00
Jacques Lucke
74dd1e044b Nodes: improve socket picking tolerances
The goal here is to make it easier to make node links. Previously, it was quite
easy to accidentally start box selection or to trigger the link-drag-search when
that was not intended.

Now, the tolerances are a bit easier to work with. Also, instead of trying to use
the first socket that is close enough, it will find the closest socket instead. It feels
much better in my testing already, but obviously the values can be tuned more
with some testing.

Also we have to make sure to not accidentally make other things like resizing
nodes harder.

Pull Request: https://projects.blender.org/blender/blender/pulls/115010
2023-11-25 15:23:31 +01:00
Germano Cavalcante
cea7b0bde8 Fix #115393: Set Snap Base not working
Caused by 07b5e1bd80

Error in the early return logic.
2023-11-25 09:49:17 -03:00
Iliya Katueshenock
361174b588 Refactor: GEO: Mesh selection header file
Share code of geometry processing of mesh selection.
For now, `mesh_copy_selection` is only user of this code,
but in #115142 this will also be used.

Pull Request: https://projects.blender.org/blender/blender/pulls/115376
2023-11-25 13:41:17 +01:00
Leon Schittek
42ddc13033 Fix #95709: Improve pulldown menu corner rounding
Improve corner rounding of menus and popup blocks.

Pull Request: https://projects.blender.org/blender/blender/pulls/111554
2023-11-24 23:55:43 +01:00
Leon Schittek
0335b6a3b7 UI: Improve menu dropshadow
Improvements to the drawing of shadows, used with blocks, menus, nodes,
etc. Improvements to shape, especially at the top corner or at extremes
of widget roundness. Allows transparent objects to have shadows. This
is a nice refactor that removes a lot of code.

Pull Request: https://projects.blender.org/blender/blender/pulls/111794
2023-11-24 22:50:20 +01:00
Harley Acheson
0370feb1bf Anim: Marker Drawing Changes
Don't draw marker line through marker. Draw Selected markers in a color
that matches selected line and text.

Pull Request: https://projects.blender.org/blender/blender/pulls/115252
2023-11-24 19:19:31 +01:00
Brecht Van Lommel
0da822e471 Refactor: improve (still unused) UV unwrap simplify code
Use vector instead of malloc, make cost function a callback, tweak names
and comments for clarity.
2023-11-24 19:13:51 +01:00
Brecht Van Lommel
c1f931a399 Cleanup: default initialize members of ParamHandle 2023-11-24 19:13:51 +01:00
RedMser
bf97bc634f Fix: remove leading space in window title
Remove leading space in window title for saved files.

Pull Request: https://projects.blender.org/blender/blender/pulls/114704
2023-11-24 18:57:09 +01:00
Ray Molenkamp
ae25298774 Cleanup: CMake: Modernize bf_blenfont dependencies
Pretty straightforward

- Remove any bf_blenfont paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/115365
2023-11-24 18:29:09 +01:00
Ray Molenkamp
b683bcc46c Cleanup: CMake: Modernize bf_intern_clog dependencies
Pretty straightforward

- Remove any bf_intern_clog paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/115323
2023-11-24 17:12:24 +01:00
Clément Foucault
b607c8677a Fix #114151: Workbench: Assert with volume and thumbnail rendering
This is caused by some path not setting the proper usage flag
on the main depth stencil texture making impossible to use
stencil view of this texture.

Make this flag mandatory for offscreen buffer fixes the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/115361
2023-11-24 16:52:21 +01:00
Bastien Montagne
ecb0d25c6f Assets: RNA: Add RNA struct for 'AssetWeakReference' data.
Note: Everything here is read-only, this is expected to be used as
testing/validating/debug info access for the time being, not as an
actual way to edit data.
2023-11-24 15:30:56 +01:00
Christoph Lendenfeld
a65cd72479 Fix: Segfault when inserting keyframes
`action_fcurve_ensure` can be passed a nullptr for
the PointerRNA, which the function didn't check for
after the refactor.
2023-11-24 15:28:20 +01:00
Bastien Montagne
9c2330d821 Assets: Cleanup/deduplicate usages of RNA enum for asset lib types.
The same data was essentially defined twice.

Pull Request: https://projects.blender.org/blender/blender/pulls/115353
2023-11-24 15:25:25 +01:00
Jeroen Bakker
ec772ed2f1 Vulkan: Timeline Semaphores
This change adds timeline semaphores to track submissions. The previous
implementation used a fence.

Timeline semaphores can be tracked in more detail as it is an counter.
For each submission the counter can be stored locally and when waiting
for completion the counter can be retrieved again and checked if is
known to be succeeded by a higher value.

The timeline semaphore is stored next to the queue and can also be used
to synchronize between multiple contexts.

Pull Request: https://projects.blender.org/blender/blender/pulls/115357
2023-11-24 15:23:46 +01:00
Jason Fielder
18f7d158fe GPU: cleanup texture view usage flags
Texture usage flag `GPU_TEXTURE_USAGE_MIP_SWIZZLE_VIEW`
was originally implemented and used too conservatively for many
cases in which the underlying API flags were not required.

Renaming to `GPU_TEXTURE_USAGE_FORMAT_VIEW` to reflect
the only essential use case for when a texture view is initialized with
a different texture format to the source texture. Texture views can
still be created without this flag when mip range or base level is
adjusted,

This flag is still required by stencil views and internally by the Metal
backend for certain feature support such as SRGB render toggling.

Patch also includes some small changes to the Metal backend to
adapt to this new compatibility and correctly capture all texture view
use-cases.

Related to #115269

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/115300
2023-11-24 15:21:00 +01:00
Bastien Montagne
e14c9552c3 Liboverride: Refactor 'refresh' tagging and handling.
Move tagging from `flush_editors_id_update` to `deg::id_tag_update`.

Since ID relationships cannot always be trusted when tagging for update
happens (can happen e.g. during liboverride apply itself, when deleting
IDs, and so on), embedded IDs are simply tagged here too, instead of
directly tagging their owner ID.

Propagation from embedded to owner ID then happens when checking and
'consuming' the `LIB_TAG_LIBOVERRIDE_AUTOREFRESH` ID tag, in
`BKE_lib_override_library_main_operations_create`.

Pull Request: https://projects.blender.org/blender/blender/pulls/115319
2023-11-24 14:51:30 +01:00
Jeroen Bakker
d09d93febf Vulkan: Store Vertex, Index and Storage Buffers on Device Memory
Currently all buffer types were stored in host memory, which is visible to the GPU as well.
This is typically slow as the data would be transferred over the PCI bus when used.

Most of the time Index and Vertex buffers are written once and read many times so it makes
more sense to locate them on the GPU. Storage buffers typically require quick access as they
are created for shading/compute purposes.

This PR will try to store vertex buffers, index buffers and storage buffers on device memory
to improve the performance.

Uniform buffers are still located on host memory as they can be uploaded during binding process.
This can (will) reset the graphics pipeline triggering draw calls using unattached resources.

In future this could be optimized further as in:
* using different pools for allocating specific buffers, with a fallback when buffers cannot be
  stored on the GPU anymore.
* store uniform buffers in device memory

Pull Request: https://projects.blender.org/blender/blender/pulls/115343
2023-11-24 13:52:48 +01:00
Clément Foucault
ab7505c7ce EEVEE-Next: Disable distant light if world contains absorption
This restrict the usage of distant light if the world shader
contains absorption phenomenon.

Why this is needed is described in #114062.

At the same time, this removes the parameter for enabling
volume light as this is now an auto-detected optimization.

This also contains a few small cleanups.

Pull Request: https://projects.blender.org/blender/blender/pulls/115284
2023-11-24 13:51:07 +01:00
Jeroen Bakker
736f446eed Vulkan: Pipeline Cache
This PR adds the default vulkan pipeline cache to when creating
pipelines.

Pipeline caching reuses pipelines that have already been created.
Pipeline creation can be somewhat costly - it has to compile the
shaders at creation time for example.

The cache is recreated at each run of Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/115346
2023-11-24 13:28:09 +01:00
Jeroen Bakker
c0cb39e41b Vulkan: Enable Tests Not Relying on a Context
Some test cases inside the vulkan backend don't rely on an initialized
Vulkan Context and can always be run.

This PR enables those test cases when `WITH_GTEST` and
`WITH_VULKAN_BACKEND` is on. Allowing some tests to run on the
buildbot.

Pull Request: https://projects.blender.org/blender/blender/pulls/114574
2023-11-24 13:27:41 +01:00
Christoph Lendenfeld
bb10004377 FIx: memory leak when inserting keys
The issue was that RNA_path_from_ID_to_property
returns a char * that the caller is expected to free.
But the code was storing it in a std::string
2023-11-24 13:07:09 +01:00
Christoph Lendenfeld
30b0c5b225 Fix: Inserting keys no longer sets the FCurve channel color
When pressing `I` in the viewport, the colors of the FCurve channels were no longer set correctly.

Caused by #113504

Fix by removing the flag that determined that in the first place,
and read straight from the user preferences. Then move the code
that sets the mode on the FCurve into the function that actually creates it.

For 99% of cases the code went to the user preference flag `AUTOKEY_FLAG_XYZ2RGB`
and if that was set, the `INSERTKEY_XYZ2RGB` would be set. The only case where this
was not from the user preferences was from custom keying sets.
There was an override flag for FCurve colors on custom keying sets.
I removed that with this patch since the use case is not apparent
and custom keying sets are hardly used.

Pull Request: https://projects.blender.org/blender/blender/pulls/115297
2023-11-24 13:05:10 +01:00
Christoph Lendenfeld
fc0ede2799 Refactor: Move insert_key_rna from editors to animrig
No functional changes.

The function is useful for autokeying as well, which is why
it is being moved out of the editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/115349
2023-11-24 12:56:46 +01:00
Pratik Borhade
754c168ed3 Fix: Compiler warning about unused variable
Caused by 3dc119a440
2023-11-24 17:25:04 +05:30
Jacques Lucke
20eaac747f Fix #115277: cannot create group interface for custom sockets
The problem here was that `RNA_parameter_set_lookup` was used incorrectly.
Instead of passing in the `PointerRNA`, one can pass in the value directly. If one
wanted to pass the `PointerRNA`, one would have to use `PARM_RNAPTR`, but
that's not necessary here.

Pull Request: https://projects.blender.org/blender/blender/pulls/115347
2023-11-24 12:46:55 +01:00
Bastien Montagne
43c801ed92 Cleanup: typo in rna_enum_asset_library_type_items name. 2023-11-24 11:47:38 +01:00
Iliya Katueshenock
86fb922f54 Cleanup: BLI: add assertion for uninitialized boolean in IndexMask.from_predicate
Not properly initialized booleans cause problems due to the branchless increment.

Pull Request: https://projects.blender.org/blender/blender/pulls/115338
2023-11-24 10:30:18 +01:00
Jacques Lucke
cbe0cf0bb0 Geometry Nodes: add two inputs in Index Switch by default
Having this node with only a single input is not useful.
2023-11-24 09:57:38 +01:00
Jacques Lucke
8eaf89cc41 Geometry Nodes: set soft min/max in Index Switch node 2023-11-24 09:54:12 +01:00
Pratik Borhade
3f6d1d098c NLA: Console warnings about missing channel_index property
channel_index was renamed to track_index in f9b9ec3b26. Commit missed
one change in `ANIM_channel_draw_widgets`, hence the error in console
when mouse is over NLA editor.

Pull Request: https://projects.blender.org/blender/blender/pulls/115332
2023-11-24 07:24:44 +01:00
Harley Acheson
fe50189193 Refactor: Text Editor Formatted Output
Simplification of formatted text output in the Text Editor, removing
duplication and redundancies. Removes 35 lines.

Pull Request: https://projects.blender.org/blender/blender/pulls/110174
2023-11-24 00:42:32 +01:00