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/makesdna
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/makesdna')
-rw-r--r--source/blender/makesdna/DNA_scene_types.h17
-rw-r--r--source/blender/makesdna/DNA_screen_types.h7
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h6
-rw-r--r--source/blender/makesdna/DNA_workspace_types.h3
4 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 506e98edc7b..f21cee80f80 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1297,17 +1297,6 @@ typedef enum eGP_Interpolate_Type {
GP_IPO_SINE = 12,
} eGP_Interpolate_Type;
-
-/* *************************************************************** */
-/* Transform Orientations */
-
-typedef struct TransformOrientation {
- struct TransformOrientation *next, *prev;
- char name[64]; /* MAX_NAME */
- float mat[3][3];
- int pad;
-} TransformOrientation;
-
/* *************************************************************** */
/* Unified Paint Settings
*/
@@ -1696,10 +1685,10 @@ typedef struct Scene {
/* no, is on the right place (ton) */
struct RenderData r;
struct AudioData audio;
-
+
ListBase markers;
- ListBase transform_spaces;
-
+ ListBase transform_spaces DNA_DEPRECATED;
+
void *sound_scene;
void *playback_handle;
void *sound_scrub_handle;
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;
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index f50222859f1..6c526d125d6 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -225,7 +225,9 @@ typedef struct View3D {
char multiview_eye; /* multiview current eye - for internal use */
- char pad3[4];
+ /* The active custom transform orientation of this 3D view. */
+ short custom_orientation_index;
+ char pad3[2];
/* note, 'fx_settings.dof' is currently _not_ allocated,
* instead set (temporarily) from camera */
@@ -376,7 +378,7 @@ enum {
#define V3D_MANIP_NORMAL 2
#define V3D_MANIP_VIEW 3
#define V3D_MANIP_GIMBAL 4
-#define V3D_MANIP_CUSTOM 5 /* anything of value 5 or higher is custom */
+#define V3D_MANIP_CUSTOM 5
/* View3d->twflag */
/* USE = user setting, DRAW = based on selection */
diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h
index 56221242fbf..3805e1c0a8a 100644
--- a/source/blender/makesdna/DNA_workspace_types.h
+++ b/source/blender/makesdna/DNA_workspace_types.h
@@ -73,6 +73,9 @@ typedef struct WorkSpace {
* been activated the last time this workspace was visible. */
ListBase hook_layout_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceDataRelation */
+ /* Custom transform orientations */
+ ListBase transform_orientations DNA_PRIVATE_WORKSPACE;
+
int object_mode DNA_PRIVATE_WORKSPACE; /* enum ObjectMode */
int pad;