Commit Graph

2207 Commits

Author SHA1 Message Date
Lukas Tönne d2f4ebcd6a Fix #112331: Add update tags directly in bNodeTreeInterface API methods
Calling an API function after the node panels patch does not internally
tag the node tree with `NTREE_CHANGED_INTERFACE` any more, because the
node tree is not directly accessible from `bNodeTreeInterface`. Before
node panels the API functions for interfaces could tag the tree directly
for later update consideration, which now requires explicit tagging
calls.

The fix is to add a flag and mutex directly to `bNodeTreeInterface`, so
API methods can tag after updates. This mostly copies runtime data
concepts from `bNodeTree`. The `ensure_interface_cache` method is
equivalent to `ensure_topology_cache` and should be called before
accessing `interface_inputs` and similar cache data.

Pull Request: https://projects.blender.org/blender/blender/pulls/111741
2023-09-14 14:13:07 +02:00
Jacques Lucke b5c89822ac RNA: return PointerRNA from rna create functions
There are a couple of functions that create rna pointers. For example
`RNA_main_pointer_create` and `RNA_pointer_create`. Currently, those
take an output parameter `r_ptr` as last argument. This patch changes
it so that the functions actually return a` PointerRNA` instead of using
the output parameters.

This has a few benefits:
* Output parameters should only be used when there is an actual benefit.
  Otherwise, one should default to returning the value.
* It's simpler to use the API in the large majority of cases (note that this
  patch reduces the number of lines of code).
* It allows the `PointerRNA` to be const on the call-site, if that is desired.

No performance regression has been measured in production files.
If one of these functions happened to be called in a hot loop where
there is a regression, the solution should be to use an inline function
there which allows the compiler to optimize it even better.

Pull Request: https://projects.blender.org/blender/blender/pulls/111976
2023-09-06 00:48:50 +02:00
Jacques Lucke 7d2c854261 Geometry Nodes: generalize modifier simulation cache storage names
The main goal here is to rename things in a way that makes sense for
simulation baking, but also for the upcoming bake node.

This also removes some versioning code from 3.6 which initialized the
default bake path. Baked data from back then can't be loaded anymore
anyway, and the way the default path is generated is different now as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/111845
2023-09-03 16:14:11 +02:00
Hans Goudey fa34992def Cleanup: Remove unnecessary includes from C++ data structure headers
The hash tables and vector blenlib headers were pulling many more
headers than they actually need, including the C base math header,
our C string API header, and the StringRef header. All of this
potentially slows down compilation and polutes autocomplete
with unrelated information.

Also remove the `ListBase` constructor for `Vector`. It wasn't used
much, and making it easy to use `ListBase` isn't worth it for the
same reasons mentioned above.

It turns out a lot of files depended on indirect includes of
`BLI_string.h` and `BLI_listbase.h`, so those are fixed here.

Pull Request: https://projects.blender.org/blender/blender/pulls/111801
2023-09-01 21:37:11 +02:00
Lukas Tönne e071288ab2 Nodes: Panels integration with blend files and UI
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
2023-08-30 12:37:21 +02:00
Nathan Vegdahl 9eee076a29 Anim: add custom property support for Bone Collections
Pull request: https://projects.blender.org/blender/blender/pulls/109976
2023-08-29 14:31:18 +02:00
Sybren A. Stüvel 998136f7a7 Anim: replace Bone Groups & Armature Layers with Bone Collections
Armature layers (the 32 little dots) and bone groups are replaced with
Bone Collections:

- Bone collections are stored on the armature, and have a name that is
  unique within that armature.
- An armature can have an arbitrary number of bone collections (instead
  of the fixed 32 layers).
- Bones can be assigned to zero or more bone collections.
- Bone collections have a visibility setting, just like objects in scene
  collections.
- When a bone is in at least one collection, and all its collections in
  are hidden, the bone is hidden. In other cases (in any visible
  collection, or in no collection at all), the bone visibility is
  determined by its own 'hidden' flag.
- For now, bone collections cannot be nested; they are a flat list just
  like bone groups were. Nestability of bone collections is intended to
  be implemented in a later 4.x release.
- Since bone collections are defined on the armature, they can be used
  from both pose mode and edit mode.

Versioning converts bone groups and armature layers to new bone
collections. Layers that do not contain any bones are skipped. The old
data structures remain in DNA and are unaltered, for limited forward
compatibility. That way at least a save with Blender 4.0 will not
immediately erase the bone group and armature layers and their bone
assignments.

Shortcuts:

- M/Shift+M in pose/edit mode: move to collection (M) and add to
  collection (shift+M). This works similar to the M/Shift+M menus for
  objects & scene collections.
- Ctrl+G in pose mode shows a port of the old 'bone groups' menu. This
  is likely to be removed in the near future, as the functionality
  overlaps with the M/Shift+M menus.

This is the first commit of a series; the bone collections feature will
be improved before the Blender 4.0 release. See #108941 for more info.

Pull request: https://projects.blender.org/blender/blender/pulls/109976
2023-08-29 14:31:18 +02:00
Campbell Barton c52965e9c7 Cleanup: simplify struct declarations 2023-08-23 13:45:19 +10:00
Bastien Montagne 7a0a406ff8 Core: foreach_id: add optional support for deprecated ID pointers.
This commit adds a new option flag to the lib_query foreach_id code,
which will make deprecated ID pointers to be processed as well.

NOTE: Currently there is no report to the callbakcs about the fact that
it is processing a deprecated ID. This can be easily added later if it
becomes necessary.

Part of implementing #105134: Removal of readfile's lib_link & expand code.
2023-08-22 17:47:57 +02:00
Aras Pranckevicius acbd952abf Cleanup: fewer iostreams related includes from BLI/BKE headers
Including <iostream> or similar headers is quite expensive, since it
also pulls in things like <locale> and so on. In many BLI headers,
iostreams are only used to implement some sort of "debug print",
or an operator<< for ostream.

Change some of the commonly used places to instead include <iosfwd>,
which is the standard way of forward-declaring iostreams related
classes, and move the actual debug-print / operator<< implementations
into .cc files.

This is not done for templated classes though (it would be possible
to provide explicit operator<< instantiations somewhere in the
source file, but that would lead to hard-to-figure-out linker error
whenever someone would add a different template type). There, where
possible, I changed from full <iostream> include to only the needed
<ostream> part.

For Span<T>, I just removed print_as_lines since it's not used by
anything. It could be moved into a .cc file using a similar approach
as above if needed.

Doing full blender build changes include counts this way:
- <iostream> 1986 -> 978
- <sstream> 2880 -> 925

It does not affect the total build time much though, mostly because
towards the end of it there's just several CPU cores finishing
compiling OpenVDB related source files.

Pull Request: https://projects.blender.org/blender/blender/pulls/111046
2023-08-16 09:51:37 +02:00
Falk David 969de5135a GPv3: Re-evaluate on frame change
This makes it so the `GreasePencil` geometry gets updated on a time
change.
The frame at which the object gets evaluated is stored in runtime as
`eval_frame`. This is for example used to calculate the bounding box
of the geometry as well as invalidating the batch cache for different
frames.

Pull Request: https://projects.blender.org/blender/blender/pulls/111137
2023-08-15 17:31:11 +02:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
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.
2023-08-16 00:20:26 +10:00
Jacques Lucke cc4d5c432c RNA: move headers to C++
Also see #103343.

Pull Request: https://projects.blender.org/blender/blender/pulls/111022
2023-08-10 22:40:27 +02:00
Aras Pranckevicius d973355b3a Cleanup: reduce amount of math-related includes
Using ClangBuildAnalyzer on the whole Blender build, it was pointing
out that BLI_math.h is the heaviest "header hub" (i.e. non tiny file
that is included a lot).

However, there's very little (actually zero) source files in Blender
that need "all the math" (base, colors, vectors, matrices,
quaternions, intersection, interpolation, statistics, solvers and
time). A common use case is source files needing just vectors, or
just vectors & matrices, or just colors etc. Actually, 181 files
were including the whole math thing without needing it at all.

This change removes BLI_math.h completely, and instead in all the
places that need it, includes BLI_math_vector.h or BLI_math_color.h
and so on.

Change from that:
- BLI_math_color.h was included 1399 times -> now 408 (took 114.0sec
  to parse -> now 36.3sec)
- BLI_simd.h 1403 -> 418 (109.7sec -> 34.9sec).

Full rebuild of Blender (Apple M1, Xcode, RelWithDebInfo) is not
affected much (342sec -> 334sec). Most of benefit would be when
someone's changing BLI_simd.h or BLI_math_color.h or similar files,
that now there's 3x fewer files result in a recompile.

Pull Request #110944
2023-08-10 14:51:40 +03:00
Campbell Barton adf58a77ff Cleanup: use LISTBASE_FOREACH & LISTBASE_FOREACH_BACKWARD macros 2023-08-04 08:51:13 +10:00
Campbell Barton 724755879e Cleanup: spelling in comments, use doxygen doc-strings 2023-07-31 10:18:09 +10:00
Campbell Barton ed01e16aa6 Cleanup: quiet uninitialized warnings 2023-07-29 13:47:57 +10:00
Campbell Barton cc892efcd4 Cleanup: use snake case, especially for structs that define callbacks
Use snake case for ShaderFxTypeInfo, ModifierTypeInfo,
GpencilModifierTypeInfo & bConstraintTypeInfo.
2023-07-27 12:21:06 +10:00
Campbell Barton e6dafbed66 Cleanup: spelling in comments 2023-07-26 15:23:26 +10:00
Ray molenkamp 4ea2baf4ae CMake: revert last weeks modernizations
The cleanup of blenkernel last weeks , caused the house of cards to
collapse on  top of bf_gpu's shader_builder, which is off by default
but used on a daily basis by the rendering team.

Given the fixes forward in #110394 ran into a ODR violation in OSL that
was hiding there for years, I don't see another way forward without
impeding the rendering teams productivity for "quite a while" as there
is no guarantee the OSL issue would be the end of it.

the only way forward appears to be back.

this reverts :

19422044ed
a670b53abe
0f541db97c
be516e8c81
3e88a2f44c
4e64b772f5
9547e7a317
07fe6c5a57

The problematic commit was 07fe6c5a57
as blenkernel links most of blender, it's a bit of a link order issue
magnet. Given all these commits stack, it's near impossible to revert
just that one without spending a significant amount of time resolving
merge conflicts. 99% of that work was automated, so easier to just
revert all of them, and re-do the work, than it is to deal with the
merge conflicts.

Pull Request: https://projects.blender.org/blender/blender/pulls/110438
2023-07-25 16:43:21 +02:00
Alexander Gavrilov b248295530 Depsgraph: handle camera switching via markers in context drivers.
Blender allows animating the active camera selection (i.e. scene.camera)
by binding cameras to markers in the timeline. The dependency graph was
completely ignoring this by not building nodes for these cameras (it is
possible to reference a camera not directly included in the scene), and
not taking this into account in driver relations.

This change ensures that all cameras are included in the dependency
graph, and any drivers referencing scene.camera get dependencies on
all cameras of the timeline, and also time itself to ensure switches
are processed.

Pull Request #110139
2023-07-25 14:03:17 +03:00
Alexander Gavrilov 406f601c4b Depsgraph: change the fix for #107081 to handle any Scene references.
The cause of that bug is any dependency on Scene COW, because that is
triggered by selection. Context properties merely are the most reasonable
way for that to happen. Therefore, the special rule should really apply
to any Scene references.

The real motivation is this removes dependency on dvar for when this
code is extracted as a new method in the next commit.

Pull Request #110139
2023-07-25 14:03:17 +03:00
Campbell Barton a82836b6c2 Cleanup: replace typdef with 'using'
Apply modernize-use-using with edits (as it strips out useful info).
2023-07-24 11:04:19 +10:00
Ray molenkamp 19422044ed Cleanup: CMake: Modernize bf_bmesh dependencies
Pretty straightforward

- Remove any bmesh 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/110363
2023-07-22 02:05:21 +02:00
Ray molenkamp 3e88a2f44c Cleanup: CMake: Modernize bf_depsgraph dependencies
Pretty straightforward

- Remove any depsgraph paths from INC
- Add a dependency though LIB when needed

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/110317
2023-07-20 22:13:00 +02:00
Ray molenkamp 4e64b772f5 Cleanup: CMake: Modernize bf_windowmanager dependencies
Pretty straightforward

- Remove any windowmanager paths from INC
- Add a dependency though LIB when needed

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/109984
2023-07-20 18:52:52 +02:00
Ray molenkamp 07fe6c5a57 Cleanup: CMake: Modernize bf_blenkernel dependencies
Pretty straightforward

- Remove any blenkernel paths from INC
- Add a dependency though LIB

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/109939
2023-07-11 19:28:01 +02:00
Hans Goudey f3f05daf11 Cleanup: Remove unused "Simulation" data-block
This data-block was originally added in eb4e3bbe68.
However, that original plan wasn't fully implemented, with simulations
now integrated with geometry nodes and modifiers instead of a separate
data-block. We kept the data-block around anyway since we have the
loose plan of using a similar data-block to make global simulations
connected between multiple objects. But it may be a while before we
implement that, and in the meantime having this just causes confusion.
2023-07-11 10:53:15 -04:00
Ray Molenkamp 04235d0e55 Cleanup: CMake: Modernize bf_blenlib dependencies
Pretty straightforward

- Remove any blenlib paths from INC
- Add a dependency though LIB

Pull Request: https://projects.blender.org/blender/blender/pulls/109934
2023-07-10 22:04:18 +02:00
Ray Molenkamp 57ad866d81 Cleanup: CMake: Modernize bf_guardedalloc dependencies
Pretty straightforward

- Removes any guardedalloc paths from INC
- Adds a dependency though LIB

Pull Request: https://projects.blender.org/blender/blender/pulls/109925
2023-07-10 18:44:19 +02:00
Ray Molenkamp 7cebb61486 Cleanup: CMake: Modernize bf_dna dependencies
There's quite a few libraries that depend on dna_type_offsets.h
but had gotten to it by just adding the folder that contains it to
their includes INC section without declaring a dependency to
bf_dna in the LIB section.

which occasionally lead to the lib building before bf_dna and the
header being missing, while this generally gets fixed in CMake by
adding bf_dna to the LIB section of the lib, however until last
week all libraries in the LIB section were linked as INTERFACE so
adding it in there did not resolve the build issue.

To make things still build, we sprinkled add_dependencies wherever
we needed it to force a build order.

This diff :

Declares public include folders for the bf_dna target so there's
no more fudging the INC section required to get to them.

Removes all dna related paths from the INC section for all
libraries.

Adds an alias target bf:dna to signify it has been updated to
modern cmake

Declares a dependency on bf::dna for all libraries that require it

Removes (almost) all calls to add_dependencies for bf_dna

Future work:

Because of the manual dependency management that was done, there is
now some "clutter" with libs depending on bf_dna that realistically
don't. Example bf_intern_opencolorio itself has no dependency on
bf_dna at all, doesn't need it, doesn't use it. However the
dna include folder had been added to it in the past since bf_blenlib
uses dna headers in some of its public headers and
bf_intern_opencolorio does use those blenlib headers.

Given bf_blenlib now correctly declares the dependency on bf_dna
as public bf_intern_opencolorio will get the dna header directory
automatically from CMake, hence some cleanup could be done for
bf_intern_opencolorio

Because 99% of the changes in this diff have been automated, this diff
does not seek to address these issues as there is no easy way to
determine why a certain dependency is in place. A developer will have
to make a pass a this at some later point in time. As I'd rather not
mix automated and manual labour.

There are a few libraries that could not be automatically processed
(ie bf_blendthumb) that also will need this manual look-over.

Pull Request: https://projects.blender.org/blender/blender/pulls/109835
2023-07-10 15:07:37 +02:00
Campbell Barton 09f1844d75 Cleanup: correct doxy-groups 2023-07-09 21:40:17 +10:00
Campbell Barton 6290451712 Cleanup: spelling in comments 2023-07-09 21:22:45 +10:00
Ray Molenkamp f0ee4c3ffe Cleanup: Cmake: use alias target for bf_intern_atomic
This introduces an alias target `bf::intern::atomic` for
`bf_intern_atomic`. This has the following benefits:

- Any target name with `::` in it will be recognized as an actual
target by cmake, rather than a library name it may not know about.
and will be validated by cmake to exist. Which means if you make
a typo in the LIB section, CMake will error out telling you it
doesn't know about this specific target rather than passing it on
to the build system, where you'll either get build or linker errors
because of said typo.

- Given there is quite a cleanup still to do in the build system,
it won't always be obvious which targets have been updated to
modern targets and which still need to be done. Having a namespaced
target name is a good indicator there.

Pull Request: https://projects.blender.org/blender/blender/pulls/109784
2023-07-07 15:37:02 +02:00
Campbell Barton 23acedd432 Cleanup: code-comments 2023-07-07 15:11:19 +10:00
Ray molenkamp 2dac20e35f CMake/Cleanup: Use bf_intern_atomic target
Use the bf_intern_atomic target rather than adding a relative path
to it in the INC section.

Pull Request: https://projects.blender.org/blender/blender/pulls/109424
2023-06-28 19:12:55 +02:00
Campbell Barton 472c461816 Cleanup: spelling in comments 2023-06-21 11:28:58 +10:00
Campbell Barton d4b23cae8f Cleanup: use C-style comments for descriptive text 2023-06-14 12:20:06 +10:00
Sergey Sharybin ea33172409 Fix de-referencing of null pointer in depsgraph
The accessors of original ID and objects are expected to return
nullptr for the nullptr input. This was handled explicitly in the
DEG_get_evaluated_id(), but the DEG_get_evaluated_object was using
`object->id` without check.

While it did not cause actual issue (as the id's offset is 0), this
was causing address sanitizer error print.

Pull Request: https://projects.blender.org/blender/blender/pulls/108939
2023-06-13 15:41:51 +02:00
Iliya Katueshenock 3a1fdfc439 Fix: Dependency graph visibility flags counting a to nodes as a from
Fixing of typo in accomulating of affected nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/108888
2023-06-13 09:46:27 +02:00
Sergey Sharybin 823514fd6f Fix #108778: Crash when rendering multiple view layers
The rendering pipeline will re-use dependency graph and request
for re-building its relations for every new view layer, and try
to re-use as much evaluation as possible.

This could potentially run into situation when a content of
collection is changed: due to the difference in the per-view
layer visibility. If the evaluated collection has an object cache
this will make the cache to get out-of-sync with the actual
content. The cache on the evaluated collection might be created
when instancing system iterates over the collection.

This change makes it so the cache is freed when the dependency
graph relations are updated. This might be a bit too intrusive.
There might be ways to somehow ensure the content of the collection
is still the same as it was before the relations update, but this
is much more complicated task. Perhaps the performance is already
good enough.

This is a collaboration with Jacques Lucke, who was looking into
the same report, bouncing some ideas back and forth, and helped
testing the patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/108816
2023-06-09 18:42:01 +02:00
Campbell Barton 493a1dd7c8 Cleanup: remove NULL literals in C++ (including comments & strings) 2023-06-04 18:35:12 +10:00
Campbell Barton 74dd0ed09e Cleanup: remove redundant struct qualifiers 2023-06-03 08:54:37 +10:00
Sergey Sharybin c1bc70b711 Cleanup: Add a copyright notice to files and use SPDX format
A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.

This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.

Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.

Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:

    https://reuse.software/faq/
2023-05-31 16:19:06 +02:00
Sergey Sharybin 9b946aeecb Fix #108363: Light linking does not work when linked to self
The code which was preventing this originated to an early days of the
light linking project where bits accumulation was done as part of the
graph evaluation. Since then it was changed to be pre-calculated at
the graph build time.

The updates of the receivers is ensured via the HIERARCHY nodes and
relations between them.

Also made it explicit that the emitter is updated with the tag of
the collection: before it was relying on implicit Copy-on-Write
component tag.

Pull Request: https://projects.blender.org/blender/blender/pulls/108425
2023-05-30 20:22:30 +02:00
Brecht Van Lommel e3ffc8bbfb Cleanup: compiler warnings 2023-05-30 13:51:46 +02:00
Falk David 3aaacd6e30 GPencil 3.0: Initial commit
Adds the initial stage for the grease pencil 3.0 project.

This patch includes:
* New ID and new object type.
* New DNA structures.
* New drawing engine for grease pencil (gpencil-next).
* Tests for the new grease pencil data-type.
* A few operators for conversion, switching modes and (simple) drawing.

Exposed to the user:
* An experimental option to switch to the new grease pencil.
   * This will switch the grease pencil render engine to gpencil-next which can only render the new object type.
     Current grease pencil objects will no longer render.
   * Changing this option currently requires a restart of blender (for the keymap to update).
* A conversion setting in the `Object` > `Convert To` operator.
* A drawing operator in `Draw Mode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/106848
2023-05-30 11:14:16 +02:00
Sergey Sharybin 786c599404 Fix assert in light linking when making an asset
Simple steps to reproduce: mark the default cube as an asset.

Pull Request: https://projects.blender.org/blender/blender/pulls/108306
2023-05-26 11:30:48 +02:00
Campbell Barton f97660d4ad Cleanup: spelling in comments 2023-05-25 22:50:30 +10:00
Sergey Sharybin 1c3e0f3585 Fix #108250: Cycles: Light Linking disabled after modifying object
The runtime backup/restore logic was slightly wrong: it is possible that
an object requires light linking runtime but does not need light linking
itself. This is typical configuration for the receivers/blockers.

Modified the logic so that the evaluated object light linking is allocated
if there was a runtime field needed.

This required to make it so light linking evaluation takes care of feeing
the light_linking if it is empty. The downside of this approach is a
redundant allocation from the object backup when removing light linking
collection from emitter. But this is not a typical evaluation flow, and
the more typical flows are cheap with this approach.

Pull Request: https://projects.blender.org/blender/blender/pulls/108261
2023-05-25 12:59:45 +02:00