Age | Commit message (Collapse) | Author |
|
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.
|
|
The triple possible status of an PropertyRNA (actual C-defined prop,
py-defined IDprop behaving similar ot RNA one, or actual 'pure' custom
prop) is really confusing... Not to mention the _RNA_UI ugly thingy on
top of that. :/
|
|
The old layout of `PointerRNA` was confusing for historic reasons:
```
typedef struct PointerRNA {
struct {
void *data;
} id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
This patch updates it to:
```
typedef struct PointerRNA {
struct ID *owner_id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
Throughout the code base `id.data` was replaced with `owner_id`.
Furthermore, many explicit pointer type casts were added which
were implicit before. Some type casts to `ID *` were removed.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D5558
|
|
That file was getting out of control, now comparison/override RNA code is
in `rna_access_compare_override.c`. 1K lines of code for now, but that
area is likely to grow more in the future...
Note that we can probably split more out of `rna_access.c`, but for now
that will do.
|