diff options
author | Martin Poirier <theeth@yahoo.com> | 2008-01-13 21:24:09 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2008-01-13 21:24:09 +0300 |
commit | d660e293650d88e00009ad315fb00ade71239621 (patch) | |
tree | a146ca02bf7424ce8857265273b5d2b69a23978f /source/blender/makesdna | |
parent | 67de673496a056c1f807717865a0f73c4e1aca9f (diff) |
=== Custom Transform Orientation ===
Custom Orientations can be added with Ctrl-Shift-C (hotkey suggestions are welcomed), this adds and select the new alignment. Custom Orientations can also be added, deleted, selected from the Transform Orientations panel (View -> Transform Orientations). Standard orientations (global, local, normal, view) can also be selected from this panel.
If you plan on using only a single custom orientation and don't really need a list, I suggest you use the hotkey as it adds and selects at the same time.
Custom Orientations are save in the scene and are selected per 3D view (like normal orientation).
Adding from an object, the orientation is a normalized version of the object's orientation.
Adding from mesh data, a single element (vertex, edge, face) must be selected in its respective selection mode. Vertex orientation Z-axis is based on the normal, edge Z-axis on the edge itself (X-axis is on the XoY plane when possible, Y-axis is perpendicular to the rest). Face orientation Z-axis is the face normal, X-axis is perpendicular to the first edge, Y-axis is perpendicular to the rest.
(More logical orientations can be suggested).
I plan to add: 2 vertice (connected or not) => edge orientation , 3 vertice = face orientation
Differences from the patch:
- orientations no longer link back to the object they came from, everything is copy on creation.
- orientations are overwritten based on name (if you add an orientation with the same name as one that already exists, it overwrites the old one)
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 9 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index c82a1f9e510..282093f39be 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -333,6 +333,12 @@ typedef struct ParticleEditSettings { int draw_timed; } ParticleEditSettings; +typedef struct TransformOrientation { + struct TransformOrientation *next, *prev; + char name[36]; + float mat[3][3]; +} TransformOrientation; + typedef struct ToolSettings { /* Subdivide Settings */ short cornertype; @@ -366,7 +372,7 @@ typedef struct ToolSettings { /* Auto-IK */ short autoik_chainlen; - /* Image Paint (8 byte aligned please!) */ + /* Image Paint (8 byttse aligned please!) */ struct ImagePaintSettings imapaint; /* Particle Editing */ @@ -494,6 +500,7 @@ typedef struct Scene { ScriptLink scriptlink; ListBase markers; + ListBase transform_spaces; short jumpframe, pad1; short snap_flag, snap_target; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index ee75d7b8f0f..78605464268 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -200,6 +200,7 @@ typedef struct View3D { #define V3D_MANIP_LOCAL 1 #define V3D_MANIP_NORMAL 2 #define V3D_MANIP_VIEW 3 +#define V3D_MANIP_CUSTOM 4 /* anything of value 4 or higher is custom */ /* View3d->twflag */ /* USE = user setting, DRAW = based on selection */ |