144888 Commits

Author SHA1 Message Date
Campbell Barton
54e655f06a PyDoc: correct unbalanced back-tick 2025-01-02 15:03:54 +11:00
Campbell Barton
5fbd22ea67 CMake: mark non WITH_* variables as advanced
Also correct case for Tiff_DIR variable which wasn't being
marked as advanced.
2025-01-02 15:03:52 +11:00
Campbell Barton
1b0cef86fa Fix UNIX crash on startup when HOME isn't set
Regression in [0] which re-introduced #2931.

Accessing environment variables must always null check the result.

Resolve by checking the result as well as replacing $HOME
access with a function that falls back to `passwd::pw_dir`.

Also add code-comments to to clarify the current behavior.

[0]: b308b360ebc7f6639b9f75a6c4cb469115fe2f3e
2025-01-02 14:46:55 +11:00
Alaska
6d7b0c56c9 Fix: Texture Coordinate Object output referencing a object is incorrect in the world shader with OSL
The Texture Coordinate node has a "Object" output that can be
derived from the object being sampled, or a reference object.

With Cycles OSL, the "Object" output of the Texture Coordinate
would not use the reference object if one was active, and the
node was used on a world shader.

This commit fixes this issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/132515
2025-01-02 03:41:38 +01:00
Alaska
0bfb6e41f2 Fix: Texture Coordinate normals are not normalized in Cycles OSL
The output normals of the Texture Coordinate node when using the OSL
backend were not normalized, leading to incorrect values in
some situations.

This commit fixes this issue by normalizing the normals in this situation.

Pull Request: https://projects.blender.org/blender/blender/pulls/132514
2025-01-02 03:40:55 +01:00
YimingWu
d53d7a42df Fix #132449: Crash converting empty curves to mesh
Caused by b3a06149bbed54c84cd7fa25a499cad9b418b8eb.

`curve_to_mesh` returns null for empty meshes.
This fix guards access to the result with a null check.

Pull Request: https://projects.blender.org/blender/blender/pulls/132453
2025-01-01 20:21:30 +01:00
Pratik Borhade
25febbbb32 Fix #100264: Outliner icon overlap when filter collection is off
In Outliner (View Layer mode) when filter "Collections" is off the icon
of the object mode overlaps with "arrow" icon (if "Show Mode Column" is
enabled). To fix this, add offset for this specific case and also when
"All View Layers" is off.

Pull Request: https://projects.blender.org/blender/blender/pulls/132339
2025-01-01 20:15:14 +01:00
Pratik Borhade
ae90d0defd Fix #108987: Remove exclamation from bake fluid message
Exclamation looks unnecessary for info message that is generated after
completing the bake job. This PR removes the exclamation points.

Pull Request: https://projects.blender.org/blender/blender/pulls/132009
2025-01-01 19:39:26 +01:00
Sean Kim
3c5b2c3b9f Fix #132414: Dyntopo smooth brush doesn't work with face set automasking
Previously, in 4.2, the `has_face_set` method always returned `true` for
whether or not a given vert had a given face set with dyntopo enabled.
This logic was updated to be more complete in 4.3, but the fallback
logic for when a mesh didn't have any face set data was not.

To fix this, if the corresponding BMesh doesn't have the face set
attribute, we check whether or not thet requested face set is
`SCULPT_FACE_SET_NONE`

Pull Request: https://projects.blender.org/blender/blender/pulls/132523
2025-01-01 18:50:20 +01:00
Omar Emara
f90572c688 Cleanup: Compositor: Remove typed single value getters 2025-01-01 18:20:58 +02:00
Aras Pranckevicius
c26db69f58 VSE: Simplify and optimize effect multi-threading
Cleanup (and make slightly faster as a side effect) the way VSE effects
do multi-threading. Previously (some of them) were using
IMB_processor_apply_threaded with C-like machinery (which internally
uses a task pool), switch that over to a helper apply_effect_op
(which internally uses a parallel for). Based on profiling, parallel
for is slightly more efficient (task pool takes a bit until all the
tasks are "pushed" into the pool). Note however that some VSE effects
were already doing parallel for internally; these are not affected.

VSE scene at 4K resolution, with four 4K resolution PNG images blended
over each other, time it takes to do render_strip_stack:
- Ryzen 5950X (Win/VS2022): 38.9ms -> 34.7ms
- Mac M4 Max: 21.9ms -> 19.8ms

Now that all VSE effects are internally threaded via parallel for,
there's no need for the init_execution and execute_slice machinery,
so remove all that.

You might also notice that half of "over drop" effect code is gone.
It was accidentally not doing anything whatsoever for the last 18 years
(since 2.42), and currently observed behavior matches documentation
and "internet knowledge", so let's  accept it as correct.

Pull Request: https://projects.blender.org/blender/blender/pulls/132380
2025-01-01 11:11:49 +01:00
nutti
848ec77911 Fix: PyDocs: Title inconsistency on bpy.types.USDHook
Due to 8285d2d, titles "Inherited Properties" and "Inherited Functions" become hidden.
This PR fixes this issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/132481
2025-01-01 07:40:37 +01:00
Jesse Yurkovich
95be928c5e Fix: MaterialX: Use correct output node type
The output node types were seemingly incorrect since the initial commit
and would produce incorrect MaterialX documents[1]. When MaterialX is
upgraded to 1.38.10 this will now fail material creation in Hydra.

Use the node type directly instead of setting things to their default
`color3` output type.

[1] See PR for an example.

Pull Request: https://projects.blender.org/blender/blender/pulls/132362
2024-12-31 23:39:20 +01:00
Hans Goudey
6bfb6399ea Fix #132075: Realize instances crash with vertex group inputs
Caused by 84c7684871d7f9b8eb607d93fc44bae170f06e91.

Previously we could count on adding the attributes to the result mesh
not failing. Now, since the vertex group names are copied, they might
fail because a name would cause the attribute to already exist with a
float type on the point domain, which might not match the most
complex domain/type we'd use otherwise.

The fix is to only create attributes as vertex groups if the domain and
type combination from all the input meshes is correct.

Pull Request: https://projects.blender.org/blender/blender/pulls/132506
2024-12-31 22:16:29 +01:00
Hans Goudey
11e97bd593 Fix: Assert for material span size after recent cleanup
Caused by 6871fe8415984615958c1a16ba5aedff4d523c8d.

The assert was harmless, the array of null pointers was just longer
than necessary.
2024-12-31 15:13:56 -05:00
Ray Molenkamp
2f0fc7fc9f Cleanup: CMake: clean sequencer's CMakeLists.txt
- Remove animrig include, replace with lib dependency
- mark internal include as private

Pull Request: https://projects.blender.org/blender/blender/pulls/132502
2024-12-31 21:07:54 +01:00
Brecht Van Lommel
6a15f301ef Revert "Fix: Missing super().__del__() in Cycles and Hydra render engine"
This is leading to "'super' object has no attribute '__del__'" errors
in some situations. As explained in #132476 this is only for future
proofing, so don't do it yet.

This reverts commit f301952b6aabc67c4745cb78cec3e54d2ee3677b.
2024-12-31 19:30:39 +01:00
Ray Molenkamp
0dc484f9cc Cleanup: CMake: Modernize bf_rna dependencies
Pretty straightforward

- Remove any bf_rna 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/132413
2024-12-31 18:23:25 +01:00
Hans Goudey
455326fd67 Fix #132488: Crash drawing edge attribute in sculpt mode 2024-12-31 09:44:16 -05:00
Brecht Van Lommel
3eeacfeb57 Fix: ASAN warnings in light and light tree build
Avoid division by zero and NaN. Should be no functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/132471
2024-12-31 15:22:22 +01:00
Brecht Van Lommel
56b7d43887 Fix: Cycles crash when using denoising in build without OIDN
We could try to prevent these parameters to be set earlier in Blender
sync, but I think it's better to handle for all integrations.

Pull Request: https://projects.blender.org/blender/blender/pulls/132477
2024-12-31 15:19:31 +01:00
Brecht Van Lommel
f301952b6a Fix: Missing super().__del__() in Cycles and Hydra render engine
According to the Python API release notes, this is required now along
with super().__init__() which was already done.

Also fixes mistake in example in API docs.

Pull Request: https://projects.blender.org/blender/blender/pulls/132476
2024-12-31 15:18:25 +01:00
Thomas Dinges
c3a7acd034 Tools: Print query URL for modules with 0 reports too. 2024-12-31 13:15:30 +01:00
Sergey Sharybin
ba4bebd087 Fix: Crash in Cycles when OCIO config can not be created
Was originally reported in Blender Chat about Cycles standalone
that it will crash when the wrong OCIO configuration path was provided.

More gracefully handle this situation and log a warning instead,
similar to the handling of missing color spaces in the configuration.

The OCIO configuration access could raise an exception when, for example,
the file is missing:

```
ConstConfigRcPtr Config::CreateFromFile(const char * filename)
{
    if (!filename || !*filename)
    {
        throw ExceptionMissingFile ("The config filepath is missing.");
    }
    ...
```

Pull Request: https://projects.blender.org/blender/blender/pulls/132479
2024-12-31 10:28:46 +01:00
Sergey Sharybin
36aa819396 Fix: Uninitialized last intersection type in Cycles
It is unknown to cause any actual problems, but it makes it harder
to read certain debug logs (like the ones from valgrind).

Pull Request: https://projects.blender.org/blender/blender/pulls/132450
2024-12-31 10:26:21 +01:00
Sergey Sharybin
ba4c79feee Fix: Huang hair sampling does not advance LCG
The reason for this probably was the const nature of the shader data.
However, this is something counter-intuitive, as it potentially leads
to multiple BSDFs re-using the same LCG state.

Pull Request: https://projects.blender.org/blender/blender/pulls/132456
2024-12-31 10:25:19 +01:00
Hans Goudey
39f7c506b5 Refactor: Tweak draw_pbvh.cc code organization
With the goal of removing the type and custom data domain from
the attribute requests, tweak the order of the calls to ensure that
each vertex buffer is allocated until after we know about the source
mesh data format. After that, it makes more sense to have the loop
over BVH nodes inside each extraction function.

Pull Request: https://projects.blender.org/blender/blender/pulls/132467
2024-12-31 01:06:00 +01:00
Brecht Van Lommel
aa97467f6f Fix: Random crash in Cycles BVH2 build
Could occasionally happen for GPU rendering without hardware ray-tracing,
depending on thread timing.
2024-12-31 00:50:44 +01:00
Brecht Van Lommel
c82536673e Fix: ASAN warning due to wrong and unnecessary cast 2024-12-31 00:50:44 +01:00
Brecht Van Lommel
4453ca25b4 Fix: Cycles table precompute app build failure 2024-12-31 00:50:44 +01:00
Brecht Van Lommel
fe368edbb3 Fix: Cycles lite build failure without Pugixml 2024-12-31 00:50:44 +01:00
Brecht Van Lommel
58aec853e9 Fix: Cycles standalone link failure on macOS 2024-12-31 00:50:44 +01:00
Brecht Van Lommel
068a765271 Cleanup: Hydra compiler warnings 2024-12-31 00:50:44 +01:00
Brecht Van Lommel
7e9a48eb98 Cleanup: ATTR_RADIUS unused warning with clang 2024-12-31 00:50:43 +01:00
Brecht Van Lommel
d3d19724d8 CLeanup: Guard against import set_rpath.py as a module
Avoids errors with the system python test.
2024-12-31 00:20:49 +01:00
Brecht Van Lommel
00a51b18b7 Fix: System python test failure after #132432
The text keyword is an alias of universal_newlines, and was introduced
in newer Python versions.
2024-12-31 00:20:32 +01:00
Hans Goudey
fbc5710ddd Cleanup: Formatting 2024-12-30 14:56:50 -05:00
feelamee
5920b157f6 install_linux_packages: fallback to doas if sudo is not found
Just convenience change to increase UX for little part of linux users, who love `doas`)

P.S.: doas is...
> Like sudo, doas is used to assume the identity of another user on the system.

from https://wiki.archlinux.org/title/Doas

Pull Request: https://projects.blender.org/blender/blender/pulls/132432
2024-12-30 20:22:31 +01:00
Hans Goudey
6871fe8415 Cleanup: Use Span for GPU batch array
Pull Request: https://projects.blender.org/blender/blender/pulls/132464
2024-12-30 18:55:23 +01:00
Hans Goudey
7366dc1edb Cleanup: Remove unused draw cache function declarations 2024-12-30 12:12:23 -05:00
Hans Goudey
2f0d1a52f9 Cleanup: Formatting 2024-12-30 11:37:25 -05:00
Hans Goudey
e8adf05b1b Cleanup: Move data transfer enum to more specific header 2024-12-30 11:18:39 -05:00
Hans Goudey
645624130d Cleanup: Simplify creation of mesh for particle system conversion 2024-12-30 11:13:47 -05:00
Hans Goudey
e8db6b9966 Cleanup: Use attribute API for Alembic crease import 2024-12-30 11:13:47 -05:00
Hans Goudey
dacc9455ba Cleanup: Remove unused color math functions
Unused for at least 14 years.
2024-12-30 11:13:47 -05:00
Omar Emara
9baa10f2ae Compositor: Add default accessors for single value results
Add an accessor for single value results that can return a default value
for non single value results.
2024-12-30 18:08:33 +02:00
Hans Goudey
973fb062a0 Cleanup: Move data_transfer_intern.h to C++
Pull Request: https://projects.blender.org/blender/blender/pulls/132461
2024-12-30 17:03:48 +01:00
Alaska
64bd2e79ea Cycles: Expose Adaptive Compile debug options for Metal and HIP in the UI
Cycles supports a feature known as "Adaptive Compile" which will
compile the GPU kernel at runtime with only the features neccesary
for the current scene.

This is primarily used for debugging purposes and is not advised for
general use, because it's not well tested/maintained and leads to
frequent kernel recompilation which can take a long time and interupt
your workflow.

This commits exposes the option to turn this feature on
for the HIP and Metal backends in the Cycles debug UI panel.

Pull Request: https://projects.blender.org/blender/blender/pulls/132459
2024-12-30 16:45:02 +01:00
Bastien Montagne
694fd3bf4b Fix Alembic importer generating invalid edge crease values.
Conversion from [0-1] float value ranges to [0-255] integer char ones
was left in Alembic importer, when the internal Blender storage for
these values was converted from a char in the old `MEdge` struct to a
regular float attribute.
2024-12-30 16:25:30 +01:00
Bastien Montagne
62b84f4eab I18N: updated UI translations from git/weblate repository (60566c7b2accdf). 2024-12-30 16:25:29 +01:00