In certain setups where passes are used in the viewport compositor,
blender will crash. This happens because passes may not be available
when the compositor first run but then become available in later runs.
Possibly because EEVEE is still compiling shaders. This is problematic
for the compositor because it caches the result of node tree compilation
for the specific data available, like passes, and the compositor does
not get informed when data becomes available like in the case of EEVEE
to invalidate the cached node tree compilation result.
Caching of node tree compilation was always a source of bugs but we
managed to workaround them in the past, so before we work on a fix for
this crash, we first evaluate the removal of caching to see if we can
live without it. Especially since a fix will be rather involved for the
release branch at this stage.
The time it takes to compile the node tree is:
- Small Tree (~10 nodes): 0.3ms.
- Medium Tree (~50 nodes): 0.6ms.
- Huge Tree (~300 nodes): 3ms.
The difference is not noticeable to the eye, probably since as the tree
becomes bigger, the evaluation time becomes more dominant, and small
trees are fast to compile.
It should be noted that we intended to remove caching in the future to
support things like lazy evaluation of node inputs, but we though a few
optimization needs to be done on the GPUMaterial compiler side to make
compilation faster, since it is the main bottleneck during compilation.
So considering this, I think it is acceptable to disable caching of node
tree compilations for the time being. I intend to optimize it such that
it always becomes less than 1ms, but we will have to delay that to 4.5.
Pull Request: https://projects.blender.org/blender/blender/pulls/134394
Not really sure why only type and owner_id were cleared here?
Especially when code like `pyrna_struct_CreatePyObject` would check
for both `data` and `type` to be null to consider the pointer as None...
Happens to 'fix' #134311, since now cleared PointerRNA are 'just'
reset to `PointerRNA_NULL`. Would not work if the data was not an
ID PointerRNA though...
NOTE: In general, what is considered an invalid PointerRNA is still very
loosely designed in our code-base, we'll have to address this.
Pull Request: https://projects.blender.org/blender/blender/pulls/134393
Not really sure why only type and owner_id were cleared here?
Especially when code like `pyrna_struct_CreatePyObject` would check
for both `data` and `type` to be null to consider the pointer as None...
Happens to 'fix' #134311, since now cleared PointerRNA are 'just'
reset to `PointerRNA_NULL`. Would not work if the data was not an
ID PointerRNA though...
NOTE: In general, what is considered an invalid PointerRNA is still very
loosely designed in our code-base, we'll have to address this.
Pull Request: https://projects.blender.org/blender/blender/pulls/134393
This was probably caused by 3ef2ee7c53.
Now `build_layer_group_buttons` doens't need to
select a specific icon anymore. It's handled by the
RNA property.
Likely caused by d94a56bdad. In `ANIMDATA_FILTER_CASES` macro,
function call to `animfilter_nla` is not made due to legacy action
condition checks. Since legacy actions are already converted to new
layered action structure in `convert_legacy_animato_actions`, it seems
safe to remove those conditions from macro.
Pull Request: https://projects.blender.org/blender/blender/pulls/134209
Writing a blend file to a path that references a directory wasn't
being handled correctly.
When the save "versions" was greater than zero the directory would
be renamed (adding a 1), otherwise there would be a
"Version backup failed" error.
Resolve by exiting with an error in the unlikely event the user saves
over a directory.
Part of a fix for #134101.
Ref !134384
This adds two properties `next_node` and `prev_node` to the
`GreasePencilTreeNode` RNA struct.
This reflects how the tree nodes are stored in DNA (as a linked list).
Pull Request: https://projects.blender.org/blender/blender/pulls/134353
There seems to be a pattern where this commonly failed.
This patch adds the async flush (which is effectively not async)
when there were no previous call to `async_flush_to_host`.
This is only done on Intel Macs (or any mac that has non
unified memory arch).
Pull Request: https://projects.blender.org/blender/blender/pulls/134216
The `Plane` brush type does not use the original plane/normal
parameters. However, these parameters can be incorrectly retained when
switching type to `Plane` from another brush type where they were
enabled. This commit ensures that they are ignored for the `Plane` brush
type.
Pull Request: https://projects.blender.org/blender/blender/pulls/134255
Remove intermediate `CsvData` struct and create a point cloud
directly instead. Though the bottleneck is almost certainly parsing
the file, this removes a copy for the attribute values and reduces
peak memory usage.
Also do some small cleanups to the import process: use C++
casting, prefer StringRef over std::string, remove unnecessary
whitespace, and remove non-helpul comments.
This adds a base class for `GreasePencilLayer` and
`GreasePencilLayerGroup` called `GreasePencilTreeNode`.
This reflects how the data is structured in DNA. Properties
that are shared among layers and groups are part of the
tree nodes. Examples are `name`, `hide`, `select`, etc.
This should not be a breaking change. Addons are expected
to work as they were before.
With this change, layer groups now also have access to the
`channel_color` and `select` property.
Pull Request: https://projects.blender.org/blender/blender/pulls/134348
The use of `GeometryDeformation` is incorrect for computing the bounds:
It contains _evaluated_ positions for the _original_ points, but does not
match the size of evaluated geometry after constructive modifiers like
Line-Art. For the bounds the evaluated positions should be used as-is.
Pull Request: https://projects.blender.org/blender/blender/pulls/134325
f0db870822 added support for tree-views to remember state, but only to
remember their custom height for the start. This change makes the scroll
offset be remembered too.
Not remembering the scroll offset can be very annoying in some cases,
e.g. when working with bone collections and changing the active tab in
the properties editor often. In realistic, non-trivial bone collection
set ups this can lead to a lot of repeated scrolling.
Cherry-picked for the 4.4 release since this solves a real usability
issue with trivial changes. Discussed with Thomas and others.
Original code used the wrong type of `BLI_findstring` function, leading
to the parameters being read incorrectly and the `MaskingLayer `duplicate
check working incorrectly.
This PR changed `BLI_findstring` to `BLI_findstring_ptr`, resulting in the
`LayerMask` names being read correctly and the duplcate check working
as expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/134295
The root cause is still unknown. But this patch disables
rendering of objects that will produce no volumetric effect.
This does fix the issue reported.
f0db870822 added support for tree-views to remember state, but only to
remember their custom height for the start. This change makes the scroll
offset be remembered too.
Not remembering the scroll offset can be very annoying in some cases,
e.g. when working with bone collections and changing the active tab in
the properties editor often. In realistic, non-trivial bone collection
set ups this can lead to a lot of repeated scrolling.
The usual issue of non-trivial C++ data being allocated with C-style
`alloc` code.
Also added more default initializers to some generic RNA-related structs
that embded some `PointerRNA` members.