Commit Graph

113886 Commits

Author SHA1 Message Date
Campbell Barton
2f35b3baf4 Cleanup: move duplicate doc-string to inline comment 2024-10-09 15:51:38 +11:00
Campbell Barton
ff8abcabe0 Cleanup: various non-functional changes for C++ 2024-10-09 15:51:37 +11:00
Campbell Barton
434bc9213a Merge branch 'blender-v4.3-release' 2024-10-09 15:48:36 +11:00
nutti
933fb1978f PyAPI: correct types in doc-strings
Ref !116245
2024-10-09 15:45:23 +11:00
Campbell Barton
6c4d699268 Core: replace home environment variable access with BLI_dir_home
Also check null check the value.
2024-10-09 15:42:15 +11:00
Germano Cavalcante
1e161414e0 Merge branch 'blender-v4.3-release' 2024-10-08 23:32:29 -03:00
Germano Cavalcante
0ac66493c0 Fix: Error in previous commit: Snap to grid not updating size while navigating
`t->snap` varies per operator and does not update.
2024-10-08 23:29:57 -03:00
Germano Cavalcante
ae5e72432b Merge branch 'blender-v4.3-release' 2024-10-08 22:18:52 -03:00
Germano Cavalcante
56c98046a5 Fix #122635: Precision mode not working with Snap to Grid
This introduces partial functionality of Precision mode to 'Snap to
Grid'.

However, it behaves differently from 'Absolute Grid Snap', as it lacks
smooth mouse movement.

Precision mode is now available specifically for Transform operations.
2024-10-08 22:17:36 -03:00
Campbell Barton
cd9d4e992d macOS: replace BLI_expand_tilde with BLI_dir_home
Use a generic function to access the home directory making macOS path
access match other Unix systems.

When the function was added [0] it solved access to HOME when the
environment variable wasn't set. Since then support for `getpwuid()`
has been added on UNIX systems [1], which also works on macOS,
removing the need for macOS to have a separate function.

Furthermore BLI_expand_tilde had undocumented limitations that didn't
apply to other platforms (see PR for details).

Ref !128734

[0]: 9df13fba69
[1]: 6039cb17e6
2024-10-09 09:29:12 +11:00
Germano Cavalcante
7c539312b7 Merge branch 'blender-v4.3-release' 2024-10-08 19:21:50 -03:00
Germano Cavalcante
ae37656478 Fix #128764: Moving keys in the animation editors enables the 3D view's snap toggle
The issue occurred because the code block that read the snap flag was
out of sync with the code block that saved the flag.

The solution was to centralize snap flag handling in the
`transform_snap_flag_from_spacetype_ptr()` function. This function
retrieves the appropriate snap flag and property based on the editor
type, eliminating the need for repetitive conditional checks and
ensuring that the correct snap flag is set for each editor.
2024-10-08 19:17:51 -03:00
Richard Antalik
2d122a3492 Cleanup: VSE: Remove seq->tmp usage
Tmp field was still used in strip duplication. This was a source of bugs
previously. Now it uses `Map` of new to old strips to fix strip
relations. The field is removed from DNA struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/128402
2024-10-08 22:28:36 +02:00
Weizhen Huang
33be4d18ed Merge branch 'blender-v4.3-release' 2024-10-08 21:47:21 +02:00
Weizhen Huang
52f2bb53b9 Fix #128654: EEVEE: improve precision of cubic solver in light LTC
by rescaling the polynomial coefficients and bringing them to the same
magnitude.

Pull Request: https://projects.blender.org/blender/blender/pulls/128753
2024-10-08 21:45:51 +02:00
Weizhen Huang
e2c0e049f4 Fix: EEVEE: missing negative sign when computing refraction pdf
`LH` was computed using `dot(-L, H)`, so there needs to be a negative
sign when computing `Ht2`.

`pdf` is only used for denoising, the change oesn't seem to affect the
regression test.
2024-10-08 21:43:27 +02:00
Harley Acheson
18901f22c6 Merge branch 'blender-v4.3-release' 2024-10-08 12:39:00 -07:00
Harley Acheson
dc6e021472 Fix #128616: Allow Docking to work from Menu shortcut
Allow Docking to work correctly if using a shortcut to the area header
context menu item. There is no longer a need to set the source or
target area locations.

Pull Request: https://projects.blender.org/blender/blender/pulls/128730
2024-10-08 21:37:54 +02:00
Laurynas Duburas
fc5f89a520 Curves: Support View3DOverlay.display_handle property
Support for View3DOverlay.display_handle property accessible in "Curves Edit Mode Overlays" panel.

Rel #105037

Pull Request: https://projects.blender.org/blender/blender/pulls/128142
2024-10-08 21:17:16 +02:00
Clément Foucault
f250252a59 DRW: Remove support for Metal Vertex fetch API
All geometry shaders have been ported to the
primitive expansion API. The vertex fetch API
is no longer used inside the DRAW module.

This only removes it from the new API which
only Workbench and EEVEE use.

Workbench only used it for shadow rendering, but it
was ported by #125855 .

Overlay-Next project already ported all the geometry
shaders and will not need it.

Rel #127493

Pull Request: https://projects.blender.org/blender/blender/pulls/127659
2024-10-08 21:10:27 +02:00
Harley Acheson
3417003761 Merge branch 'blender-v4.3-release' 2024-10-08 11:45:23 -07:00
Harley Acheson
00dca5acec Fix #128112: Improve Display of Drag Overlays
Use zero offset for drag items to remove blurriness.

Pull Request: https://projects.blender.org/blender/blender/pulls/128623
2024-10-08 20:44:05 +02:00
Miguel Pozo
e0927c1f6e Merge branch 'blender-v4.3-release' 2024-10-08 19:34:59 +02:00
Miguel Pozo
07bbe03ffa Fix: EEVEE: DoF slight focus
The ring distance was still computed wrong after #127880
2024-10-08 19:34:17 +02:00
Aras Pranckevicius
7dad51a724 IMB: Add function to scale image into a new image, use that instead of duplicate+scale
IMB_scale modifies the input image. But some places in code needed to keep
original input intact, so what they did was a sequence of IMB_dupImBuf+IMB_scale

Add IMB_scale_into_new function and use that in several obvious places:

- movieclip_build_proxy_ibuf
- icon_copy_rect
- seq_proxy_build_frame

Rebuilding proxies for VSE image sequences with 94 4K resolution EXR images
(on Ryzen 5950X/Win10/VS2022): 13.4 -> 10.3 seconds.

Pull Request: https://projects.blender.org/blender/blender/pulls/128752
2024-10-08 19:06:41 +02:00
Bastien Montagne
10c32cd120 Merge branch 'blender-v4.3-release' 2024-10-08 17:07:59 +02:00
Bastien Montagne
dbadc1c71c Fix part of #128420: invalid handling of full orphaned libraries in management code.
Reset the 'hierarchy index' runtime `temp_index` value for all library IDs.
This prevent the assert to be triggered when trying to rebuild libraries
hierarchy and there are some orphaned (i.e. not used by anything) library IDs
around.
2024-10-08 17:02:51 +02:00
YimingWu
8bc89c5236 Fix #128714: GPv3: Don't erase behind the camera
If points are beind the camera, we don't really want to erase them. This
patch marks invalid coordinates thus preventing them from intersecting
with a eraser.

The reason for using a large value to indicate "invalid coordinate"s are:

- No need to further break down the way we process `src_to_dist` point matching array for `hard_eraser` `soft_eraser`, makes the entire logic much easier.
- No eraser is gonna be touching such a large coordinate of `1e20`.

Technically there's this case where if a segment crosses the near or far clipping plane (to handle this correctly, you'll need to split that segment into two at the clipping plane position and it increases complexity a lot), and then you will have undefined erasing behaviour, however the worse case is that the one segment was completely removed, and in such case I think it's acceptable.

Pull Request: https://projects.blender.org/blender/blender/pulls/128738
2024-10-08 15:35:31 +02:00
Sybren A. Stüvel
f093e4ad44 Refactor: remove the 'New Slot for Object' operator
Remove the `anim.slot_new_for_object` operator. It's no longer in use, and
replaced by the more generic `anim.slot_new_for_id` operator.

The latter is also coded in Python, and easier to follow than the code it
replaced.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/128710
2024-10-08 15:21:37 +02:00
Sybren A. Stüvel
0ae641c4ef Anim: fix null pointer access in 'Push-Down to NLA' operator
After pushing down the Action to the NLA, it needs to be tagged for
reevaluation. The code was using `adt->action->id` for this, but since
the nature of the operator is that it un-assigns the Action itself, that
would always be a null pointer.

Pull Request: https://projects.blender.org/blender/blender/pulls/128707
2024-10-08 15:19:34 +02:00
Falk David
6b12ff2ac0 Fix: Python: Incorrect default curve_type when calling drawing.add_strokes()
The API did not initialize the `curve_type` for the newly created strokes resulting in unwanted behavior.

Set the curve type to the expected default: `POLY`.
2024-10-08 12:43:58 +02:00
Falk David
821cfcbe4a Fix: Build warnings missing include
Caused by a57206dd59.
Missed to remove the line that included the legacy
folder.
2024-10-08 12:43:58 +02:00
Falk David
92b4c853db Fix: Python: Incorrect default curve_type when calling drawing.add_strokes()
The API did not initialize the `curve_type` for the newly created strokes resulting in unwanted behavior.

Set the curve type to the expected default: `POLY`.
2024-10-08 12:37:10 +02:00
Bastien Montagne
39d4d06f4f Refactor: Move PointerRNA and related users to C++-style new/free. 2024-10-08 12:14:03 +02:00
Falk David
35c2461130 Fix: Build warnings missing include
Caused by a57206dd59.
Missed to remove the line that included the legacy
folder.
2024-10-08 11:37:58 +02:00
Jeroen Bakker
70590d1bd9 Merge branch 'blender-v4.3-release' 2024-10-08 11:33:14 +02:00
Jeroen Bakker
27932162d8 Fix: Cache files location
Adds an additional precheck to identify if the app cache dir is correct.
Reduces placing cache files all over the place when the app dir isn't
correct.
2024-10-08 11:32:41 +02:00
Jeroen Bakker
c15cda2bf1 Merge branch 'blender-v4.3-release' 2024-10-08 10:55:38 +02:00
Jeroen Bakker
3cd579208b Vulkan: SPIR-V Caching
Adds a SPIR-V cache that skips frontend compilation for shaders
that are already compiled in a previous run of Blender.

Initially this was postponed to 4.4 but it was observed that
the vulkan backend didn't perform well on Windows in debug
builds. The reason is that the compiler would also be a debug
build which makes compiling a shader really slow. Starting
Blender on a debug build could take minutes.

So the decision was made to give this task a higher priority so
the vulkan backend would become more usable to developers
as well.

The cache is stored in the application cache dir. The SPIR-V
binaries can be used by different Blender versions so there
is no version specific cache folder.

**Sidecar**: SPIR-V files are a stream of bytes. There is no
header information that allow us to validate the stream. To
add basic validations we could add our custom header or
a sidecar. It was chosen to use a sidecar as having the SPIR-V
files unmodified allows us to load them directly in
debug tools for analyzing.

**Retention**: Shaders that are not used are automatically
removed with a retention period of 30 days.

**Shader builder**: Shader builder cannot use the SPIR-V
cache as it uses stubs that returns invalid cache directories.
This would load/save the cache to the location where you
started the build.

Pull Request: https://projects.blender.org/blender/blender/pulls/128741
2024-10-08 10:55:10 +02:00
Philipp Oeser
6bd8871409 Merge branch 'blender-v4.3-release' 2024-10-08 08:20:23 +02:00
Philipp Oeser
3dd20a64f0 Fix #128633: Image gizmo missing update for the Properties Editor
Send appropriate notifier so the Properties Editor listener
(buttons_area_listener) will catch this and redraw.

Pull Request: https://projects.blender.org/blender/blender/pulls/128688
2024-10-08 08:19:45 +02:00
YimingWu
42f171c216 Null check in screen_ctx_grease_pencil_data
There could be no active object in 2d animation workspace, this prevents crashing.
2024-10-08 14:09:14 +08:00
Campbell Barton
82ab7ceba6 BLI_fileops: move home directory access to BLI_fileops
This was located in BKE_appdir which is higher level
(used for accessing Blender's paths), where as the home directory
may be accessed from lower level path code.
2024-10-08 12:23:40 +11:00
Campbell Barton
ad88aedbac Docs: note that recent files shouldn't remove files that don't load 2024-10-08 11:34:15 +11:00
Campbell Barton
91aa21e086 Docs: simplify the description of the select by pole count operator 2024-10-08 10:52:15 +11:00
Campbell Barton
c0e9184e5b Cleanup: remove white-space to satisfy license checker 2024-10-08 10:06:22 +11:00
Campbell Barton
2e881eacd1 Cleanup: spelling in comments 2024-10-08 09:54:29 +11:00
Campbell Barton
3525b83c6b Cleanup: use specific exception types where appropriate 2024-10-08 09:41:53 +11:00
Campbell Barton
1a1e75c253 Cleanup: replace implicit BaseException with Exception
Exception is more appropriate as a general exception in these cases.
2024-10-08 09:41:51 +11:00
Jacques Lucke
7a4329320f Merge branch 'blender-v4.3-release' 2024-10-08 00:28:06 +02:00