Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
Looks good with the suggested change made.
Personally I think combining add_view_layer_content into add_view_layer would be nice as well, since that's the only place it's called and the distinction is a bit odd. But I don't feel strongly about that.
| source/blender/editors/space_outliner/tree/tree_display_view_layer.cc | ||
|---|---|---|
| 76–95 | This is much simpler I think: if (space_outliner_.filter & SO_FILTER_NO_VIEW_LAYERS) {
view_layer_ = source_data.view_layer;
add_view_layer(scene, &tree, nullptr);
}
else {
for (auto *view_layer : ListBaseWrapper<ViewLayer>(scene->view_layers)) {
view_layer_ = view_layer;
TreeElement &te_view_layer = *outliner_add_element(
&space_outliner_, &tree, scene, nullptr, TSE_R_LAYER, 0);
TREESTORE(&te_view_layer)->flag &= ~TSE_CLOSED;
te_view_layer.name = view_layer->name;
te_view_layer.directdata = view_layer;
add_view_layer(scene, &te_view_layer.subtree, &te_view_layer);
}
} | |
| 100 | In other functions in this file, the parameters that aren't expected to be null are passed as references, we should do that here too. | |