diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-09-30 15:43:16 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-09-30 15:43:16 +0400 |
commit | 6833fa41489d46b5da1c337e1f59e436cc4ea97b (patch) | |
tree | 6f0f7961ce341ccbb6e37c0d7b3b028f7cc980ec /source/blender/src/transform.c | |
parent | b47c75953b78ec2645970effe189b8ed7cb7462c (diff) |
== IPO Editor Transform Refactor ==
As with the Action and NLA editors, I've refactored the transform code for the IPO editor to get rid of the special (and clunky) transform loop that had been created. The approach this time is closer to the one taken for the UV/Image editor.
What's New/Will-be-possible-in-the-future:
* Numeric input now works for the IPO editor
* Proportional Edit support for the IPO editor will eventually be added.
* Rotation (hopefully), once some hotkeys have been remapped
Known Problems:
* If a keyframe moves past neighbouring keyframes and the transform gets cancelled, it doesn't get restored correctly. This problem is quite icky to resolve (I've got a large hack for this, but that currently segfaults randomly).
* When scaling, the dashed-line (helpline) is drawn from the wrong starting co-ordinates. This does not affect the actual scaling though
* Trying to scale BezTriples with autohandles still doesn't work if either of the handles haven't been transformed yet. This behaviour was already present prior to this commit.
Diffstat (limited to 'source/blender/src/transform.c')
-rw-r--r-- | source/blender/src/transform.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 00d987142fd..92468b40359 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -295,13 +295,17 @@ void projectIntView(TransInfo *t, float *vec, int *adr) project_int(vec, adr); else if(t->spacetype==SPACE_IMAGE) { float aspx, aspy, v[2]; - + transform_aspect_ratio_tface_uv(&aspx, &aspy); v[0]= vec[0]/aspx; v[1]= vec[1]/aspy; - + uvco_to_areaco_noclip(v, adr); } + else if(t->spacetype==SPACE_IPO) { + adr[0]= vec[0]; + adr[1]= vec[1]; + } } void projectFloatView(TransInfo *t, float *vec, float *adr) @@ -315,6 +319,10 @@ void projectFloatView(TransInfo *t, float *vec, float *adr) adr[0]= a[0]; adr[1]= a[1]; } + else if(t->spacetype==SPACE_IPO) { + adr[0]= vec[0]; + adr[1]= vec[1]; + } } void convertVecToDisplayNum(float *vec, float *num) @@ -1731,7 +1739,7 @@ int Resize(TransInfo *t, short mval[2]) ElementResize(t, td, mat); } - /* evil hack - redo resize if cliiping needeed */ + /* evil hack - redo resize if cliping needed */ if (t->flag & T_CLIP_UV && clipUVTransform(t, size, 1)) { SizeToMat3(size, mat); |