Age | Commit message (Collapse) | Author |
|
by default.
Avoids having to manually enable data-blocks for user-edition when you
do not care about what should be edited by whom. Similar to default
behavior before introduction of system overrides (aka non-user-editable
overrides).
|
|
Conflicts:
source/blender/blenkernel/intern/lib_override.c
|
|
That max number of `10000` level of recursivity was a typo (should have
been `1000`), but even that is way too high, typical sane situation
should not lead to more than a few tens of levels, so reducing the max
level to 200.
Also improve error message with more context info about the issue.
Found while investigating issues for the Blender Studio's Heist production.
|
|
loops."
This reverts commit e42e4e8568edeb4e0b962e2059586c2a3d3b457d.
Wrong commit, sorry for the noise.
|
|
That max number of `10000` level of recursivity was a typo (should have
been `1000`), but even that is way too high, typical sane situation
should not lead to more than a few tens of levels, so reducing the max
level to 200.
Also improve error message with more context info about the issue.
Found while investigating issues for the Blender Studio's Heist production.
|
|
Was an old known annoying issue, since the matching RNA property is
read-only we need a manual handling of this in override applying and
resyncing code.
|
|
|
|
If making liboverride of an empty collection, this (root of override
hierarchy) collection would get untagged in code when checking for
collections that do not need to be overridden, leading to not overriding
this root collection, and later in code to using NULL pointer.
|
|
If we produce CLOG_ERROR messages and the error is not actually
critical, there is no point in asserting too.
Mainly related to ID user counts, and a few other ID management areas.
|
|
Replace some `if/else if` chains by proper `switch` statement.
Replace some `BLI_assert(0)` calls by `BLI_assert_unreachable()` ones.
|
|
The 'OVERRIDE_HIDDEN' extra collection would often be mistakenly added
to a linked collection, which is totally forbidden and guaranteed to
crash on undo/redo.
Reworked the code instantiating that extra collection in a more generic
and hopefully robust way now.
|
|
|
|
Followup to rB6c679aca1770c37.
|
|
Code was not really designed to hanlde corrupted (e.g. local ID) root
hierarchies, now it should handle better those invalid cases and restore
proper sane situation as best as possible.
Fixes crashes with some corrupted files from Blender studio.
|
|
|
|
single' operations.
'Delete' was a confusing name, even though it would delete the overrides
it would replace them by linked data.
Adding the 'single' version of that operation made it even more
confusing, since often it has to keep the override ID for sakes of
hierarchy, and just reset it and turn it back into a non-editable system
override.
Ref: {T95707}.
|
|
creation/duplication/resync code, and some basic do_version.
When creating with hierarchies, core code only generates system
overrides, responsibility to define 'user overrides' is then for the
higher-level calling code (Editor/Operator-level).
do_version code uses fairly basic euristics, should be good enough here
though in most cases. and can always be refined later if needed.
Ref: {T95707}.
|
|
This merely adds the flag, exposes it in RMA, and uses it in some of the
most common 'is editable' checks (RNA, `BASE_EDITABLE` macro...).
Next step: do_version and defining systemoverrides at creation.
Ref: {T95707}.
|
|
partial overrides of a same hierarchy.
If creating partial hierarchy overrides (from the outliner e.g.), that
need to create extra overrides, those could be re-created everytime,
leading to very bad situation where there would be several overrides of
the same reference ID in the same override hierarchy.
This fix makes it so that existing overrides in a given hierarchy will
always be re-used in case other overrides are added to the hierarchy.
|
|
Similar to other changes to ID remapping, gives huge speedups in some
cases, like certain types of liboverride creation.
Case from {T96092} goes from 1725 seconds (almost 30 minutes) to 45
seconds to generate the liboverride, on my machine.
Reviewed By: jbakker
Maniphest Tasks: T96092
Differential Revision: https://developer.blender.org/D14240
|
|
So far it was needed to declare a new RNA struct to `RNA_access.h` manually.
Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property
declarations. Now this also includes the RNA struct declarations, so they don't
have to be added manually anymore.
Differential Revision: https://developer.blender.org/D13862
Reviewed by: brecht, campbellbarton
|
|
|
|
While uncommon, this is still a valid case...
|
|
Code cleaning up no-more-needed override data during diffing process
would systematically remove override data from linked IDs.
While this is not a critical issue in theory, it has bad consequences at
the very least on user UI/UX, and potentially can cause bugs in some
corner-cases scenarii.
|
|
Was already mostly the case, but from RNA API there was no proper check.
|
|
This affects essentially the Outliner 'create hierarchy' tool currenlty.
Previously code did not handle properly hierarchy root in case overrides
where created from a non-root ID (e.g. an object inside of a linked
collection), and in case additional partial overrides were added to an
existing partially overrided hierarchy.
Also did some renaming on the go to avoid using 'reference' in override
context for anything else but the reference linked IDs.
|
|
|
|
|
|
While this should not happen in theory, very bad/broken/dirty files can
lead to such situations.
So we need to re-ensure valid root IDs after resync (for now, done after
each 'library indirect level' pass of resync, this may not be 100%
bulletproof though, time will say).
Found while investigating Blender studio issues in Snow parkour short.
|
|
root ID.
In some cases broken files could lead to selecting a shapekey as
hierarchy root ID, which is not allowed.
Found while investigating Blender studio issues in Snow parkour short.
|
|
usages.
|
|
We do not always resync/replace the root ID of a hierarchy now that we
do partial resync.
|
|
doversion.
Drivers make it way too easy to create dependenciy loops between IDs, so
need to use the same trick as in other dependency-following code in this
file to prevent those infinite loops.
hard to predict for sure how bad of a hierarchy root this can end up
producing, but in general cases think this should be OK.
|
|
Reduce compute effort of liboverrides resync process by only re-syncing
the parts of the override hierarchy that actually need it.
The main change compared to existing code (which was systematically resyncing
a whole override hierarchy), is that resyncing now operates over several
sub-hierarchies at once, each defined by their own 'resync root' ID.
This ensures that we do not get several new overrides for the same data inside
of the same hierarchy.
Implements T95682.
Differential Revision: https://developer.blender.org/D14079
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
|
|
While applying liboverrides on linked data, RNA code (in
`rna_property_override_check_resync`) would detect a lot of false positive
regarding IDs needing resync, because the temporary ID used to apply
overrides was always local, breaking the libraries comparison check.
NOTE: that whole 'apply liboverrides' code could use some refreshment,
it did not change much from initila version several years ago, we now
have better tools and control over non-main data.
But for now the 'trick' in that commit should do the job, ultimately
those temps IDs should never be put in Main at all.
|
|
Decouple the reference (linked) root ID and the hierarchy (override) root ID.
Previous code was assuming that the reference ID was always also tagged
for override creation, which is true in current master, but cannot be
assumed in general (and won't be true with partial resync anymore).
Also add asserts to validate conditions that the reference/hierarchy_root
variables must meet.
|
|
- Order year consistently.
- Minor consistency (case, double-spacing).
- Correct typos.
|
|
This new info simplifies greatly the handling of resync and deleting
liboverride hierarchies, and makes those operations more robust to
complex dependencies cases between different hierarchies.
Related to T95283.
|
|
This change will make handling of liboverrides hierarchies (especially
resyncing) much easier and efficient. It should also make it more
resilient to 'degenerate' cases, and allow proper support of things like
parenting an override to another override of the same linked data (e.g.
a override character parented to another override of the same
character).
NOTE: this commit only implements minimal changes to add that data and
generate it for existing files on load. Actual refactor of resync code
to take advantage of this new info will happen separately.
|
|
This change will make handling of liboverrides hierarchies (especially
resyncing) much easier and efficient. It should also make it more
resilient to 'degenerate' cases, and allow proper support of things like
parenting an override to another override of the same linked data (e.g.
a override character parented to another override of the same
character).
NOTE: this commit only implements minimal changes to add that data and
generate it for existing files on load. Actual refactor of resync code
to take advantage of this new info will happen separately.
|
|
Iterating over scene's objects while we modify those (through proxy to
override conversion code) is call for problems (use after free etc.).
Instead, all proxy objects need to be gathered first in a temporary
list, and processed all at once in a second loop.
|
|
|
|
collections.
Those cases are fairly hard to track down... Added some more checks,
also at lower levels, more generic levels of object editing, and fixed
core check in liboverride (previously code was assuming that an override
of a collection only could have overrides of objects or linked objects,
but this is not necessarily true).
|
|
This will allow to keep the access to deprecated DNA proxy data in that
specific file, instead of allowing deprecated accesses in the whole
override kernel code.
Part of T91671.
|
|
|
|
Part of the resynching code would access collections' objects base
cache, which can be invalid at that point (due to previous ID remapping
and/or deletion). Use a custom recursive iterator over collections'
objects instead, since those 'raw' data like collection's objects list,
and collection's children lists, should always be valid.
Found while investigating a studio production file.
|
|
So far linked proxies were just kept as-is, this is no longer an option.
Attempt to convert them into liboverrides as much as possible, though
some cases won't be supported:
- Appending proxies is broken since a long time, so conversion will fail
here as well.
- When linking data, some cases will fail to convert properly. in
particular, if the linked proxy object is not instanced in a scene
(e.g. when linking a collection containing a proxy as an
epty-instanced collection instead of a view-layer-instanced collection).
NOTE: converion when linking/appending is done unconditionnaly, option
to not convert on file load will be removed in next commit anyway.
Part of T91671.
|
|
This will help when dealing with liboverrides from other library files,
e.g for resync or proxies conversion.
This commit only affects proxy conversion.
Part of T91671.
|