Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/workspace.c
| Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | |||||
| */ | */ | ||||
| void BKE_workspace_free(WorkSpace *workspace) | void BKE_workspace_free(WorkSpace *workspace) | ||||
| { | { | ||||
| BKE_workspace_relations_free(&workspace->hook_layout_relations); | BKE_workspace_relations_free(&workspace->hook_layout_relations); | ||||
| BKE_workspace_relations_free(&workspace->scene_viewlayer_relations); | BKE_workspace_relations_free(&workspace->scene_viewlayer_relations); | ||||
| BLI_freelistN(&workspace->owner_ids); | BLI_freelistN(&workspace->owner_ids); | ||||
| BLI_freelistN(&workspace->layouts); | BLI_freelistN(&workspace->layouts); | ||||
| for (bToolRef *tref = workspace->tools.first, *tref_next; tref; tref = tref_next) { | |||||
| tref_next = tref->next; | |||||
| if (tref->runtime) { | |||||
| MEM_freeN(tref->runtime); | |||||
| } | |||||
| } | |||||
| BLI_freelistN(&workspace->tools); | |||||
| } | } | ||||
| /** | /** | ||||
| * Remove \a workspace by freeing itself and its data. This is a higher-level wrapper that | * Remove \a workspace by freeing itself and its data. This is a higher-level wrapper that | ||||
| * calls #BKE_workspace_free (through #BKE_libblock_free) to free the workspace data, and frees | * calls #BKE_workspace_free (through #BKE_libblock_free) to free the workspace data, and frees | ||||
| * other data-blocks owned by \a workspace and its layouts (currently that is screens only). | * other data-blocks owned by \a workspace and its layouts (currently that is screens only). | ||||
| * | * | ||||
| * Always use this to remove (and free) workspaces. Don't free non-ID workspace members here. | * Always use this to remove (and free) workspaces. Don't free non-ID workspace members here. | ||||
| ▲ Show 20 Lines • Show All 289 Lines • Show Last 20 Lines | |||||