diff options
author | Julian Eisel <julian@blender.org> | 2020-05-26 21:32:21 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-05-26 21:32:21 +0300 |
commit | a2baf50242a315961fc7bc4d202a610442e813ec (patch) | |
tree | 843c01cc39d05b08c2e57fc1feddda31a17b0c23 /source/blender/makesrna/intern/rna_workspace.c | |
parent | 1f223b9a1fcef8b6eb69af9e2def351e2255a08e (diff) |
Cleanup/refactor: Workspace API, boilerplate code, early exit
* Simplify workspace API a bit
* Comment on behavior of workspace-layout relations where exposed in API
* Remove annoying getters/setters
* Avoid lookups if we can early exit
* A NULL check is removed in `direct_link_workspace()` that I don't see
a need for. Am not 100% sure though, fingers crossed.
In general these changes should improve readability and make things
easier to reason about.
Diffstat (limited to 'source/blender/makesrna/intern/rna_workspace.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c index 32e348ea72f..5f110189dd6 100644 --- a/source/blender/makesrna/intern/rna_workspace.c +++ b/source/blender/makesrna/intern/rna_workspace.c @@ -59,7 +59,7 @@ static void rna_window_update_all(Main *UNUSED(bmain), void rna_workspace_screens_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { WorkSpace *workspace = (WorkSpace *)ptr->owner_id; - rna_iterator_listbase_begin(iter, BKE_workspace_layouts_get(workspace), NULL); + rna_iterator_listbase_begin(iter, &workspace->layouts, NULL); } static PointerRNA rna_workspace_screens_item_get(CollectionPropertyIterator *iter) |