Age | Commit message (Collapse) | Author |
|
Conflicts:
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/library_query.c
|
|
`cd_flag` tends to be used for CustomData flags in mesh area, while for
library_query those are rather callback flags...
|
|
Better to have clear way to tell whether flag is parameter for
BKE_library_foreach_ID_link(), parameter for its callback function, or
return value from this callback function.
|
|
Use new Main->relations ID usages mapping in BKE_library_make_local().
This allows a noticeable simplification in code, and can be up to twice
quicker as previous code (Make Local: All from 2 to 1 minute e.g. in a
huge production file with thousands of linked data-blocks).
Note that new code has been successfuly tested with several complex cases
(production files from Agent327), as well as some testcases from recent
bug reports related to that function. But as always, nothing beats real
usage by real users, so please check this before we release 2.79. ;)
Main areas that would be affected: Make Local operations (L shortcut in
3DView), and append from libraries.
|
|
Use Main->relations in BKE_library_foreach_ID_link(), when possible
(i.e. IDWALK_READONLY is set), and if the data is available of course.
This is quite minor optimization, no sensible improvements are expected,
but does not hurt either to avoid potentially tens of looping over e.g.
objects constraints and modifiers, or heap of drivers...
|
|
This shall fix both existing code (bpy mapping, and local/lib usages
checks), and new Main->relations generation.
|
|
The new MainIDRelations stores two mappings, one from ID users to ID
used, the other vice-versa.
That data is assumed to be short-living runtime, code creating it is
responsible to clear it asap. It will be much useful in places where we
handle relations between IDs for a lot of them at once.
Note: This commit is not fully functional, that is, the infamous, ugly,
PoS non-ID nodetrees will not be handled correctly when building relations.
Fix needed here is a bit noisy, so will be done in next own commit.
|
|
Conflicts:
source/blender/editors/space_action/action_draw.c
|
|
|
|
|
|
Things like `BLI_uniquename` had nothing, but really nothing to do in
BLI_path_util files!
Also, got rid of length limitation in `BLI_uniquename_cb`, we can use
alloca here to avoid overhead of malloc while keeping free size (within
reasonable limits of course).
|
|
|
|
generate invalid utf-8 ID name.
`check_for_dupid()` would roughly truncate existing name, without doing any utf-8 validation.
|
|
This reverts commit 5aa19be91263a249ffae75573e3b32f24269d890 and b4a721af694817fa921b119df83d33ede7d7fed0.
Due to postponement of particle system rewrite it was decided to put particle code
back into the 2.8 branch for the time being.
|
|
Conflicts:
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenloader/intern/versioning_270.c
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_particle.c
|
|
Was a waaaaayyyyy to much generic name for such a specific func, renamed
to much more descriptive BKE_libblock_relink_to_newid().
In near future (few weeks, to limit as much as possible silent mismatch
in branches), will rename BKE_libblock_relink_ex to BKE_libblock_relink,
this is the real generic data-block relinking func!
|
|
|
|
This aims at always ensuring that ID.newid (and relevant LIB_TAG_NEW)
stay in clean (i.e. cleared) state by default.
To achieve this, instead of clearing after all id copy call (would be
horribly noisy, and bad for performances), we try to completely remove
the setting of id->newid by default when copying a new ID.
This implies that areas actually needing that info (mainly, object editing
area (make single user...) and make local area) have to ensure they set
it themselves as needed.
This is far from simple change, many complex code paths to consider, so
will need some serious testing. :/
|
|
|
|
This makes heavy scenes to be freed almost instantly (so now
quadbot scene takes only 0.06sec to free),
|
|
Object freeing may in some kind access its obdata (in case it has some
caches e.g.), since here obdata may have already been freed, let's set
object's data pointer to NULL (probably not ideal solution, but we don't
care much, those form archipelagos of unused linked datablocks,
we nuke'em all anyway).
Also fix stupid mistake in one of own recent commits (using ID we just
freed, tsst...).
|
|
|
|
Do not set 'real user' to groups every time we run the first clearing loop.
And do fully clear properly LIB_TAG_DOIT (this is not yet enforced in
existing code, but would love to get to that stage in future, so let's
do it at least with new code!).
|
|
|
|
Basic idea is to split first loop in two, and run checks before making
anything actually local, to detect data-blocks that we can directly make
local (because we are sure they are only used by already/future local
datablocks).
This allows to avoid a lot of overhead in later 'cleanup' steps of this
function, here with barbershop shot it's four times quicker (from 190s to 48s).
We are still far from the instantaneous results of MakeLocal in 2.77,
but in that version main characters lose their connection to their
armature and remain static after makelocal, so guess new code is still
better. ;)
There are probably more optimizations possible here, but would rather
polish this area of code once we get rid of proxies, those really
make it a nightmare to work on.
|
|
This *should* work, but do not hesitate to revert in case it creates new
crashes in append or makelocal processes.
|
|
Proxified objects can never be local, we can totally ignore them here.
This 'fixes' the asserts related to usercount when trying to remap poselib
of localized proxified objects (not sure what exactly was going on wrong here,
but proxies are a giant can of worms for sane data-blocks handling anyway :/).
|
|
|
|
|
|
This is required since new dependency graph evaluates drivers in threads
so it was possible to have some partially written ID tag there.
|
|
Conflicts:
intern/cycles/blender/addon/properties.py
|
|
New code dealing with getting rid of lib-only cycles of data-blocks
could add several time the same datablock to the list of candidates. Now
this is avoided, and pointers are further cleaned up as double-safety
measure.
|
|
|
|
Issue here was that py API code was keeping references (pointers) to the
liniked data-blocks, which can actually be duplicated and then deleted
during the 'make local' process...
Would have like to find a better way than passing optional GHash to get
the oldid->newid mapping, but could not think of a better idea.
|
|
Conflicts:
source/blender/blenloader/intern/versioning_defaults.c
|
|
clearing of linked data-blocks.
This is not a simple fix, but imho still needs to be backported to 2.78a...
|
|
those flags were set!
Dummy mistake, to be backported to 2.78a.
|
|
One day we'll have to reconsider why some many 'real' ID usages are not
refcounting... :(
To be backported to 2.78a.
|
|
|
|
Such a "referenced proxy" could be a proxy that is used in a constraint on
another object. Brings back part of 1cdc54dc7db85766 but without the
memory leak.
|
|
This allows appending of an entire scene from another blend file into this one,
even when that blend file contains proxified armatures.
This replaces the approach from commit 1cdc54dc7db85766.
Thanks @sergey for the help.
|
|
|
|
|
|
This allows appending of an entire scene from another blend file into
this one, even when that blend file contains proxified armatures.
Since the proxified object needs to be linked (not local), this will
only work when the "Localize all" checkbox is disabled. The appended
proxy object should also not be referenced from anything in a library
(for example in a constraint). Referencing it from the appended data
should be fine.
Fixes T49495.
|
|
Conflicts:
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/particle.c
|
|
The first character of the ID type was used to tag IDs for updates which
is weak since different IDs can have the same first character (for
example meshes, materials and metaballs), causing unnecessary updates of
unrelated IDs.
Now we use a unique index per ID type to tag for updates, unifying IDs
arrays indexing along the way.
Reviewers: sergey, mont29
Differential Revision: https://developer.blender.org/D2139
|
|
|
|
Conflicts:
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_cloth.py
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
release/scripts/startup/bl_ui/properties_physics_softbody.py
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_270.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_outliner/outliner_intern.h
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_object_force.h
source/blender/makesdna/DNA_particle_types.h
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_space.c
|
|
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
|
|
Previous check to skip non-linkable IDs resulted in not clearing those skipped ID's newid member,
wich lead to try to remap it later in code.
|