Age | Commit message (Collapse) | Author |
|
CacheFile writing code would not write generic ID data (call for it has
been missing since the initial commit, rB61050f75b13e).
While potentially affecting other areas (mostly CustomProperties/IDProperties),
this was a critical failure for liboverrides. Also added some workaround
code to allow opening broken files (though the override of the CacheFile
data-block will be lost).
|
|
RNA collections can store lists of ID pointers, so they require a similar handling for RNA pointers.
|
|
One of the log call could use freed memory.
|
|
This is basically done by ignoring override operations from old override
affecting ID pointer properties, when the new (destination) one is not
NULL.
Fix T86501: New object added to overridden collection doesn't show up in linking file on Resync.
This is more of a work-around actually, since there is no real way to
fix the issue in a fully automated and consistent way, it is caused by
older blender files being saved with 'broken' overrides.
WARNING: This cannot ensure that some purposedly edited/overridden ID
pointer properties won't be lost in the process.
|
|
We can fairly easily detect some resync-needed cases when applying the
overrides operations on a Pointer RNA property.
This should cover all cases where an existing override's ID pointer is
changed in its linked data.
We still have to add code to detect when a not-yet-overridden linked ID
needs to become overridden (because its relations to other data-blocks
changed in a way that requires it).
Part of T83811 & D10649.
|
|
|
|
Approximately 91 spelling corrections, almost all in comments.
Differential Revision: https://developer.blender.org/D10288
Reviewed by Harley Acheson
|
|
Currently this is needed to properly tag PointCache's for info update
(fixes an issue reported in T82503).
Suspect we may need this in more cases in the future though, RNA
assign/update processes are not always 100% enough to deal with
complicated corner cases.
|
|
|
|
Makes it more in line with more generic `RNA_find_real_ID_and_path`, and
avoids generating the rna path string if we do not need it.
|
|
Also makes NLA tracks and strips overridable.
User can either edit existing strips in existing NLA tracks (but not add or remove them), and/or add new NLA tracks after those comming from the linked data.
Most of the work was as usual checking operators and adding protections against illegal operations in override context.
Note that since we can only rely on indices to deal with local added tracks, we forbid any local track being before any linked/original track.
Maniphest Tasks: T72629
Differential Revision: https://developer.blender.org/D9611
|
|
Missing case in `RNA_property_overridable_get`
|
|
|
|
Adding another pass of ensuring valid up-to-date pose data in RNA
function itself...
|
|
Changes in source/blender/makesrna only.
No functional change.
|
|
It got left out of {rBc04088fed1b8faea6b2928bb5e09ab3}.
No functional change.
|
|
|
|
Also correct own correction from 58b8724a4892
thanks @mont29 for raising this.
|
|
|
|
|
|
overrides.
|
|
overrides.
|
|
Print out messages into console instead when se cannot find expected
data (this is actually normal when source library gets edited).
Note that there seems to be some issue with the 'auto-cleanup' mechanism
removing no more valid override rules on file save, will check on that
next.
Related to T81059, found while investigating it.
|
|
This is actually fairly common issue if lib data changes, just print out
an info message about it for now.
|
|
some cases.
When copying between a set RNA runtime property and an unset one, code
would not behave properly.
We have to also consider NULL 'override apply' callback pointer as a
valid 'use default override apply function' case.
|
|
|
|
Master collections and root node trees should now be working as expected
in that regard.
|
|
Code is mature enough now to not need this anymore, people who do not
want to use liboverrides can just not create them.
|
|
The triplet static RNA / runtime RNA / custom properties is a real pain to
deal with...
Using the new `PropertyRNAOrID` struct helps clarifying and properly
dealing with all three cases.
Note that this makes override of py-defined RNA properties working
(support for that will be committed next).
Differential Revision: https://developer.blender.org/D8249
|
|
|
|
Note that this code is rather rough and slightly hacky, a proper
solution needs to be designed at some point probably, but for now this
should work fine.
As usual, master collections and root node trees remain TODO for now.
|
|
|
|
This is cleaner, but also crucial to avoid weird issues when behaviors
of those checks are modified...
|
|
By using own path construction instead of handy printf-like functions,
we get a 10% improvement on overall diffing process!
This remains way to slow on some complex production characters, but
always good to have still.
|
|
Local datablocks (including overrides) need to have a unique name, which
can then differ from the reference linked one (especially when there are
several local overrides of a same linked data).
Issue is, ID name is a 'rna name property', and as such used as
reference when dealing with override of collections of IDs, so we cannot
have a changing name.
The solution implemented here should work and is simple, but it may have
some issues in corner cases (time will say), it is not really robust.
Alternative solution would be to store ID pointers as reference in
override operations, instead of there name. But that would potentially
add quiet a lot of overhead to foreach looping in `lib_query.c`.
|
|
While code is supposed to handle gracefully invalid override operations,
it is much cleaner to avoid those completely.
|
|
operation.
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
These headers are not needed right away, but will be in the upcoming
commit.
|
|
|
|
|
|
|
|
pqrt of T72604.
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Thanks to Blazej Floch (@bfloch) for the head-up.
|
|
Also correct some outdated symbol references,
add missing 'name' commands.
|
|
Diffing on undo steps is a critical performance point of override
system, although not required for override itself, it gives user
immediate feedback ove what is overridden.
Profiling showed that rna path text search over overrides operations was
by far the most costly thing here, so now using a runtime temp ghash
mapping for this search instead.
Seems to give at least 5 times speedup on big production rig.
|
|
We only need to refine rna pointer for actual collection properties,
other arrays we handle directly the the appy callback.
|
|
Now, custom props defined as overriddable can be overridden, saved,
reloaded, etc. That fixes the last main issue with them.
Note that custom props still have a lot of glitches and weirdness in
their overriding behavior, but for now the most important is finally
achieved, will let them rest and settle a bit, those have been
incredibly painful to tame... :(
|
|
We need same kind of default handling for IDProps as we already have for
the diff callback.
|