Commit Graph

150077 Commits

Author SHA1 Message Date
Campbell Barton
23de65afab Merge branch 'blender-v4.4-release' 2025-03-17 21:44:29 +11:00
Campbell Barton
5aec1308e6 Cleanup: quiet missing-declarations warnings 2025-03-17 21:44:08 +11:00
Sybren A. Stüvel
0f35ef9111 Fix #136041: NLA Strip Influence keyframes not appearing in tweak mode
Fix the `ANIMDATA_FILTER_CASES` macro, so that layered/slotted Actions
no longer take precedence over NLA control curves. Now they're handled
with the same priority as legacy Actions were.

Pull Request: https://projects.blender.org/blender/blender/pulls/136072
2025-03-17 11:42:42 +01:00
Campbell Barton
044b8ab6f0 Fix #136077: Crash transforming in background mode with an active region
Don't attempt to add region draw callbacks in background mode.
This caused by the regions runtime being null.

Even if the runtime was initialized, drawing callbacks aren't needed
in background mode.

Ref !136078
2025-03-17 21:41:34 +11:00
Sybren A. Stüvel
4e33abdafe Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-17 11:29:24 +01:00
Christoph Lendenfeld
103826d7ab Fix: Add missing reports when running Merge/Separate Action operators
Add reports after the merge- and separate animation operators are run.
This helps to clarify that these are limited in their use with the
NLA.

The motivation for this comes from a [comment][1] on a different
issue.

[1]: https://projects.blender.org/blender/blender/issues/135894#issuecomment-1520306

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/135920
2025-03-17 11:26:43 +01:00
Campbell Barton
3285da11a9 Fix #136067: Crash with dynamic paint output toggle in some contexts
Resolve the crash by using the active-object to match the operators
poll functions.

Ref !136068
2025-03-17 21:17:48 +11:00
Clément Foucault
92968c23fe Refactor: DRW: Make DrawEngine a virtual class
This removes the old `DrawEngineType` and use the new `DrawEngine`
virtual class instead.

This removes a lot of boilerplate functions that were only there for
legacy reason.

To this end, some engines that were based on static functions have been
refactored into `Instance` classes. This was particularly cumbersome
for the Grease pencil engine which needed some more refactoring.

The `Engine` class that is in each namespace is a workaround to isolate
the internal implementation (i.e. the `Instance`) to the engine
modules. Without this, the whole engine is getting included in each
compile unit that includes the `Instance` class. Eventually, if we get
rid of these intricate dependencies, we could remove the `Engine` class.

Pull Request: https://projects.blender.org/blender/blender/pulls/136001
2025-03-17 10:31:22 +01:00
Campbell Barton
070a4cc9ee Merge branch 'blender-v4.4-release' 2025-03-17 20:14:50 +11:00
Campbell Barton
c8c276f56f Fix #136059: Crash clicking on the marker-region in the time line
When a marker exists always return the nearest instead of using an
arbitrary large threshold which caused region_position_is_over_marker to
crash when a non-empty marker list returned a null nearest marker.

Ref !136060
2025-03-17 20:13:08 +11:00
Thomas Dinges
c3d2a016e8 Merge branch 'blender-v4.4-release' 2025-03-17 09:32:04 +01:00
Thomas Dinges
c2eaccd4a7 Release: Update freedesktop file with updated bugfix numbers 2025-03-17 09:29:40 +01:00
Jeroen Bakker
c4feddefd7 Refactor: Vulkan: Split VKWorkarounds
VKWorkarounds adds double negation. This PR splits
the struct into workarounds and extensions to reduce
confusing code.

Pull Request: https://projects.blender.org/blender/blender/pulls/136064
2025-03-17 09:06:47 +01:00
Pratik Borhade
e82c22f55e Cleanup: Grease Pencil: Remove old IO operator reference
Operator code is removed though they are still referenced in list of
"cleanup operator preset"

Pull Request: https://projects.blender.org/blender/blender/pulls/136062
2025-03-17 07:56:26 +01:00
Hans Goudey
23a88e0eec Fix #136039: Grease pencil edit mode crash with Bezier curves
Caused by 5f6e94ca58.
That commit mixed up `elb` and `epb`. Hopefully with clearer
names now that mistake will be harder to make.
2025-03-16 22:39:28 -04:00
Jun Mizutani
9dae51a3d4 UI: Blender theme colors matching the default theme for the face orientation front
Face Orientation Front Color has been changed to transparent for the
default theme (8bcb714b9e). This PR makes the Blender Light theme for
the face orientation front match the default theme alpha.

Pull Request: https://projects.blender.org/blender/blender/pulls/136034
2025-03-17 01:08:45 +01:00
Ray Molenkamp
76cd021a5c Cleanup: CMake: Fix cmake warning regarding DEPENDS keyword
DEPENDS is not supported for post_build commands and recent
cmake versions have started emitting warnings about that.

This can be safely removed, as cmake has been silently ignoring
the keyword for years.
2025-03-16 16:09:18 -06:00
Nika Kutsniashvili
7e3e093254 Anim: Add 12, 8, and 6 FPS presets
Add 12, 8, and 6 FPS presets often used in stylized animation,
especially in 2D/Grease Pencil animation.

12 FPS to animate on 2's, 8 FPS on 3's, 6 FPS on 4's or for
early blocking stages or storyboard.

Pull Request: https://projects.blender.org/blender/blender/pulls/135712
2025-03-16 19:46:40 +01:00
Lukas Stockner
349306a3bd Cycles: Handle OSL parameter query from Python
Now that we're packaging the Python oslquery module, we can get rid of the C++-side code here and handle this purely in Python.

Pull Request: https://projects.blender.org/blender/blender/pulls/136032
2025-03-16 18:04:38 +01:00
Harley Acheson
39cb672d7c Tests: Remove Unnecessary Comparison
Remove a comparison in a test that was added
accidentally.
2025-03-16 09:27:59 -07:00
Campbell Barton
4654855d20 Fix error running edit-mode extrude operators for non-mesh objects
The poll functions for: VIEW3D_OT_edit_mesh_* operators only checked
for an edit-mode object which failed with an unhandled exception for
non-mesh objects.
2025-03-16 19:33:30 +11:00
Campbell Barton
e4bd387327 Tests: various improvements to the bl_run_operators.py utility
- Use command line arguments to configure options such as random seed,
  running operators on existing blend files & how often the file is
  reset to the initial state.
- Support for generating a script file to replay the actions,
  useful for creating a repeatable script for bug reports.
- Add new context setup functions for edit-mode grease-pencil & hair.
2025-03-16 19:21:15 +11:00
Pratik Borhade
72a38aee7e UI: Increase default rows of tree view
Tree view UI of bone collection, node interface and light linking is
quite small right now. Bump the minimum row count similar to
6d8e642367

Pull Request: https://projects.blender.org/blender/blender/pulls/135426
2025-03-16 06:44:36 +01:00
Campbell Barton
73997ee5a9 Cleanup: underscore prefix private functions, use str.format 2025-03-16 16:33:37 +11:00
Campbell Barton
102c454781 Tests: event coordinates for UI tests on macOS with Hi-DPI
Correct the event coordinates by scaling by the pixel_size on macOS.

All the UI tests now pass on macOS.

Ref !136008

Co-authored-by: Sean Kim <SeanCTKim@protonmail.com>
2025-03-16 16:27:39 +11:00
Campbell Barton
f58a054eaf Tests: ui_test_undo.view3d_simple menu search failure
The inclusion of "Add -> Image -> Mesh Plane" causes the menu search
for "Add -> Mesh -> Plane" to attempt to add the image plane.

Workaround the problem by searching for an exact match,
although I think this should be possible to search for menu items
without having to include their shortcuts, especially since these
can be platform dependent.
2025-03-16 16:09:08 +11:00
Harley Acheson
2ad702808c Tests: Add BLF tests
BLF tests for font file opening, display name, metrics, variable
weight changing, width, height, advances, etc. Also tests for current
minimal word wrapping.

Pull Request: https://projects.blender.org/blender/blender/pulls/135891
2025-03-16 01:30:53 +01:00
Philipp Oeser
1448b70625 Fix #135964: "Add Paint Slot" disabled "Alpha" still adds alpha
Since internally `BKE_image_add_generated` uses 4 channel colors (no
matter what depth/planes is specified), just set alpha to 1 if the
option is unchecked.

Same as what 35dd09a9ef did for `IMAGE_OT_new`

Pull Request: https://projects.blender.org/blender/blender/pulls/135972
2025-03-15 08:54:13 +01:00
Campbell Barton
2c6b23e513 Merge branch 'blender-v4.4-release' 2025-03-15 15:26:15 +11:00
Campbell Barton
8faf210e4e Fix: crash duplicating empty hair
Attempt to access `points_by_curve.data().last()` on an empty array
crashed on a null pointer dereference.

Ref !135956
2025-03-15 15:18:03 +11:00
Ramón Klauck
dde6c2bb10 Fix: VSE: Incorrect rotation with mirrored images
When images in the VSE use mirror and then get rotated, they rotate in
the wrong direction.

Multiply rotation by X and Y component of mirror value (-1). This is
the same approach as used by translation.

Co-authored-by: Aradgus <ramonklauck987@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/136004
2025-03-15 02:32:04 +01:00
Campbell Barton
c3e5a35ecd PyAPI: add blf.bind_imbuf(..) context manager
Add support for using BLF to draw into an ImBuf image buffer.
Once the imbuf context has been set, draw calls for that font_id will draw into the image.

This works by binding an imbuf to BLF which is then used as the target when drawing.
```
with blf.bind_imbuf(font_id, imbuf):
    blf.draw_buffer(font_id, text)
```
See the example in the Python API documentation for reference.

The following BLF API's have been added to support a Python context manager.

- `BLF_buffer_state_push`.
- `BLF_buffer_state_pop`
- `BLF_buffer_state_free`

Ref !135772
2025-03-15 11:00:51 +11:00
Maxime-Cots
7d27064870 USD: Add new USD shapes import test
This PR update test data and test case for a few new USD Shapes
(Cylinder_1, Capsule_1, Plane)

Related Links :
* Issue : https://projects.blender.org/blender/blender/issues/134138
* PR: USD: Add Plane Shape import : https://projects.blender.org/blender/blender/pulls/134275
* PR: USD: Add Cylinder_1, Capsule_1 import : https://projects.blender.org/blender/blender/pulls/134944

Test Data PR : https://projects.blender.org/blender/blender-test-data/pulls/58

Co-authored-by: Nig3l <nig3lpro@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/134971
2025-03-15 00:46:16 +01:00
Sean Kim
38870d17e6 Build: Allow UI tests to run locally on all platforms
This commit allows the `WITH_UI_TESTS` CMake option to be used on all
platforms, not only Linux. The existing functionality to use the Weston
compositor was moved into the `WITH_UI_TESTS_HEADLESS` option. When
these tests are run with only `WITH_UI_TESTS`, a visible instance of
Blender is opened up for testing.

Pull Request: https://projects.blender.org/blender/blender/pulls/135889
2025-03-14 22:27:50 +01:00
phantomsoldierking
8ffe7e6ae1 Docs: changed description of the length parameter
Fixes #134117

Pull Request: https://projects.blender.org/blender/blender/pulls/135958
2025-03-14 21:45:18 +01:00
Harley Acheson
18d82c5164 Fix #135970: Allow Allow Movement After Tooltip Timer Starts
We can only allow some mouse and pen movement once the tooltip timer
has started. Doing so beforehand can keep some tooltips from starting.

Pull Request: https://projects.blender.org/blender/blender/pulls/135997
2025-03-14 19:16:43 +01:00
Brecht Van Lommel
a687a02578 Cycles: Enable HIP RT by default
For 4.4 there was not enough time to fully test it and be confident it is
stable, but for 4.5 we enable it.

Ref #135760
2025-03-14 18:44:41 +01:00
Brecht Van Lommel
990f8df7cc Fix: Build error with OpenImageIO 2.x after OSL manager changes
Ref #135050
2025-03-14 18:44:27 +01:00
Sergey Sharybin
f243f13549 Merge branch 'blender-v4.4-release' 2025-03-14 18:36:53 +01:00
Hans Goudey
759923fdd7 Geometry Nodes: Use socket type for store named grid
This used custom data types before, which was misleading and didn't
scale well because the set of attribute types is different than the set
of grid types we can store. Now just use the grid data type, like how
the store named attribute node uses the attribute type.

This covers backward compatibility, but not forward compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/135814
2025-03-14 18:36:16 +01:00
salipour
dd3640ef0f Cycles: Move HIP-RT out of experimental flag
The full regression suit passes, so there is no real background towards
considering it experimental.

It is still stays disabled by default for Blender 4.4.

Pull Request: https://projects.blender.org/blender/blender/pulls/135760
2025-03-14 18:35:42 +01:00
Jacques Lucke
51904839ac Fix #135948: Geometry Nodes: support evaluating undefined custom group nodes
The main reason that didn't work before because undefined custom node groups
have the undefined `bNodeType` (and thus are ignored in various places) but are
actually still groups that can be evaluated. The fix is just to handle custom
node groups a bit more explicitly.

In the future, we may want to have a separate "undefined custom group"
`bNodetype`, but that might a be a bit bigger project.

Pull Request: https://projects.blender.org/blender/blender/pulls/135974
2025-03-14 18:31:29 +01:00
Sybren A. Stüvel
63c3db3e96 Fix #135923: Library Overrides break action constraints
Fix an issue with library overrides that was caused by Action
assignments getting versioned too late in the versioning process. Now
the versioning of Action assignments (which assigns the
created-by-versioning action slots) happens in the 'after linking'
stage, as well as in the 'after setup' stage. The latter is still
necessary for the conversion of pre-2.5x animation data.

It is likely that the versioning code can now be simplified, as the
tagging for "this needs upgrading" may no longer be necessary. We're now
too close to the 4.4 release to comfortably make such bigger refactors,
though, so I'd rather keep the overall code structure as-is.

Pull Request: https://projects.blender.org/blender/blender/pulls/135988
2025-03-14 18:26:17 +01:00
Sybren A. Stüvel
8b6e22f36e Fix: memory leak in unit test when freeing the WM
Use a cleaner approach to the WindowManager handling in the "blendfile
loading unit test" base class, to ensure it is freed properly.

The commit following this one changes the Action versioning code, which
writes to RNA properties, which in turn sends WindowManager
notifications, which in turn have to be freed properly whenever the test
exits.

Pull Request: https://projects.blender.org/blender/blender/pulls/135988
2025-03-14 18:26:17 +01:00
Bastien Montagne
dd98cede18 Merge branch 'blender-v4.4-release' 2025-03-14 18:20:26 +01:00
Sahar A. Kashi
9ad3b74867 Fix: SSS and Motion Blur or Curves not working on HIP-RT
This change fixes the remaining failing tests with SSS when using HIP-RT.
This includes crash when SSS is used on curves, and objects with motion
blur and SSS rendering black.

The root cause for both cases was the fact that traversal was always
assuming regular BVH (built for triangles), while curves and motion
triangles are using custom primitives, which requires specialized BVH
traversal.

This change includes:

- Early output from `scene_intersect_local()` for non-triangle and
  non-motion-triangle primitives. This fixes `sss_hair.blend` test,
  and also avoids unnecessary BVH traversal when the local intersection
  is requested from curve object. The same early-output could be added
  to other BVH traversal implementation.

- Use `hiprtGeomCustomTraversalAnyHitCustomStack` for motion triangles
  primitives. This fixes motion blur on objects with SSS render black.

Fixes #135856

Co-authored-by: Sahar A. Kashi <sahar.alipourkashi@amd.com>
Co-authored-by: Sergey Sharybin <sergey@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/135943
2025-03-14 18:17:54 +01:00
Bastien Montagne
8a61555a46 Fix: IMBuf: Potential buffer overflow in JPEG metadata writer.
Looks like a logic inversion mistake.

Not clear how bad this issue is, as other code related to image metadata
seems to expect 1024 char max size too (e.g. `MAX_METADATA_STR` define
in `ed_draw.cc`. But this is potentially a very bad issue, and the fix
seems safe enough for 4.4 still.

Should also be backported to active LTSs.

Pull Request: https://projects.blender.org/blender/blender/pulls/135983
2025-03-14 18:17:21 +01:00
Bastien Montagne
e85ebb24fe Cleanup: imbuf: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.

This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.

MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.

NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.

Pull Request: https://projects.blender.org/blender/blender/pulls/135994
2025-03-14 18:16:13 +01:00
Philipp Oeser
d79274ae53 Merge branch 'blender-v4.4-release' 2025-03-14 17:34:51 +01:00
Philipp Oeser
d83944f248 Merge branch 'blender-v4.4-release' 2025-03-14 17:32:43 +01:00