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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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.