A few ID types are considered as 'never unused' in Blender (UI related
ones, the Libraries and the Scenes). Local IDs of this type are always
considered as used, even if no other ID links to them.
This was previously fairly weekly defined and implemented (mainly in the
writefile code and the 'tag unused' libquery functions).
This commit formalize this characteristic of ID types by adding a new
`IDTYPE_FLAGS_NEVER_UNUSED` flag, and using this in the few places in
the code that handle unused IDs.
The issue originates to the change in default view transform from Filmic
to AgX, which does slightly different clipping, and clips color to black
if there is any negative values.
This change implements an idea of skipping view transform for viewer
node when it is connected to the Pick output of the cryptomatte node.
It actually goes a bit deeper than this and any operation can tag its
result as a non-color data, and the viewer node will respect that.
It is achieved by passing some extra meta-data along the evaluation
pipeline. For the CPU compositor it is done via MetaData, and for the
GPU compositor it is done as part of Result.
Connecting any other node in-between of viewer and Cryptomatte's Pick
will treat the result as color values, and apply color management.
Connecting Pick to the Composite output will also consider it as color,
since there is no concept of non-color-managed render result.
An alternative approaches were tested, including:
- Doing negative value clamping at the viewer node.
It does not work for legacy cryptomatte node, as it needs to have
access to original non-modified Pick result.
- Change the order of components, and store ID in another channel.
Using one of other of Green or Blue channels might work for some view
transforms, but it does not work for AgX.
Using Alpha channel seemingly works better, but it is has different
issues caused by the fact that display transform de-associates alpha,
leading to over-exposed regions which are hard to see in the file from
the report. And might lead to the similar issues as the initial report
with other objects or view transforms.
- Use positive values in the Pick channel.
It does make things visible, but they are all white due to the nature
of how AgX works, making it not so useful as a result.
Pull Request: https://projects.blender.org/blender/blender/pulls/122177
Scenes that have no children displayed (either because there was nothing
to display or because we didn't expand the sub-tree, such as in the
"Unused Data" display mode) would always have a chevron icon indicating
the collapsed state, but it wasn't interactive. As such it just felt
broken. This explicit exception to always draw the chevron for scene
elements was added a long time ago (13 years ago or longer), and I
couldn't find any good rationale for it.
For example scenes would make the entire collections & objects hierarchy
show up, even if these collections/objects are linked into other scenes.
So this was misleading, and from what I can tell not intentional, as a
comment in `TreeDisplayIDOrphans::build_tree()` indicates. Also
validated with Bastien.
active element in properties panel is not updated after selecting group
from outliner. To fix this, remove the layer specific condition.
Also renamed the function for clarity.
Pull Request: https://projects.blender.org/blender/blender/pulls/121970
The `radius_from_input_sample` function did not depend
on the layer transformation. This refactors the code a bit
and makes sure we use the right `to_world` matrix for the
transformation.
This allows each path to optionally specify a single array index,
enabling `insert_key_rna()` to optionally insert keys for just a single
element of an array property. This will allow us to use it in more
places, and eventually reduce the total number of keying functions
needed in the code base.
PR #121879
Pull Request: https://projects.blender.org/blender/blender/pulls/121879
This new type was initially motivated by a use case in the animation
code, where we want to pass RNA paths around as a string-index pair.
The final design was reached after discussion and review from Bastien
Montagne (mont29), with the aim of making the type generally useful for
many areas of Blender.
PR #121879
When VK_EXT_maintenance4 extension is used at device creation its
extension should also be part of the device extension list.
This wasn't the case and would trigger UB in the validation layers.
Pull Request: https://projects.blender.org/blender/blender/pulls/122208
Add fast image writing and reading variants for RT passes.
These variants do not perform range checking on values
and should only be used in cases where the written texel is
guaranteed to be in range. This eliminates additional
branching and simplifies shader logic.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/121117
Add fast image writing and reading variants for render passes.
These variants do not perform range checking on values
and should only be used in cases where the written texel is
guaranteed to be in range. This eliminates additional
branching and simplifies shader logic.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/121116
This was caused by 8d8d358196f86b7acc7dec1c2580f171b08d0827
(changed the active layer to be an active node)
which overlooked the undo code.
This makes sure we save the name of the active node
in each undo step and set the active node based on this
name when decoding a step.
Pull Request: https://projects.blender.org/blender/blender/pulls/122195
Display descriptive tooltip for this socket function in any editor.
In case of geometry nodes, there is no point to display info about
lack of value, so cleanup this.
Pull Request: https://projects.blender.org/blender/blender/pulls/121798
The only ID usages that make it a 'used' ID are its own 'fake user'
flag, and normal refcounting usages from other IDs.
This was already the behavior of the Purge operation, but the Outliner
view would still hide IDs who were only used by shallow 'extra' usages
(typically the UI, e.g. the Image Editor).
Hovering the mouse over the 3D viewport while a layer group
was active would cause a crash if the brush radius unit was `Scene`.
This was because the `DrawingPlacement` helper expected a
layer to be passed to the constructor.
Since it's not always the case that there is an active layer, this
change makes sure that we fallback to "object space" in
the drawing placement.
The `ANIM_animdata_update` wasn't handling the GPv3 cases.
This meant that e.g. changing the selection of keyframes did not
cause an update to be triggered.
This fixes the issue by making sure we call `ANIM_list_elem_update`
for all the grease pencil channel types.
Pull Request: https://projects.blender.org/blender/blender/pulls/122167
It originally came from the Compositor work about optimizing Glare
node (#121653), but it might be used in more places later as well.
This PR only contains changes to the build system, the library
itself needs to be re-compiled.
Ref #118455
Pull Request: https://projects.blender.org/blender/blender/pulls/121816
While having negative values in the data itself seems fine (at least
there is nothing in the design forbidding it, and it was also allowed in
GPv2 data), drawing code should only accept positive values, and clamp
negative ones to zero:
* It matches GPv2 behavior.
* Drawing code uses negative values as some sort of 'flag' for
rounded tips of strokes.
Note: This is a follow-up of !120840.
Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/122173
glTF specification says that VC must be used as a base color multiplier, so you should add it to your node tree to see it.
But seems common usage of VC is to use it for custom data. Custom properties/attribute is the best place for these data,
but in order not to break production workflow/pipeline, we add an option to export active VC
Splash screen notification text:
- When starting in "Offline mode" with repositories with installed
packages enabled, the text is clickable unless launched with
`--offline-mode`, the tooltip notes that the command line setting
can't be changed at run-time.
- Don's show anything if there are not extensions installed.
Preferences:
- Don't show the welcome message on preferences if:
- Blender is online.
- The message was dismissed.
- There are no enabled remote repositories.
- The option to enable extensions.blender.org has been replaced with
a button that switches to the "System" tab where Online Access
can be enabled.
Also expose bpy.app.online_access_override needed for the UI to check
if online access was disabled using command line arguments.
Blender crashes when calling the python render operator when GPU
compositor execution is enabled. This is due to a missing system GPU
context, which is not initialized for blocking rendering. So this patch
ensures the system GPU context before compositing. Additionally, it
removes the assert that ensures a non main thread execution, since the
assumption apparently does not really hold.
Pull Request: https://projects.blender.org/blender/blender/pulls/122176