Age | Commit message (Collapse) | Author |
|
This reverts commit b0b2546d4a3a308da19d218d919915aac4834e59.
Please do not sweept the dirt under the carpet like that! If there is a
bug, either report it or fix it, but do not silence it!
|
|
Interferes with debugging.
|
|
|
|
Better to make internal code naming match official/UI naming to some
extent, this will reduce confusion in the future.
This is 'breaking' scripts and files that would use that feature, but
since it is not yet officially supported nor exposed in 2.80, as far
as that release is concerned, it is effectively
a 'no functional changes' commit.
|
|
|
|
Conflicts:
source/blender/blenkernel/intern/library_remap.c
|
|
That would break proxy behavior after a library reload.
The usual super-annoying loop-back pointers... At least that one is
easily detectable and can be fixed in-place.
Found while investigating T64764.
|
|
to crashes).
Those are two cases where keeping infamous backward `parents` pointers
of collections in sync is kind of impossible to do... So rebuilding
those relationships from scratch instead.
Fixes e.g. a crash when undoing, then reloading a library, and likely
many more weird ones like that.
Uncovered while investigating T64764.
|
|
This was missing from rBdb5120603f.
|
|
|
|
On file read we need to update group nodes in case the group they refer to
has changed its inputs and outputs. This had O(n^2) time complexity and was
updating all datablocks even if they did not change.
|
|
|
|
Comments after code can cause awkward line breaks.
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
only then I can purge previous deleted meshes.
libquery code has some specific handling for IDs tagged as 'no_main',
among which to never consider them as refcounted/refcounting other IDs.
This is fine, but it also means we have to be careful when moving an ID
from main to out-of-main status, to do all id remapping we need
//before// we tag it as no_main.
That was a bit tedious to track down, we'll have to be careful that all
the corner cases we have to take care of, do not end up in a giant soup
of expections to exceptions, where nobody can find its way anymore...
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
We need to remap duplicated IDs' ID pointers to new ones if they exist.
|
|
library_query and library_remap codes.
Looks like something forgotten at some point, define in callback flags
was there, just not used at all.
Added most obvious cases now (we are probably still missing some), and
proper handling for it in remapping code (when we hit such case, we
'convert' new_id to NULL and go on with it).
Related (as in, exposed by) T62076, but not the actual cause of that bug.
|
|
Stupid mistake in own logic would prevent first deleted ID to be
properly unlinked from rest of .blend file before its deletion...
|
|
|
|
- BKE_lamp -> BKE_light
- Main.lamp -> light
|
|
|
|
Patch by @sergey.
Note that this is really a bad thing actually, ideally we should never
get that situation (IDs in Main referencing temp IDs outside of it).
That can lead to many possible similar cases...
Fixing that is not trivial though, so for now we'll have to live with
it, until we have migrated *all* of our temp datablocks generation
outside of Main's.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
|
|
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Part of D4277 by @sobakasu
|
|
Main idea is to remove IDs to be deleted from Main, to avoid looping on
them to remove other deleted IDs usage (this is the most expensive
process in ID deletion, by far).
Speed improvements when deleting a large amount of IDs from a Main
containing a lot of them is quite significant, some examples for Objects:
* Removing 1k from 10k: 32% quicker (2.5s to 1.7s).
* Removing 10k from 20k: 60% quicker (59s to 23s).
* Removing 20k from 20k: 99.5% quicker (82s to 0.4s)!
Note however that this process is more risky/touchy, since we by-pass
some safety checks from regular ID removal here.
So will only give access to that code from python API for now (in
separate commit), so that it gets really tested. Also still need to
think about how to hook it up in UI (probably mostly for Outliner),
since we often do higher-level operations there...
|
|
|
|
|
|
BKE_id_free(_ex) ones.
|
|
|
|
|
|
Add 'missing' bpy code from BKE_libblock_free_ex(), now both functions
do exactly the same thing, only the later is less flexible (fewer
'exotic' behaviors supported, like handling IDs outside of bmain etc.).
Next step: nuke usages of BKE_libblock_free functions, makes no sense to
have twice the same code around!
|
|
Make it explicit when freeing node tree which is owned by other
ID or when freeing node tree which is outside of a bmain.
|
|
The issue was caused by a special code in node tree freeing function
which will free extra fields in the case when tree is not in bmain.
This is how old code was dealing with "nested" trees, but is now
making behavior different from other datablocks. This is exactly
what was confusing copy-on-write logic.
Ideally, ntreeFreeTree() need to behave same as all other datablocks,
ad freeing of data of nested trees should be up to the owner of the
tree (this way it's all explicit and does not depend on check of
some special flag.
|
|
There were at least three copies of those:
- OB_RECALC* family of flags, which are rudiment of an old
dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
as a separate set since the graph itself did not handle
particle systems.
- DEG_TAG_* which was used to tag IDs.
Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.
Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.
Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.
Fixes T58632: Particle don't update rotation settings
|
|
|
|
|
|
Explicitly tag copy-on-write form library remap. Previously, this
tag was used implicitly via geometry/transform tagging, which worked
ok for objects. For non-objects we do need to ensure all copies has
correct pointer and the only way to do so is to pass tag explicitly.
There is probably more places in the library remap where this is
needed, but not being familiar with the code makes it difficult to
spot where possible tags are missing.
|
|
From startup .blend, add a 'full copy' new scene, and delete its
Collection 1.001 collection. That would make blender crash, once again
due to NULL collection pointer in some ChildrenCollection struct...
|
|
Hope this time we are done for good (root of the issue was that master
collections are not in bmain...).
|
|
Related to T57372: Second full scene copy crashes on deletion (fixes
deleting second copy, but now it crashes on deleting the first copy...).
|
|
You want to check collections (for NULL children) first, before you
actually go into those children collections checking for NULL objects...
|
|
collections.
In one case, code was calling the same func on bmain for all objects or
collections inside that bmain... seriously...
|