88 if (tref->properties) {
110 tref->runtime =
NULL;
136 relation->parent =
NULL;
139 if (win->winid == relation->parentid) {
140 relation->parent = win->workspace_hook;
144 if (relation->parent ==
NULL) {
152 if (layout->screen) {
154 layout->screen->winid = 0;
155 if (layout->screen->temp) {
184 .name_plural =
"workspaces",
187 .asset_type_info =
NULL,
194 .foreach_cache =
NULL,
195 .foreach_path =
NULL,
203 .blend_read_undo_preserve =
NULL,
205 .lib_override_apply_post =
NULL,
214 const char *new_name)
222 sizeof(layout->
name));
242 relation->
parent = parent;
261 if (relation !=
NULL) {
262 relation->
parent = parent;
279 if (relation !=
NULL) {
280 return relation->
value;
299 for (
WorkSpace *workspace = bmain->workspaces.first; workspace; workspace = workspace->
id.
next) {
318 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) {
397 relation = relation_next) {
398 relation_next = relation->next;
417 "%s: Couldn't find layout in this workspace: '%s' screen: '%s'. "
418 "This should not happen!\n",
439 *r_workspace = workspace;
454 const bool iter_backward)
506 workspace->
id.
tag |= tag;
549 if (hook->
active == workspace) {
586 const char *new_name)
void BKE_asset_library_reference_init_default(struct AssetLibraryReference *library_ref)
void IDP_BlendWrite(struct BlendWriter *writer, const struct IDProperty *prop)
#define IDP_BlendDataRead(reader, prop)
void IDP_FreeProperty(struct IDProperty *prop)
@ IDTYPE_FLAGS_NO_ANIMDATA
@ IDTYPE_FLAGS_ONLY_APPEND
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_id_new(struct Main *bmain, short type, const char *name)
void BKE_main_id_tag_listbase(struct ListBase *lb, int tag, bool value)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(_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, size_t bytes_size, 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_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_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findptr(const struct ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_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
AssetLibraryReference asset_library_ref
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)
static void workspace_init_data(ID *id)
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)