Commit Graph

113902 Commits

Author SHA1 Message Date
Omar Emara
dad7babaae Compositor: Implement single value reduction for CPU
This patch implements single value reduction for the new CPU compositor.

Reference #125968.
2024-10-09 15:18:58 +03:00
Pratik Borhade
9e6c884394 Fix #122206: Int soft limits changed to 10000
When soft limits set to extreme int values, the softmin/max of custom
property changes to -10k/10k. Instead use extreme values.

Pull Request: https://projects.blender.org/blender/blender/pulls/123223
2024-10-09 14:05:36 +02:00
Campbell Barton
e83d8271ac Merge branch 'blender-v4.3-release' 2024-10-09 22:59:48 +11:00
nutti
1d07ec7bc9 PyAPI: add specific BMLayerCollection element type to doc-strings
Ref: !125851
2024-10-09 22:58:17 +11:00
Campbell Barton
8771952ce9 Merge branch 'blender-v4.3-release' 2024-10-09 22:37:36 +11:00
Campbell Barton
e99cb62007 Unbreak WITH_IMAGE_OPENEXR=OFF 2024-10-09 22:37:10 +11:00
Campbell Barton
233cf07866 Cleanup: remove unused functions 2024-10-09 22:29:16 +11:00
Omar Emara
8ed15db920 BLI: Add safe power function
This patch adds a safe_pow function that returns the base if the pow
function is undefined.
2024-10-09 14:04:29 +03:00
Philipp Oeser
927769899b Merge branch 'blender-v4.3-release' 2024-10-09 13:02:49 +02:00
Philipp Oeser
738dc431eb Fix: Sequencecache modifier opening a file mem allocation mismatch
Oversight in 9506fed905

This would give: "Attempt to use C-style MEM_freeN on a pointer created
with CPP-style MEM_new" (and crash in my local builds)

(noticed while cecking on #128746)

Pull Request: https://projects.blender.org/blender/blender/pulls/128755
2024-10-09 13:01:42 +02:00
Aras Pranckevicius
8b275092e0 Image: Add Quality setting to EXR DWAA/DWAB compression
EXR DWAA and DWAB are conceptually similar to lossy JPG compression,
with a tunable file size vs image quality parameter. However, previously
Blender always used the fixed default setting, which is kinda similar
to very high quality (like 97) for JPG.

Internally EXR DWA/DWB quality parameter is inverted scale, i.e. 0 is
best/lossless quality, and increased setting value means decreased
quality. However the rest of Blender UI uses 1-100 JPG-like quality
scale, where values above 90 are "visually lossless", 100 is lossless,
and going below something like 50 would be visually quite lossy. So map
that to internal DWA setting:
- blender 100 -> DWA 0
- blender 97 -> DWA 45
The rest is linear relation based on those two points.

Pull Request: https://projects.blender.org/blender/blender/pulls/128790
2024-10-09 12:34:49 +02:00
Lukas Tönne
4f5f8f6e17 Merge branch 'blender-v4.3-release' 2024-10-09 12:28:18 +02:00
Lukas Tönne
12b4ac87ea Fix #128789: GPv3: Context property missing nullptr check
`grease_pencil` context property has to check for valid active object.
Added in 70c7fb6da2

Pull Request: https://projects.blender.org/blender/blender/pulls/128791
2024-10-09 12:22:51 +02:00
Lukas Tönne
ab75dc35ea Merge branch 'blender-v4.3-release' 2024-10-09 10:28:39 +02:00
Lukas Tönne
5c57e24fea Cleanup: GPv3: Remove unused BKE functions from GPv2
Removes unused GPv2 functions in blenkernel.

Notes:
-  Functions for layer masks are still in use, but annotations never
  have layer masks in the first place. Would be good to remove the data
  structures so we can remove the functions too.
- Some multi-frame edit functions are also still nominally used, but
multi-frame editing is not an active feature for annotations. This
  should also be removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/128709
2024-10-09 10:27:45 +02:00
Campbell Barton
f3c2deac3e Cleanup: replace U+00A0 with space
Using ASCII space is sufficient in source.
2024-10-09 16:34:39 +11:00
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