diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-08 01:29:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-08 01:50:00 +0300 |
commit | 8f817de0cbef41dac81e6c7665ada509c3fe2988 (patch) | |
tree | 0802c3287116ce0bf600adc4bed8cba31cfc97b1 /source/blender/blenkernel/intern/workspace.c | |
parent | e68ac2827dd4f8ad346011a8a408b342e2718707 (diff) |
Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
Diffstat (limited to 'source/blender/blenkernel/intern/workspace.c')
-rw-r--r-- | source/blender/blenkernel/intern/workspace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/workspace.c b/source/blender/blenkernel/intern/workspace.c index c0591680742..c2bded42bc1 100644 --- a/source/blender/blenkernel/intern/workspace.c +++ b/source/blender/blenkernel/intern/workspace.c @@ -123,7 +123,7 @@ static bool UNUSED_FUNCTION(workspaces_is_screen_used) #endif (const Main *bmain, bScreen *screen) { - for (WorkSpace *workspace = bmain->workspace.first; workspace; workspace = workspace->id.next) { + for (WorkSpace *workspace = bmain->workspaces.first; workspace; workspace = workspace->id.next) { if (workspace_layout_find_exec(workspace, screen)) { return true; } @@ -185,7 +185,7 @@ WorkSpaceInstanceHook *BKE_workspace_instance_hook_create(const Main *bmain) WorkSpaceInstanceHook *hook = MEM_callocN(sizeof(WorkSpaceInstanceHook), __func__); /* set an active screen-layout for each possible window/workspace combination */ - for (WorkSpace *workspace = bmain->workspace.first; workspace; workspace = workspace->id.next) { + for (WorkSpace *workspace = bmain->workspaces.first; workspace; workspace = workspace->id.next) { BKE_workspace_hook_layout_for_workspace_set(hook, workspace, workspace->layouts.first); } @@ -194,10 +194,10 @@ WorkSpaceInstanceHook *BKE_workspace_instance_hook_create(const Main *bmain) void BKE_workspace_instance_hook_free(const Main *bmain, WorkSpaceInstanceHook *hook) { /* workspaces should never be freed before wm (during which we call this function) */ - BLI_assert(!BLI_listbase_is_empty(&bmain->workspace)); + BLI_assert(!BLI_listbase_is_empty(&bmain->workspaces)); /* Free relations for this hook */ - for (WorkSpace *workspace = bmain->workspace.first; workspace; workspace = workspace->id.next) { + for (WorkSpace *workspace = bmain->workspaces.first; workspace; workspace = workspace->id.next) { for (WorkSpaceDataRelation *relation = workspace->hook_layout_relations.first, *relation_next; relation; relation = relation_next) @@ -287,7 +287,7 @@ WorkSpaceLayout *BKE_workspace_layout_find_global( *r_workspace = NULL; } - for (WorkSpace *workspace = bmain->workspace.first; workspace; workspace = workspace->id.next) { + for (WorkSpace *workspace = bmain->workspaces.first; workspace; workspace = workspace->id.next) { if ((layout = workspace_layout_find_exec(workspace, screen))) { if (r_workspace) { *r_workspace = workspace; |