Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2017-06-01 21:41:18 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-06-01 21:46:18 +0300
commit46fc0bb87ebda166d08b23cbcca799acb2c54158 (patch)
tree1566d535d93c4fb81b962cdbc1346ca8242460f2 /source/blender/blenloader/intern/writefile.c
parent7f564d74f9edaaa41ce27c6e854869096f70b4da (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/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 82d2e37dce0..c1628575398 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2754,11 +2754,6 @@ static void write_scene(WriteData *wd, Scene *sce)
writestruct(wd, DATA, TimeMarker, 1, marker);
}
- /* writing dynamic list of TransformOrientations to the blend file */
- for (TransformOrientation *ts = sce->transform_spaces.first; ts; ts = ts->next) {
- writestruct(wd, DATA, TransformOrientation, 1, ts);
- }
-
for (SceneRenderLayer *srl = sce->r.layers.first; srl; srl = srl->next) {
writestruct(wd, DATA, SceneRenderLayer, 1, srl);
if (srl->prop) {
@@ -3754,10 +3749,12 @@ static void write_cachefile(WriteData *wd, CacheFile *cache_file)
static void write_workspace(WriteData *wd, WorkSpace *workspace)
{
ListBase *layouts = BKE_workspace_layouts_get(workspace);
+ ListBase *transform_orientations = BKE_workspace_transform_orientations_get(workspace);
writestruct(wd, ID_WS, WorkSpace, 1, workspace);
writelist(wd, DATA, WorkSpaceLayout, layouts);
writelist(wd, DATA, WorkSpaceDataRelation, &workspace->hook_layout_relations);
+ writelist(wd, DATA, TransformOrientation, transform_orientations);
}
/* Keep it last of write_foodata functions. */