Commit Graph

146386 Commits

Author SHA1 Message Date
Jacques Lucke
808635e52a Fix #102598: Resample Curve node collapses curves to a single point
Collapsing curves to a single point when just resampling is unexpected. This
patch changes it so that non-zero-length curves keep at least one segment.

The fix is fairly straight forward, but a bunch of additional code is added to
support the legacy option to avoid breaking backward compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/133659
2025-02-13 16:47:10 +01:00
Jacques Lucke
39a5dc3edd Fix #134430: missing node tree update after copying data-block
There was a missing call to `BKE_main_ensure_invariants` to make sure that the
node tree is in the expected state. I'm passing the `newid` to the function so
that it can skip iterating over all of `Main` in the majority of cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/134446
2025-02-13 16:37:52 +01:00
Bastien Montagne
343205a4da Fix (unreported) invalid mismatched usages of MEM_new/MEM_freeN. 2025-02-13 13:47:43 +01:00
Bastien Montagne
9ff4a52f8d Fix (unreported) invalid MEM_new/MEM_freeN mismatches. 2025-02-13 13:39:29 +01:00
Bastien Montagne
700db42976 Fix (unreported) invalid C-style allocation/freeing on non-trivial data.
`tGPsdata` embeds a `PointerRNA` member, which makes it non-trivial, and
requires it to use new/delete C++-style allocation handling.
2025-02-13 13:01:47 +01:00
YimingWu
ef844badd6 Fix #134482: Grease Pencil: Correct mask for stroke interpolation
Selection mask is included in the stroke interpolation tool in
297b97f2df, however sometimes there will
be mismatches for when start/end curve count isn't the same. This fix
ensures that the interpolation operator only works on the max amount of
curves that can fit in both start and end side of the interpolation.

Pull Request: https://projects.blender.org/blender/blender/pulls/134484
2025-02-13 12:45:53 +01:00
Pratik Borhade
6d749db0c2 Fix #134468: Grease Pencil: Primtive tools considering mouse drag threshold
This is due to the click_drag event assigned for primitives. Event types
that are not "PRESS" are forwarded to drag_queue then waits until
`WM_event_drag_test_with_delta/WM_event_drag_test` is true i.e. mouse
threshold value.

Pull Request: https://projects.blender.org/blender/blender/pulls/134480
2025-02-13 11:53:03 +01:00
Campbell Barton
77eed053b2 Unbreak build WITH_PYTHON=ON & Python <= v3.12 2025-02-13 20:45:26 +11:00
Campbell Barton
39e23e29fe Cleanup: remove unnecessary call to PyGILState_Ensure
There is no need to aquire the GIL for Python methods.
2025-02-13 17:09:10 +11:00
Campbell Barton
9222f157cb Fix #127767: bpy.app.handlers could run in a read-only state
Reading & restoring RNA "writable" state wasn't working reliably when
Python was called from multiple threads.

- Resolve by acquiring the GIL before calling `pyrna_write_*` functions.
- Assert `pyrna_write_*` has the GIL to prevent this happening again.
- Move duplicate checks from bpy_props.cc into utility functions.
2025-02-13 16:53:27 +11:00
Richard Antalik
ee9e4ead8d Fix: VSE: Retiming key translation not working correctly
Translating keys when speed transitions are present with media not
matching scene FPS causes incorrect behavior.

This was caused by multiple issues - in some places media vs scene FPS
mismatch was not accounted for and multiple instances of presision loss
due to casting float values to integer.

Pull Request: https://projects.blender.org/blender/blender/pulls/131911
2025-02-13 03:16:29 +01:00
Richard Antalik
db2108dd89 Fix #134270: Connected icon hidden when text overlays are disabled
Connected strip status is critical information, maybe more important
than strip name. Therefore it should be drawn unless all overlays are
disabled.

This commit makes the icon visible in strip "header" area even if text
overlays are disabled. Content is maximized in this case, and the icon
is drawn over the content.

![Screenshot_2025-02-12_04-50-14.png](/attachments/c2ad510b-388b-4e2f-b23c-3b494d559f38)

Pull Request: https://projects.blender.org/blender/blender/pulls/134432
2025-02-13 03:15:49 +01:00
Campbell Barton
4c67c78452 PyAPI: correct unregister/register mix up in exception message
Use a shared prefix for messages to avoid copy-paste errors.

Also include class name in the exception if the class can't be
unregistered.
2025-02-13 11:59:57 +11:00
Campbell Barton
09cabadcfb PyAPI: prevent built-in RNA types being unregistered
`bpy.utils.unregister_class(bpy.types.Menu)` would remove `bl_rna`
type information from the menu (also Panels & other built-int types).

Prevent unregistering built-in types since this will only cause problems.
2025-02-13 11:39:17 +11:00
Campbell Barton
c83c62439e Cleanup: correct typo 2025-02-13 11:14:50 +11:00
Campbell Barton
d2e2cec94e Cleanup: don't sub-class other registered classes
This complicates registration logic, ideally this would raise an
exception however detecting this at run-time is quite expensive.
2025-02-13 11:11:01 +11:00
Campbell Barton
c7804568e7 Cleanup: reference imported types in class definitions 2025-02-13 10:15:19 +11:00
Campbell Barton
e2fc2d96f8 Cleanup: wrap Python lines exceeding 120 2025-02-13 10:01:03 +11:00
Harley Acheson
bbe4bb38a0 Fix #134068: Show VSE Select Mode Variations
For many selection variations we alter the operator's displayed name to
reflect this. For example "Select (Extend)", "Select (Deselect)", and
"Select (Toggle)". This PR does similar for VSE select modes, returning
"Select (Unconnected)", "Select (Linked Time)",
"Select (Linked Handle)", and "Select (Side of Frame)". These are shown
if you press Alt or Ctrl while hovering in the VSE Editor.

Pull Request: https://projects.blender.org/blender/blender/pulls/134195
2025-02-12 22:09:01 +01:00
Nikita Sirgienko
2bab4ae370 Cycles: oneAPI: Optimize texture access by using GPU HW sampler
The current usage of software-based texture operations in
the oneAPI implementation puts additional register pressure on
the GPU compiler during register allocation. And it also creates
code that requires maintenance. This commit is intended to address
this situation by utilizing a recently productized SYCL bindless
texture API to enable HW-based texture operations using
Intel GPUs' hardware sampler.

This currently translates to 1-11% rendering speedups (scene-specific)
on my Arc A770 and Arc B580. At the moment, there are small
performance regressions with NanoVDB texture operations on Arc B580
and small performance regressions in shade surface MNEE and Raytrace
kernels on Arc A770, but they look recoverable and will be handled
in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/133457
2025-02-12 21:47:34 +01:00
Nikita Sirgienko
a0b7ad436b Cleanup: Cycles: oneAPI: Switch to non-experimental work item API
There is now a non-experimental API for this_work_item functionality, so
let's use it for better code quality and also to avoid the deprecation
warning during compilation.

No functional or performance changes are expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/133472
2025-02-12 21:46:22 +01:00
Xavier Hallade
89f70855e0 Cycles: oneAPI: Enable kernels compression
This is done using zstd with compression level 19 so it's aligned with
the other backends that had it enabled in
4bde68cdd6.

Pull Request: https://projects.blender.org/blender/blender/pulls/134049
2025-02-12 21:45:16 +01:00
Pratik Borhade
0a7b765eb0 Fix #134362: Grease Pencil canvas settings don't do anything
This is due to hardcoded color and subdivision value. Also scale and
offset properties stored in overlay stuct was not considered. Now
multiply the transform matrix with `grid_mat` to make use of these
properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/134382
2025-02-12 18:51:03 +01:00
Ray Molenkamp
e94d92593e Windows: Update x64 libraries for 4.4
4.4 Library Changes Task: https://projects.blender.org/blender/blender/issues/128577

Pull Request: https://projects.blender.org/blender/blender/pulls/134424
2025-02-12 17:48:28 +01:00
Brecht Van Lommel
44e9e3bfb2 Fix: Build error with latest MSVC 2022 2025-02-12 17:18:55 +01:00
Philipp Oeser
01e5c6a595 Fix #134279: support boolean layers in bmesh API
Even though from an internal standpoint one could also just use INT
layers (if I understand correctly they are both handled as long?), we
can just support getting/setting bool layers in
the bmesh layer API as well (otherwise, it looks impossible to access
boolean attributes in bmesh).

Pull Request: https://projects.blender.org/blender/blender/pulls/134344
2025-02-12 17:12:24 +01:00
Bastien Montagne
5a8f0bbc03 Fix (unreported) more PointerRNA-embedding structs C-styled allocated. 2025-02-12 14:40:44 +01:00
Sebastian Parborg
8a251ffa8d install_linux_packages: Bump the remaining 4.4 lib versions
See #128577 for details
2025-02-12 14:23:48 +01:00
Bastien Montagne
551cb3c65b Fix (unreported) invalid calloc'ed data in fmodifier_ui.
This `panel->runtime->custom_data_ptr` is `MEM_delete`'d even, so that
was plainfully wrong allocation code.

Will crash in main/4.5 due to PointerRNA now requiring proper C++
construction/destruction.
2025-02-12 14:06:55 +01:00
Bastien Montagne
c46f19a6c2 BPY: Fix weak access to Main data from bpy.data API.
Use `self` parameter to retrieve the actual 'owner' Main.

Previous code was using G_MAIN, which _should_ be fine in current usage
context, but would for sure break if these functions were to be used
from e.g. a temp Main.

Pull Request: https://projects.blender.org/blender/blender/pulls/134440
2025-02-12 13:56:06 +01:00
RedMser
495d6ed88f Docs: Fix TimelineMarkers.new description
Likely copy-paste mistake in the docs for timeline markers.

Pull Request: https://projects.blender.org/blender/blender/pulls/134415
2025-02-12 13:48:47 +01:00
Sebastian Parborg
48009f5c05 Build: Fix intel-graphics-compiler archive filename.
Before it was simply just the version number, so it was hard to tell
which package it was from.
2025-02-12 13:45:39 +01:00
Campbell Barton
5638977db2 Docs: clarify reference ownership in bpy_rna.cc 2025-02-12 22:35:39 +11:00
Campbell Barton
8ff9f2b036 Fix assert with debug builds on exit when built as a Python module 2025-02-12 22:17:13 +11:00
Bastien Montagne
7901dc8216 Refactor: bpy.data.batch_remove: use set instead of ID tags.
Cleaner and more future-proof. Also refactored slightly the code to make
it more readable.

And removed the 'experimental' warning in docs, this should have been
removed a long time ago.
2025-02-12 11:39:05 +01:00
Omar Emara
25c4dd53dd Fix: Keying Screen and anti-aliasing produce bad results
The Keying Screen and the Anti-Aliasing nodes produce bad results in the
viewport compositor. This is because their cached resources are
allocated from the GPU texture pool, so they might get overwritten.

To fix this, we make sure those are not allocated from the texture pool.
2025-02-12 11:50:44 +02:00
Aaron Carlisle
f8cb37a322 Docs: Update RNA to user manual URL mapping 2025-02-11 21:29:05 -05:00
Campbell Barton
f1e8dd366b CMake: support using LIBDIR while building against an external Python
Support a standard Blender build referencing Python outside of LIBDIR,
useful to build against Python with debugging options enabled.
2025-02-12 13:17:04 +11:00
Campbell Barton
07340e1093 Docs: add code-comments to clarify bad-level include & developer only UI 2025-02-12 10:59:16 +11:00
Aaron Carlisle
4906d8bf85 Fix: new/free mismatch
See 06be295946
2025-02-11 18:45:31 -05:00
Gilberto.R
b5b786b34f Fix: UI: Close pie menu on window focus loss
Close open pie menus on window loss of focus, to prevent waiting for
the pie key release if it was released outside of focus.

Pull Request: https://projects.blender.org/blender/blender/pulls/134215
2025-02-11 23:30:31 +01:00
Sean Kim
312579ce82 Fix #134366: object.closest_point_on_mesh always returns no result
Introduced in 024d7d12e2

Pull Request: https://projects.blender.org/blender/blender/pulls/134377
2025-02-11 23:09:20 +01:00
Sergey Sharybin
a535a1a027 Fix #132782: MetalRT: Missing Geometry in Cycles preview on MacOS 15.2
The issue also happens on macOS 15.3.

This is a Metal driver bug, a fix is coming in macOS 15.4. Until then
disable refitting the viewport. There is no perceptible benefit from
refitting, so while it might be less that ideal it allows to side step
the problem and still benefit from the HWRT.

Pull Request: https://projects.blender.org/blender/blender/pulls/134399
2025-02-11 21:42:38 +01:00
Brecht Van Lommel
529ce46744 Fix: Cycles silently ignores unknown --cycles--device type
Pull Request: https://projects.blender.org/blender/blender/pulls/134354
2025-02-11 20:42:21 +01:00
Brecht Van Lommel
9ad19396f5 Fix: Cycles Metal invalid storage mode check
Pull Request: https://projects.blender.org/blender/blender/pulls/134337
2025-02-11 20:42:01 +01:00
Brecht Van Lommel
d8a02dc435 Tests: Update Storm reference renders for USD 25.02 and MaterialX 1.39
Pull Request: https://projects.blender.org/blender/blender/pulls/134411
2025-02-11 20:40:33 +01:00
Brecht Van Lommel
89e3d0a688 Fix: MaterialX normal map node not exported
Space input was removed in MaterialX 1.39.

Pull Request: https://projects.blender.org/blender/blender/pulls/134411
2025-02-11 20:40:33 +01:00
Brecht Van Lommel
21da1aec16 Fix: MaterialX of gradient texture node is wrong
Node input names changes in MaterialX 1.39.

Pull Request: https://projects.blender.org/blender/blender/pulls/134411
2025-02-11 20:40:33 +01:00
Brecht Van Lommel
77a7c68c9d Fix: Hydra exoports incorrect dome light color
It would both set the dome light color and export a texture with that
same color, which would double up. It was also using the World.exposure
member which is not used anywhere else in Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/134411
2025-02-11 20:40:33 +01:00
Brecht Van Lommel
1d743e2082 Fix: USD exports icnorrect dome light color when not using nodes
Implement support for this.

Pull Request: https://projects.blender.org/blender/blender/pulls/134411
2025-02-11 20:40:33 +01:00