diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-06-01 21:41:18 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-06-01 21:46:18 +0300 |
commit | 46fc0bb87ebda166d08b23cbcca799acb2c54158 (patch) | |
tree | 1566d535d93c4fb81b962cdbc1346ca8242460f2 /source/blender/blenkernel/BKE_screen.h | |
parent | 7f564d74f9edaaa41ce27c6e854869096f70b4da (diff) |
Move custom transform orientations to workspace
This commit moves the list of transform orientations from scenes to workspaces.
Main reasons for this are:
* Transform orientations are UI data and should not be stored in the scene.
* Introducion of workspaces caused some (expected) glitches with transform orientations. Mainly when removing one.
* Improves code.
More technically speaking, this commit does:
* Move list of custom transform orientations from Scene to WorkSpace struct.
* Store active transform orientation index separate from View3D.twmode (twmode can only be set to preprocessor defined values now).
* Display custom transform orientation name in header when transforming in it (used to show "global" which isn't really correct).
Diffstat (limited to 'source/blender/blenkernel/BKE_screen.h')
-rw-r--r-- | source/blender/blenkernel/BKE_screen.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 645a99d592f..6ff344fea38 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -42,6 +42,7 @@ struct Panel; struct Scene; struct ScrArea; struct SpaceType; +struct TransformOrientation; struct View3D; struct bContext; struct bContextDataResult; @@ -53,6 +54,7 @@ struct wmManipulatorMap; struct wmNotifier; struct wmWindow; struct wmWindowManager; +struct WorkSpace; struct GPUFXSettings; #include "BLI_compiler_attrs.h" @@ -309,8 +311,9 @@ unsigned int BKE_screen_view3d_layer_all(const struct bScreen *sc) ATTR_WARN_UNU void BKE_screen_view3d_sync(struct View3D *v3d, struct Scene *scene); void BKE_screen_view3d_scene_sync(struct bScreen *sc, struct Scene *scene); -void BKE_screen_view3d_twmode_remove(struct View3D *v3d, const int i); -void BKE_screen_view3d_main_twmode_remove(ListBase *screen_lb, struct Scene *scene, const int i); +void BKE_screen_transform_orientation_remove( + const struct bScreen *screen, const struct WorkSpace *workspace, + const struct TransformOrientation *orientation) ATTR_NONNULL(); void BKE_screen_gpu_fx_validate(struct GPUFXSettings *fx_settings); bool BKE_screen_is_fullscreen_area(const struct bScreen *screen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); bool BKE_screen_is_used(const struct bScreen *screen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); |