From 46fc0bb87ebda166d08b23cbcca799acb2c54158 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 1 Jun 2017 20:41:18 +0200 Subject: 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). --- source/blender/makesdna/DNA_screen_types.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/makesdna/DNA_screen_types.h') diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 2524bad7c0f..75ae1cdab95 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -193,6 +193,13 @@ typedef struct uiList { /* some list UI data need to be saved in file uiListDyn *dyn_data; } uiList; +typedef struct TransformOrientation { + struct TransformOrientation *next, *prev; + char name[64]; /* MAX_NAME */ + float mat[3][3]; + int pad; +} TransformOrientation; + typedef struct uiPreview { /* some preview UI data need to be saved in file */ struct uiPreview *next, *prev; -- cgit v1.2.3