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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-06-20 14:28:51 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-20 14:28:51 +0400
commit4b955a60eda06526e3a793fd9bb3c942b641d877 (patch)
treee5706d5afef06f2b2e09b4022bfb537acf5d24d8 /source/blender/editors/transform/transform.c
parentfca0112ba3e534c90fd0afaca9e901bc9c022b47 (diff)
Cleanup up space clip API:
- Remove clip/mask specific size/aspect getters, they shall just use the same size/aspect ratio. - Made size getter (and some other public functions) accept context instead of SpaceClip. Currently only SpaceClip is being get from this context, but later it'll be helpful when adding support of editing mask without opening clip in clip editor (in this case using render resolution for mask would be ideal, but this requires knowing scene in size getter). - Rearrange some functions in clip_editor.c for easier navigation in the file.
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r--source/blender/editors/transform/transform.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 67e87afc5c3..cedb09e187c 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -183,11 +183,11 @@ void convertViewVec(TransInfo *t, float r_vec[3], int dx, int dy)
r_vec[2] = 0.0f;
if (t->options & CTX_MOVIECLIP) {
- ED_space_clip_get_clip_aspect_dimension_aware(t->sa->spacedata.first, &aspx, &aspy);
+ ED_space_clip_get_aspect_dimension_aware(t->sa->spacedata.first, &aspx, &aspy);
}
else if (t->options & CTX_MASK) {
/* TODO - NOT WORKING, this isnt so bad since its only display aspect */
- ED_space_clip_get_mask_aspect(t->sa->spacedata.first, &aspx, &aspy);
+ ED_space_clip_get_aspect(t->sa->spacedata.first, &aspx, &aspy);
}
r_vec[0] *= aspx;
@@ -254,9 +254,9 @@ void projectIntView(TransInfo *t, const float vec[3], int adr[2])
copy_v2_v2(v, vec);
if (t->options & CTX_MOVIECLIP)
- ED_space_clip_get_clip_aspect_dimension_aware(t->sa->spacedata.first, &aspx, &aspy);
+ ED_space_clip_get_aspect_dimension_aware(t->sa->spacedata.first, &aspx, &aspy);
else if (t->options & CTX_MASK)
- ED_space_clip_get_mask_aspect(t->sa->spacedata.first, &aspx, &aspy);
+ ED_space_clip_get_aspect(t->sa->spacedata.first, &aspx, &aspy);
v[0] /= aspx;
v[1] /= aspy;
@@ -317,13 +317,13 @@ void applyAspectRatio(TransInfo *t, float vec[2])
if (t->options & CTX_MOVIECLIP) {
- ED_space_clip_get_clip_aspect_dimension_aware(sc, &aspx, &aspy);
+ ED_space_clip_get_aspect_dimension_aware(sc, &aspx, &aspy);
vec[0] /= aspx;
vec[1] /= aspy;
}
else if (t->options & CTX_MASK) {
- ED_space_clip_get_mask_aspect(sc, &aspx, &aspy);
+ ED_space_clip_get_aspect(sc, &aspx, &aspy);
vec[0] /= aspx;
vec[1] /= aspy;
@@ -356,10 +356,10 @@ void removeAspectRatio(TransInfo *t, float vec[2])
float aspx = 1.0f, aspy = 1.0f;
if (t->options & CTX_MOVIECLIP) {
- ED_space_clip_get_clip_aspect_dimension_aware(sc, &aspx, &aspy);
+ ED_space_clip_get_aspect_dimension_aware(sc, &aspx, &aspy);
}
else if (t->options & CTX_MASK) {
- ED_space_clip_get_mask_aspect(sc, &aspx, &aspy);
+ ED_space_clip_get_aspect(sc, &aspx, &aspy);
}
vec[0] *= aspx;