This commit implements the barebones of the new layer system.
- unittest
- DNA
- RNA
- doversioning
Not implemented:
- Full syncing system (of collection trees)
- Filter objects syncing
- Overrides
- User interface
- Getting rid of scene->base
- everything else
Differential D2412
Render layer and collections Authored by Dalai Felinto (dfelinto) on Dec 13 2016, 1:51 PM.
Details
This commit implements the barebones of the new layer system.
Not implemented:
Diff Detail
Event TimelineComment Actions Some preliminary review. The most worrying part for me here is that you do some manual work to make sure layers/collections are not referenced from somewhere else on removal. Think now it should be part of relinking function. But i'm also not sure how much strict we should consider this as a stopper. It's all WIP and be changed soon anyway so mainly it's important to raise possible issues IMO.
Comment Actions
Which relinking function?
I think it's fair to assume users shouldn't open files with 2.8 and save them (unless they want to loose their work). So we can live with "out of sync" files for now in my opinion.
Comment Actions No. Relinking/remapping stuff is for IDs, and IDs only, not their sub-data. So unless you make layers or collections data-blocks, library_remap has nothing to do with their update work. Besides details noted below, I see two main issues with current patch:
Point 2. is a bit of an orthogonal issue, should be addressed separately in own patch/commit, prior to applying this one, imho (am happy to work on it if you want).
Comment Actions
Comment Actions
@Bastien Montagne (mont29) I wonder if you have a more clever idea for the scenecollection iterator. Comment Actions I thought this over again, but I'd still suggest to replace the master collection with a master layer. It seems pretty inconsequent to allow having this special collection to stand alone. The layer is the trunk of each tree, except for the master collection, where the trunk is a collection. This would be a visible inconsistency for users: In 3D Views they could choose from any regular render layer, maybe the local layer and from the master collection. So they could choose from layers and the master collection instead of just layers. I'd also rename LayerCollection to Collection and SceneCollection to CollectionBase. The relation between those two is more important than the data level they belong to, which we might want to change in future even (causing hassles with renaming the DNA structs).
Comment Actions
That's a big change in the iterator logic. This was intended to make FOREACH_OBJECT_FLAG possible and preserve the current logic of object_relations.c flags. Comment Actions I'm not sure I follow. The master collection would not be selectable as if it was a layer. The default setup would be to have one layer which contains the master collection, and that layer would be effectively a master layer. And then a user could decide to keep that one layer with the master collection, or to have two layers that contain the master collection (one for editing and one for rendering), or to have multiple layers each containing only smaller collections. Now the relations are:
Without the concept of a master collection there would be more I think?
Comment Actions
I confess that I'm a bit confused with the point you are trying to make. Having a master collection actually helped the (internal) design in multiple ways. It's quite elegant. Anyways, just to make sure we are all on the same page, let's keep the current data diagram in mind: One thing I'm tempted to change is instead of storing a ListBase of LayerCollection in the Layer, to store a ListBase of LinkNode of LayerCollection. But that's a separate thing.
That's the whole point of having the master collection as the default collection linked in new layers.
I think you are mistaking LayerCollections and SceneCollections. Technically, the SceneCollection is the Collection, while the LayerCollection is the CollectionBase. Maybe this is why you are suggesting the master collection/master layer changes?
Comment Actions Big update on syncing the missing bits are:
And all syncing related to filter objects (which is fine since this is not implemented) Individual commits:
Comment Actions
(and incorporate @Bastien Montagne (mont29) patch for after_linking do version) Comment Actions Besides changes in library_query needing rework (see detailed comment below), looks like you still did not check library_remap.c file? Again, preprocess/postprocess functions there most certainly need some attention, since they are currently messing with bases, I’d expect them to have to also mess with collections?
Comment Actions objects removal fully working (with remap) I feel it's a bit of overkill to have it handled in pre and post, but at least it's working now. Comment Actions @Bastien Montagne (mont29) how do you think we should treat ob.select? Options:
My preference is (1), but (2) is not bad either. Comment Actions
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||