Part 3/3 of #109135, #110272
Switch to new node group interfaces and deprecate old DNA and API.
This completes support for panels in node drawing and in node group
interface declarations in particular.
The new node group interface DNA and RNA code has been added in parts
1 and 2 (#110885, #110952) but has not be enabled yet. This commit
completes the integration by
* enabling the new RNA API
* using the new API in UI
* read/write new interfaces from blend files
* add versioning for backward compatibility
* add forward-compatible writing code to reconstruct old interfaces
All places accessing node group interface declarations should now be
using the new API. A runtime cache has been added that allows simple
linear access to socket inputs and outputs even when a panel hierarchy
is used.
Old DNA has been deprecated and should only be accessed for versioning
(inputs/outputs renamed to inputs_legacy/outputs_legacy to catch
errors). Versioning code ensures both backward and forward
compatibility of existing files.
The API for old interfaces is removed. The new API is very similar but
is defined on the `ntree.interface` instead of the `ntree` directly.
Breaking change notifications and detailed instructions for migrating
will be added.
A python test has been added for the node group API functions. This
includes new functionality such as creating panels and moving items
between different levels.
This patch does not yet contain panel representations in the modifier
UI. This has been tested in a separate branch and will be added with a
later PR (#108565).
Pull Request: https://projects.blender.org/blender/blender/pulls/111348
On a user level this view transform provides much better handling of colors in
the over-exposed areas.
With this configuration the following display devices are available, including
AgX view transform for them:
* sRGB
* Display P3
* Rec.1886
* Rec.2020
NOTE: There is no Filmic view transform available for the newly added display
devices.
AgX also brings an implementation of False Colors view transform, which replaces
Filmic-based, and is available for all display devices.
The backward compatibility is preserved. The new files will default to AgX view
transform, which makes it non-forward compatible.
More technical details is available in the original PR #106355.
Please note that the PR has been split into more incremental changes when
was landing.
Pull Request: https://projects.blender.org/blender/blender/pulls/111099
An empty string is a valid ID property name, when set, RNA's
internal lookup function (rna_path_token_in_brackets), considered
the path invalid.
Now quoted tokens are allowed to be empty.
This fixes Python exceptions being thrown in the custom property editor
with empty custom property names.
Using this flag from linked data is always a double-edge sword, in one
end some user have been relying on it to keep around data that is not
really used as ID (like e.g. text data-blocks, node trees, see
e.g. #103687, #105687). On the other end, it often causes over-keeping
of linked data reference in production files.
From now on, when an unused linked data is to be kept around, users
should create an ID property to reference it.
Implements #106321.
Pull Request: https://projects.blender.org/blender/blender/pulls/111042
Tests must be enabled manually using the CMake flag `WITH_COMPOSITOR_REALTIME_TEST`. Reasons are F12 for realtime compositor is experimental and buildbots have no GPU. Failing tests are excluded.
Pull Request: https://projects.blender.org/blender/blender/pulls/109878
Added support for UsdSkel animation import.
This addresses #110076.
Added USDSkeletonReader class which imports UsdSkelSkeleton primitives
as armatures.
Extended USDMeshReader to import UsdSkelBlendShape as shape keys.
Extended USDMeshReader to import USD skinning data as as deform groups
and an armature modifier on the mesh object.
Added USDMeshReader::get_local_usd_xform() to override the transform
computation to account for the binding transformation for skinned meshes.
Pull Request: https://projects.blender.org/blender/blender/pulls/110912
The `Find*.cmake` modules originally used uppercase commands to match
CMake's own conventions. Since then CMake uses lower-case and even
within our own find modules, using all uppercase wasn't done
consistently. Opt for lowercase everywhere.
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.
While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.
Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.
Some directories in `./intern/` have also been excluded:
- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.
An "AUTHORS" file has been added, using the chromium projects authors
file as a template.
Design task: #110784
Ref !110783.
In RNA collections storing ID references, the name of the collection
item may not always be unique, when several IDs from different libraries
are present.
While rare, this situation can become deadly to liboverride, by causing
random but exponential liboverride hierarchies corruptions.
This has already been alleviated by using preferably both name and index
in items lookup (a05419f18b) and by reducing the risk of name collision
in general between liboverrides and their linked reference (b9becc47de).
This commit goes further, by ensuring that references to items of RNA
collections of IDs stored in liboverride operations become completely
unambiguous. This is achieved by storing an extra pointer to the item's
ID itself, when relevant.
Lookup then requires a complete match `name + ID` to be successful,
which is guaranteed to match at most a single item in the whole RNA
collection (since RNA collection of IDs do not allow duplicates, and
the ID pointer is always unique).
Note that this ID pointer is implemented as an `std::optional` one
(either directly in C++ code, or using an new liboverride operation `flag`
in DNA). This allows to smoothly transition from existing data to the
added ID pointer info (when needed), without needing any dedicated
versioning. This solution also preserves forward compatibility as much
as possible.
It may also provide marginal performances improvements in some cases, as
looking up for ID items in RNA collections will first check for the
ID pointer, which should be faster than a string comparision.
Implements #110421.
Pull Request: https://projects.blender.org/blender/blender/pulls/110773
The node_keying_matte.blend test is very sensitive to the exact
pixel values in the input image. It is hard to match the output
between SSE and non-SEE codepaths of sRGB-to-linear conversion,
especially when it is done form the OCIO side.
Note that even without OCIO the match could be very difficult to
achieve, since BLI also implements SSE optimization (although, we
are in better control over there, so might increase the accuracy).
Ref #110685
Pull Request: https://projects.blender.org/blender/blender/pulls/110897
These tests now have basic coverage of:
* Linking data and creating liboverride hierarchy from it.
* Linking that liboverride again.
* Creating liboverride of liboverride.
* Modifying data hierarchy in the library, and testing (recursive)
resync of it.
* ID name collision handling (between modified linked data and
existing overrides).
These are meant to test Hydra integration. Currently they are only enabled
for WITH_OPENGL_RENDER_TESTS=ON due to similar reasons as Eevee and
Workbench, which is that they require a GPU and results can be platform
dependent due to hardware and driver differences.
There are separate tests for USD and Hydra export paths. The goal is to
make these identical, but they aren't yet. So for that reason they have
separate reference renders, and there is a HTML page to compare them.
Ref #110765
Tests should never depend on the users startup.blend which can have
settings that interfere with tests.
Failure to load the user startup.blend for e.g. prevented
bl_alembic_io_test from passing.
This adds support for running a set of nodes repeatedly. The number
of iterations can be controlled dynamically as an input of the repeat
zone. The repeat zone can be added in via the search or from the
Add > Utilities menu.
The main use case is to replace long repetitive node chains with a more
flexible alternative. Technically, repeat zones can also be used for
many other use cases. However, due to their serial nature, performance
is very sub-optimal when they are used to solve problems that could
be processed in parallel. Better solutions for such use cases will
be worked on separately.
Repeat zones are similar to simulation zones. The major difference is
that they have no concept of time and are always evaluated entirely in
the current frame, while in simulations only a single iteration is
evaluated per frame.
Stopping the repetition early using a dynamic condition is not yet
supported. "Break" functionality can be implemented manually using
Switch nodes in the loop for now. It's likely that this functionality
will be built into the repeat zone in the future.
For now, things are kept more simple.
Remaining Todos after this first version:
* Improve socket inspection and viewer node support. Currently, only
the first iteration is taken into account for socket inspection
and the viewer.
* Make loop evaluation more lazy. Currently, the evaluation is eager,
meaning that it evaluates some nodes even though their output may not
be required.
Pull Request: https://projects.blender.org/blender/blender/pulls/109164
Seems to be a copy-paste error: the first 3 columns
were only compared as float3, not as float4.
Only affected validness of regression tests which might have
missed an actual mismatch between matrices. Likely, all tests
were valid, and this change did not discover failures.
This is the minimal change required to start using modern CMake in the
blender build system. This change is designed to allow small
incremental changes to the build system rather than doing it in one
big bang which would be unmaintainable (for me)
The biggest functional change is, previously all libraries in the
`LIB` section of a `blender_add_lib` call had the `INTERFACE` scope,
which is rarely, if ever the correct scope. This diff changes this to
`PRIVATE`
Concrete implications of this diff :
The `LIB`, `INC` and `INC_SYS` sections of an `blender_add_lib` call
now allow scoping keywords (`PUBLIC`, `PRIVATE,` `INTERFACE`) to
declare the scope of the dependency.
Right now the only library using any modern cmake is
`bf_intern_atomic` which is an header only interface library that will
just advertise its include directories.
This allows us to clean up any `CMakeLists.txt` that adds
`../../../intern/atomic` to its `INC` section to remove it in `INC` by
adding a `PRIVATE bf_intern_atomic` to the `LIB` section.
Pull Request: https://projects.blender.org/blender/blender/pulls/107858
Geometry nodes supports simulation nodes which allows later frames to depend
on previous frames. The existing geometry nodes regression tests only evaluated
the node tree at a single frame and therefore couldn't test the correct behavior of
simulations.
This adds a new kind of regression test that evaluates the scene at multiple
consecutive frames and then checks if the last frame matches.
Pull Request: https://projects.blender.org/blender/blender/pulls/109046
There should be no functional changes for the typical usecase,
but it allows to have more tricky setups like pointing to a
BAT script to override some configuration.
The issue is that BAT scripts do not support new lines in the
command line arguments. That's where single-line python expression
helps.
For example, it is possible to point benchmark script to a blender.bat
which contains
blender.exe --python-expr "import bpy; bpy.context.preferences.addons['cycles'].preferences.use_oneapirt = False" %*
to have side-by-side numbers of oneAPI with and without HW RT.
Without this change the %* is which did not work: the BAT
script did not "see" part of the command line past the new line.
Pull Request: https://projects.blender.org/blender/blender/pulls/109006
The scene contains some interesting names, which requires to be
written as utf-8. And on Windows file descriptor is not guaranteed
to be using utf-8. Or, will error out if the invalid utf-8 sequence
is written.
This change makes it so running benchmarks on windows it fully successful.
Pull Request: https://projects.blender.org/blender/blender/pulls/108982
Windows does not really have an idea of shebangs, and it needs to
go via a file extension to see that the script is to be executed
by Python.
This change simplifies execution from `python3 benchmark ...`
to `benchmark.py ...`.
Pull Request: https://projects.blender.org/blender/blender/pulls/108971