Blender Git Loki

Git Commits -> Revision e289dc2

May 11, 2018, 15:01 (GMT)
Collections and groups unification

NOTE that this branch still has known bugs and TODO comments, it's not
ready to merge or save files with. I'm publishing it now for review of
the overall design.


* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is used
for each. For many workflows one view layer can be used, these are more of
an advanced feature now.


* The related outliner categories were reorganized to be:
** Collections: display collections and their objects
** Objects: display all objects in the scene with parenting hierarchy
** View Layer: edit which collections are used in the view layer
* In the collections category we can switch between showing collections in
the scene, unlinked collections not linked in any scene, and all in the file.
* The outliner right click menus for collections and objects were reorganized.


* The G-key group operators in the 3D viewport were left mostly as is, they
need to be modified still to fit better.
* Same for the groups panel in the object properties, this needs to be updated


* Collections can now be linked into the scene without creating an instance,
with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
but this is rather tedious and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
into collections with overrides directly in the scene.


* I tried to make performance not worse than before and improve it in some
cases. There are still quite some quadratic time operations in object
add / delete which would require much deeper changes to fix.
* Collections keep a list of their parent collections for faster incremental
updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
lookups internally and in API functions like visible_get().


* I didn't yet rename all files to preserve git history a bit better, probably
this is best done as a second commit after merging.
* Renaming collections to groups involved some DNA/RNA trickery to preserve
backwards compatibility, in the DNA the struct is still "Group".

* Version patching of 2.7 skips all the 2.8 collection patching and immediately
convertions to the new data structures.
* Version patching tries to keep 2.8 files works more or less, but some data is
lost. Keeping it all would be quite complicated. This needs more testing,
especially on Hero files.

* Collections are not reference counted just like groups weren't, they must be
explicitly deleted by the user.
* Object ownership is similar to what it was before, in that collection used
in a scene increment the object user counts but collections not used in any
scene do not.
* This involves some tagging each collection as being in a scene or not and
keeping that synchronized on changes.

* View layers each have a tree of layer collections which mirror the scene
collection tree (including linked collections). This require relatively
complicated synchronization as collections can change in linked files.

Commit Details:

Full Hash: e289dc2a281370d47529d7f01f6845759ac656ff
Parent Commit: 4fe5a10
Lines Changed: +4128, -5961

Tehnyt: Miika HämäläinenViimeksi p?ivitetty: 07.11.2014 14:18 MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2020