92 if (tref->properties) {
114 tref->runtime =
NULL;
131 relation->parent =
NULL;
134 if (win->winid == relation->parentid) {
135 relation->parent = win->workspace_hook;
139 if (relation->parent ==
NULL) {
147 if (layout->screen) {
149 layout->screen->winid = 0;
150 if (layout->screen->temp) {
179 .name_plural =
"workspaces",
188 .foreach_cache =
NULL,
196 .blend_read_undo_preserve =
NULL,
198 .lib_override_apply_post =
NULL,
207 const char *new_name)
215 sizeof(layout->
name));
235 relation->
parent = parent;
254 if (relation !=
NULL) {
255 relation->
parent = parent;
272 if (relation !=
NULL) {
273 return relation->
value;
292 for (
WorkSpace *workspace = bmain->workspaces.first; workspace; workspace = workspace->
id.
next) {
311 return new_workspace;
324 layout = layout_next) {
325 layout_next = layout->next;
353 relation = relation_next) {
354 relation_next = relation->next;
355 if (relation->parent == hook) {
400 relation = relation_next) {
401 relation_next = relation->next;
420 "%s: Couldn't find layout in this workspace: '%s' screen: '%s'. "
421 "This should not happen!\n",
449 *r_workspace = workspace;
473 const bool iter_backward)
525 workspace->
id.
tag |= tag;
575 if (hook->
active == workspace) {
623 const char *new_name)
void IDP_BlendWrite(struct BlendWriter *writer, const struct IDProperty *prop)
#define IDP_BlendDataRead(reader, prop)
void IDP_FreeProperty(struct IDProperty *prop)
@ IDTYPE_FLAGS_NO_MAKELOCAL
@ IDTYPE_FLAGS_NO_ANIMDATA
void id_us_min(struct ID *id)
void BKE_id_free(struct Main *bmain, void *idv)
void id_us_ensure_real(struct ID *id)
void id_us_plus(struct ID *id)
void BKE_id_blend_write(struct BlendWriter *writer, struct ID *id)
void BKE_main_id_tag_listbase(struct ListBase *lb, const int tag, const bool value)
void * BKE_id_new(struct Main *bmain, const short type, const char *name)
#define BKE_LIB_FOREACHID_PROCESS(_data, _id_super, _cb_flag)
General operations, lookup, etc. for blender objects.
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_CIRCULAR_FORWARD_BEGIN(lb, lb_iter, lb_init)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
#define LISTBASE_CIRCULAR_FORWARD_END(lb, lb_iter, lb_init)
void * BLI_listbase_bytes_find(const ListBase *listbase, const void *bytes, const size_t bytes_size, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
#define LISTBASE_CIRCULAR_BACKWARD_BEGIN(lb, lb_iter, lb_init)
void * BLI_findstring(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_CIRCULAR_BACKWARD_END(lb, lb_iter, lb_init)
void * BLI_findptr(const struct ListBase *listbase, const void *ptr, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t len)
#define UNUSED_FUNCTION(x)
#define BLO_read_data_address(reader, ptr_p)
struct Main * BLO_read_lib_get_main(BlendLibReader *reader)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
void BLO_read_list(BlendDataReader *reader, struct ListBase *list)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_expand(expander, id)
#define BLO_write_struct_list(writer, struct_name, list_ptr)
#define BLT_I18NCONTEXT_ID_WORKSPACE
#define ID_IS_LINKED(_id)
Object is a sort of wrapper for general info.
@ WORKSPACE_USE_FILTER_BY_ORIGIN
struct WorkSpace WorkSpace
Read Guarded memory(de)allocation.
static void init_data(ModifierData *md)
DEGForeachIDComponentCallback callback
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
struct WorkSpaceLayout * act_layout
ListBase hook_layout_relations
bScreen * BKE_workspace_layout_screen_get(const WorkSpaceLayout *layout)
bScreen * BKE_workspace_active_screen_get(const WorkSpaceInstanceHook *hook)
static void workspace_relation_ensure_updated(ListBase *relation_list, void *parent, const int parentid, void *data)
void BKE_workspace_tool_remove(struct WorkSpace *workspace, struct bToolRef *tref)
static void workspace_relation_remove(ListBase *relation_list, WorkSpaceDataRelation *relation)
static void workspace_blend_read_expand(BlendExpander *expander, ID *id)
static void workspace_free_data(ID *id)
static void workspace_layout_name_set(WorkSpace *workspace, WorkSpaceLayout *layout, const char *new_name)
static void workspace_blend_write(BlendWriter *writer, ID *id, const void *id_address)
static bool workspaces_is_screen_used(const Main *bmain, bScreen *screen)
WorkSpaceLayout * BKE_workspace_layout_add(Main *bmain, WorkSpace *workspace, bScreen *screen, const char *name)
void BKE_workspace_layout_remove(Main *bmain, WorkSpace *workspace, WorkSpaceLayout *layout)
static void workspace_foreach_id(ID *id, LibraryForeachIDData *data)
WorkSpace * BKE_workspace_active_get(WorkSpaceInstanceHook *hook)
bool BKE_workspace_owner_id_check(const WorkSpace *workspace, const char *owner_id)
WorkSpaceLayout * BKE_workspace_layout_iter_circular(const WorkSpace *workspace, WorkSpaceLayout *start, bool(*callback)(const WorkSpaceLayout *layout, void *arg), void *arg, const bool iter_backward)
void BKE_workspace_active_screen_set(WorkSpaceInstanceHook *hook, const int winid, WorkSpace *workspace, bScreen *screen)
static void * workspace_relation_get_data_matching_parent(const ListBase *relation_list, const void *parent)
WorkSpaceLayout * BKE_workspace_layout_find(const WorkSpace *workspace, const bScreen *screen)
WorkSpaceLayout * BKE_workspace_active_layout_for_workspace_get(const WorkSpaceInstanceHook *hook, const WorkSpace *workspace)
static void workspace_relation_add(ListBase *relation_list, void *parent, const int parentid, void *data)
void BKE_workspace_instance_hook_free(const Main *bmain, WorkSpaceInstanceHook *hook)
static WorkSpaceLayout * workspace_layout_find_exec(const WorkSpace *workspace, const bScreen *screen)
void BKE_workspace_active_set(WorkSpaceInstanceHook *hook, WorkSpace *workspace)
WorkSpaceLayout * BKE_workspace_active_layout_get(const WorkSpaceInstanceHook *hook)
void BKE_workspace_id_tag_all_visible(Main *bmain, int tag)
WorkSpaceInstanceHook * BKE_workspace_instance_hook_create(const Main *bmain, const int winid)
void BKE_workspace_relations_free(ListBase *relation_list)
void BKE_workspace_remove(Main *bmain, WorkSpace *workspace)
void BKE_workspace_active_layout_set(WorkSpaceInstanceHook *hook, const int winid, WorkSpace *workspace, WorkSpaceLayout *layout)
Activate a layout.
const char * BKE_workspace_layout_name_get(const WorkSpaceLayout *layout)
static void workspace_blend_read_data(BlendDataReader *reader, ID *id)
WorkSpaceLayout * BKE_workspace_layout_find_global(const Main *bmain, const bScreen *screen, WorkSpace **r_workspace)
static void workspace_blend_read_lib(BlendLibReader *reader, ID *id)
void BKE_workspace_layout_name_set(WorkSpace *workspace, WorkSpaceLayout *layout, const char *new_name)
WorkSpace * BKE_workspace_add(Main *bmain, const char *name)