Blender Git Commit Log

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.

OVERVIEW

* 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.

OUTLINER

* 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.

GROUP OPERATORS

* 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
still.

LINKING AND OVERRIDES

* 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.

PERFORMANCE

* 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().

TRICKY IMPLEMENTATION BITS

* 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

3 Deleted Paths:

/release/scripts/startup/bl_ui/properties_collection.py (+0, -69)
/source/blender/blenkernel/BKE_group.h (+0, -85)
/source/blender/blenkernel/intern/group.c (+0, -389)

134 Modified Paths:

/release/scripts/modules/bl_previews_utils/bl_previews_render.py (+2, -2) (Diff)
/release/scripts/modules/bpy_types.py (+3, -3) (Diff)
/release/scripts/startup/bl_ui/properties_object.py (+18, -16) (Diff)
/release/scripts/startup/bl_ui/space_dopesheet.py (+1, -1) (Diff)
/release/scripts/startup/bl_ui/space_outliner.py (+68, -65) (Diff)
/release/scripts/startup/bl_ui/space_view3d.py (+3, -3) (Diff)
/source/blender/alembic/intern/alembic_capi.cc (+1, -7) (Diff)
/source/blender/blenkernel/BKE_blender_version.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_collection.h (+109, -30) (Diff)
/source/blender/blenkernel/BKE_collision.h (+4, -4) (Diff)
/source/blender/blenkernel/BKE_context.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_effect.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_freestyle.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_layer.h (+15, -38) (Diff)
/source/blender/blenkernel/BKE_main.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_object.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_scene.h (+2, -2) (Diff)
/source/blender/blenkernel/CMakeLists.txt (+0, -2) (Diff)
/source/blender/blenkernel/intern/blender_copybuffer.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/collection.c (+786, -537) (Diff)
/source/blender/blenkernel/intern/collision.c (+19, -19) (Diff)
/source/blender/blenkernel/intern/context.c (+8, -7) (Diff)
/source/blender/blenkernel/intern/dynamicpaint.c (+4, -14) (Diff)
/source/blender/blenkernel/intern/effect.c (+5, -18) (Diff)
/source/blender/blenkernel/intern/freestyle.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/icons.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/idcode.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/layer.c (+310, -878) (Diff)
/source/blender/blenkernel/intern/library.c (+7, -7) (Diff)
/source/blender/blenkernel/intern/library_query.c (+30, -14) (Diff)
/source/blender/blenkernel/intern/library_remap.c (+38, -57) (Diff)
/source/blender/blenkernel/intern/object.c (+28, -29) (Diff)
/source/blender/blenkernel/intern/object_dupli.c (+62, -57) (Diff)
/source/blender/blenkernel/intern/particle.c (+12, -6) (Diff)
/source/blender/blenkernel/intern/pointcache.c (+3, -2) (Diff)
/source/blender/blenkernel/intern/rigidbody.c (+21, -19) (Diff)
/source/blender/blenkernel/intern/scene.c (+25, -34) (Diff)
/source/blender/blenkernel/intern/softbody.c (+16, -20) (Diff)
/source/blender/blenloader/BLO_readfile.h (+3, -2) (Diff)
/source/blender/blenloader/intern/readfile.c (+344, -268) (Diff)
/source/blender/blenloader/intern/versioning_260.c (+0, -1) (Diff)
/source/blender/blenloader/intern/versioning_280.c (+436, -333) (Diff)
/source/blender/blenloader/intern/versioning_legacy.c (+5, -5) (Diff)
/source/blender/blenloader/intern/writefile.c (+34, -31) (Diff)
/source/blender/blentranslation/BLT_translation.h (+2, -2) (Diff)
/source/blender/collada/collada_utils.cpp (+2, -2) (Diff)
/source/blender/collada/DocumentImporter.cpp (+2, -2) (Diff)
/source/blender/collada/SceneExporter.cpp (+4, -4) (Diff)
/source/blender/depsgraph/DEG_depsgraph.h (+1, -3) (Diff)
/source/blender/depsgraph/DEG_depsgraph_build.h (+2, -2) (Diff)
/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc (+17, -24) (Diff)
/source/blender/depsgraph/intern/builder/deg_builder_nodes.h (+2, -2) (Diff)
/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc (+1, -1) (Diff)
/source/blender/depsgraph/intern/builder/deg_builder_relations.cc (+18, -12) (Diff)
/source/blender/depsgraph/intern/builder/deg_builder_relations.h (+3, -3) (Diff)
/source/blender/depsgraph/intern/depsgraph.cc (+3, -7) (Diff)
/source/blender/depsgraph/intern/depsgraph_build.cc (+2, -2) (Diff)
/source/blender/depsgraph/intern/depsgraph_intern.h (+1, -1) (Diff)
/source/blender/draw/engines/eevee/eevee_lightprobes.c (+9, -9) (Diff)
/source/blender/draw/engines/eevee/eevee_private.h (+1, -1) (Diff)
/source/blender/editors/animation/anim_filter.c (+5, -5) (Diff)
/source/blender/editors/gpencil/gpencil_convert.c (+3, -2) (Diff)
/source/blender/editors/include/ED_fileselect.h (+11, -0) (Diff)
/source/blender/editors/object/object_add.c (+25, -26) (Diff)
/source/blender/editors/object/object_edit.c (+63, -36) (Diff)
/source/blender/editors/object/object_group.c (+115, -115) (Diff)
/source/blender/editors/object/object_intern.h (+1, -0) (Diff)
/source/blender/editors/object/object_ops.c (+3, -1) (Diff)
/source/blender/editors/object/object_relations.c (+90, -96) (Diff)
/source/blender/editors/object/object_select.c (+31, -32) (Diff)
/source/blender/editors/physics/rigidbody_constraint.c (+4, -4) (Diff)
/source/blender/editors/physics/rigidbody_object.c (+4, -4) (Diff)
/source/blender/editors/render/render_preview.c (+16, -13) (Diff)
/source/blender/editors/space_action/space_action.c (+1, -1) (Diff)
/source/blender/editors/space_buttons/buttons_context.c (+0, -41) (Diff)
/source/blender/editors/space_buttons/space_buttons.c (+0, -2) (Diff)
/source/blender/editors/space_file/fsmenu.c (+0, -2) (Diff)
/source/blender/editors/space_graph/space_graph.c (+1, -1) (Diff)
/source/blender/editors/space_info/info_stats.c (+13, -22) (Diff)
/source/blender/editors/space_nla/space_nla.c (+1, -1) (Diff)
/source/blender/editors/space_outliner/outliner_collections.c (+214, -735) (Diff)
/source/blender/editors/space_outliner/outliner_draw.c (+95, -69) (Diff)
/source/blender/editors/space_outliner/outliner_edit.c (+74, -70) (Diff)
/source/blender/editors/space_outliner/outliner_intern.h (+14, -29) (Diff)
/source/blender/editors/space_outliner/outliner_ops.c (+23, -53) (Diff)
/source/blender/editors/space_outliner/outliner_select.c (+16, -39) (Diff)
/source/blender/editors/space_outliner/outliner_tools.c (+71, -327) (Diff)
/source/blender/editors/space_outliner/outliner_tree.c (+202, -169) (Diff)
/source/blender/editors/space_outliner/outliner_utils.c (+19, -4) (Diff)
/source/blender/editors/space_outliner/space_outliner.c (+8, -12) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+3, -3) (Diff)
/source/blender/editors/space_view3d/view3d_ops.c (+7, -7) (Diff)
/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp (+5, -8) (Diff)
/source/blender/gpu/intern/gpu_material.c (+0, -1) (Diff)
/source/blender/makesdna/DNA_action_types.h (+2, -2) (Diff)
/source/blender/makesdna/DNA_cloth_types.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_dynamicpaint_types.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_effect_types.h (+2, -2) (Diff)
/source/blender/makesdna/DNA_freestyle_types.h (+2, -2) (Diff)
/source/blender/makesdna/DNA_group_types.h (+40, -14) (Diff)
/source/blender/makesdna/DNA_layer_types.h (+26, -25) (Diff)
/source/blender/makesdna/DNA_lightprobe_types.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_object_force_types.h (+2, -2) (Diff)
/source/blender/makesdna/DNA_object_types.h (+2, -2) (Diff)
/source/blender/makesdna/DNA_outliner_types.h (+2, -2) (Diff)
/source/blender/makesdna/DNA_particle_types.h (+3, -3) (Diff)
/source/blender/makesdna/DNA_rigidbody_types.h (+3, -3) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+5, -2) (Diff)
/source/blender/makesdna/DNA_smoke_types.h (+3, -3) (Diff)
/source/blender/makesdna/DNA_space_types.h (+24, -37) (Diff)
/source/blender/makesdna/intern/dna_genfile.c (+10, -3) (Diff)
/source/blender/makesrna/intern/makesrna.c (+21, -9) (Diff)
/source/blender/makesrna/intern/rna_context.c (+5, -6) (Diff)
/source/blender/makesrna/intern/rna_dynamicpaint.c (+2, -2) (Diff)
/source/blender/makesrna/intern/rna_group.c (+169, -39) (Diff)
/source/blender/makesrna/intern/rna_ID.c (+3, -3) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+2, -2) (Diff)
/source/blender/makesrna/intern/rna_layer.c (+23, -580) (Diff)
/source/blender/makesrna/intern/rna_lightprobe.c (+2, -1) (Diff)
/source/blender/makesrna/intern/rna_main.c (+3, -3) (Diff)
/source/blender/makesrna/intern/rna_main_api.c (+20, -20) (Diff)
/source/blender/makesrna/intern/rna_object.c (+7, -6) (Diff)
/source/blender/makesrna/intern/rna_object_force.c (+4, -2) (Diff)
/source/blender/makesrna/intern/rna_particle.c (+4, -3) (Diff)
/source/blender/makesrna/intern/rna_rigidbody.c (+5, -5) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+11, -11) (Diff)
/source/blender/makesrna/intern/rna_smoke.c (+6, -6) (Diff)
/source/blender/makesrna/intern/rna_space.c (+40, -32) (Diff)
/source/blender/makesrna/RNA_access.h (+2, -2) (Diff)
/source/blender/makesrna/RNA_enum_types.h (+2, -5) (Diff)
/source/blender/python/intern/bpy_library_load.c (+1, -1) (Diff)
/source/blender/render/intern/source/pipeline.c (+13, -13) (Diff)
/source/blender/windowmanager/intern/wm_files_link.c (+5, -5) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+5, -5) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021