Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_workspace.h
| Show All 24 Lines | |||||
| #ifndef __BKE_WORKSPACE_H__ | #ifndef __BKE_WORKSPACE_H__ | ||||
| #define __BKE_WORKSPACE_H__ | #define __BKE_WORKSPACE_H__ | ||||
| #include "BLI_compiler_attrs.h" | #include "BLI_compiler_attrs.h" | ||||
| struct bScreen; | struct bScreen; | ||||
| struct EvaluationContext; | struct EvaluationContext; | ||||
| struct Main; | struct Main; | ||||
| struct Object; | |||||
| struct Scene; | struct Scene; | ||||
| struct TransformOrientation; | struct TransformOrientation; | ||||
| struct ViewLayer; | struct ViewLayer; | ||||
| /** | |||||
| * Plan is to store the object-mode per workspace, not per object anymore. | |||||
| * However, there's quite some work to be done for that, so for now, there is just a basic | |||||
| * implementation of an object <-> workspace object-mode syncing for testing, with some known | |||||
| * problems. Main problem being that the modes can get out of sync when changing object selection. | |||||
| * Would require a pile of temporary changes to always sync modes when changing selection. So just | |||||
| * leaving this here for some testing until object-mode is really a workspace level setting. | |||||
| */ | |||||
| #define USE_WORKSPACE_MODE | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /* Create, delete, init */ | /* Create, delete, init */ | ||||
| struct WorkSpace *BKE_workspace_add(struct Main *bmain, const char *name); | struct WorkSpace *BKE_workspace_add(struct Main *bmain, const char *name); | ||||
| void BKE_workspace_free(struct WorkSpace *workspace); | void BKE_workspace_free(struct WorkSpace *workspace); | ||||
| void BKE_workspace_remove(struct Main *bmain, struct WorkSpace *workspace); | void BKE_workspace_remove(struct Main *bmain, struct WorkSpace *workspace); | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
| struct WorkSpace *BKE_workspace_active_get(struct WorkSpaceInstanceHook *hook) GETTER_ATTRS; | struct WorkSpace *BKE_workspace_active_get(struct WorkSpaceInstanceHook *hook) GETTER_ATTRS; | ||||
| void BKE_workspace_active_set(struct WorkSpaceInstanceHook *hook, struct WorkSpace *workspace) SETTER_ATTRS; | void BKE_workspace_active_set(struct WorkSpaceInstanceHook *hook, struct WorkSpace *workspace) SETTER_ATTRS; | ||||
| struct WorkSpaceLayout *BKE_workspace_active_layout_get(const struct WorkSpaceInstanceHook *hook) GETTER_ATTRS; | struct WorkSpaceLayout *BKE_workspace_active_layout_get(const struct WorkSpaceInstanceHook *hook) GETTER_ATTRS; | ||||
| void BKE_workspace_active_layout_set(struct WorkSpaceInstanceHook *hook, struct WorkSpaceLayout *layout) SETTER_ATTRS; | void BKE_workspace_active_layout_set(struct WorkSpaceInstanceHook *hook, struct WorkSpaceLayout *layout) SETTER_ATTRS; | ||||
| struct bScreen *BKE_workspace_active_screen_get(const struct WorkSpaceInstanceHook *hook) GETTER_ATTRS; | struct bScreen *BKE_workspace_active_screen_get(const struct WorkSpaceInstanceHook *hook) GETTER_ATTRS; | ||||
| void BKE_workspace_active_screen_set( | void BKE_workspace_active_screen_set( | ||||
| struct WorkSpaceInstanceHook *hook, struct WorkSpace *workspace, struct bScreen *screen) SETTER_ATTRS; | struct WorkSpaceInstanceHook *hook, struct WorkSpace *workspace, struct bScreen *screen) SETTER_ATTRS; | ||||
| #ifdef USE_WORKSPACE_MODE | |||||
| enum eObjectMode BKE_workspace_object_mode_get( | enum eObjectMode BKE_workspace_object_mode_get( | ||||
| const struct WorkSpace *workspace, | const struct WorkSpace *workspace, | ||||
| const struct Scene *scene) GETTER_ATTRS; | const struct Scene *scene) GETTER_ATTRS; | ||||
| void BKE_workspace_object_mode_ensure_updated( | |||||
| struct WorkSpace *workspace, | |||||
| struct Object *object, enum eObjectMode new_mode, | |||||
| const bool is_active) SETTER_ATTRS; | |||||
| void BKE_workspace_object_mode_set( | void BKE_workspace_object_mode_set( | ||||
| struct WorkSpace *workspace, | struct WorkSpace *workspace, | ||||
| struct Scene *scene, | struct Scene *scene, | ||||
| const enum eObjectMode mode) SETTER_ATTRS; | const enum eObjectMode mode) SETTER_ATTRS; | ||||
| #endif | enum eObjectMode BKE_workspace_object_mode_for_toggle_get( | ||||
| const struct WorkSpace *workspace, | |||||
| const struct Object *active_object) GETTER_ATTRS; | |||||
| void BKE_workspace_object_mode_for_object_set( | |||||
| struct WorkSpace *workspace, | |||||
| struct Scene *scene, | |||||
| struct Object *object, | |||||
| enum eObjectMode new_mode) SETTER_ATTRS; | |||||
| struct Base *BKE_workspace_active_base_get(const struct WorkSpace *workspace, const struct Scene *scene); | struct Base *BKE_workspace_active_base_get(const struct WorkSpace *workspace, const struct Scene *scene); | ||||
| struct ListBase *BKE_workspace_transform_orientations_get(struct WorkSpace *workspace) GETTER_ATTRS; | struct ListBase *BKE_workspace_transform_orientations_get(struct WorkSpace *workspace) GETTER_ATTRS; | ||||
| struct ViewLayer *BKE_workspace_view_layer_get( | struct ViewLayer *BKE_workspace_view_layer_get( | ||||
| const struct WorkSpace *workspace, | const struct WorkSpace *workspace, | ||||
| const struct Scene *scene) GETTER_ATTRS; | const struct Scene *scene) GETTER_ATTRS; | ||||
| void BKE_workspace_view_layer_set( | void BKE_workspace_view_layer_set( | ||||
| struct WorkSpace *workspace, | struct WorkSpace *workspace, | ||||
| struct ViewLayer *layer, | struct ViewLayer *layer, | ||||
| Show All 30 Lines | |||||