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:
authorTon Roosendaal <ton@blender.org>2009-01-19 19:54:41 +0300
committerTon Roosendaal <ton@blender.org>2009-01-19 19:54:41 +0300
commitbc63213844e723b0c552da446fb7fa9f9e7ea5f6 (patch)
tree433519ee3526536032e62226a058f6ec4fd17a1a /source/blender/editors/transform/transform_snap.c
parent9b049d89a1bc36534875c67e097415e034d0624d (diff)
2.5
View3D has been split now in a local part (RegionView3D) and a per-area part (old View3D). Currently local is: - view transform - camera zoom/offset - gpencil (todo) - custom clipping planes Rest is in Area still, like active camera, draw type, layers, localview, custom centers, around-settings, transform widget, gridlines, and so on (mostly stuff as available in header). To see it work; also added new feature for region split, press SHIFT+ALT+CTRL+S for four-split. The idea is to make a preset 4-split, configured to stick to top/right/front views for three views. Another cool idea to explore is to then box-clip all drawing based on these 3 views. Note about the code: - currently view3d still stores some depricated settings, to convert from older files. Not all settings are copied over though, like custom clip planes or the 'lock view to object'. - since some view3d ops are now on area level, the operators for it should keep track of that. Bugfix in transform: quat initialize in operator-invoke missed one zero. Als brought back GE to compile for missing Ipos and channels.
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r--source/blender/editors/transform/transform_snap.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index f139651c608..7e27fb32044 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -135,16 +135,17 @@ void drawSnapping(TransInfo *t)
if (t->spacetype == SPACE_VIEW3D) {
View3D *v3d = t->view;
+ RegionView3D *rv3d= t->ar->regiondata;
float tmat[4][4], imat[4][4];
float size;
glDisable(GL_DEPTH_TEST);
- size = get_drawsize(v3d, t->sa, t->tsnap.snapPoint);
+ size = get_drawsize(t->ar, t->tsnap.snapPoint);
size *= 0.5f * UI_GetThemeValuef(TH_VERTEX_SIZE);
- Mat4CpyMat4(tmat, v3d->viewmat);
+ Mat4CpyMat4(tmat, rv3d->viewmat);
Mat4Invert(imat, tmat);
drawcircball(GL_LINE_LOOP, t->tsnap.snapPoint, size, imat);
@@ -874,7 +875,7 @@ int snapDerivedMesh(TransInfo *t, Object *ob, DerivedMesh *dm, float obmat[][4],
new_depth = VecLenf(location, ray_start);
- project_int(t->ar, t->view, location, screen_loc);
+ project_int(t->ar, location, screen_loc);
new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]);
if (new_dist <= *dist && new_depth < *depth)
@@ -918,7 +919,7 @@ int snapDerivedMesh(TransInfo *t, Object *ob, DerivedMesh *dm, float obmat[][4],
new_depth = VecLenf(location, ray_start);
- project_int(t->ar, t->view, location, screen_loc);
+ project_int(t->ar, location, screen_loc);
new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]);
if (new_dist <= *dist && new_depth < *depth)
@@ -1010,7 +1011,7 @@ int snapDerivedMesh(TransInfo *t, Object *ob, DerivedMesh *dm, float obmat[][4],
new_depth = VecLenf(location, ray_start);
- project_int(t->ar, t->view, location, screen_loc);
+ project_int(t->ar, location, screen_loc);
new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]);
if (new_dist <= *dist && new_depth < *depth)
@@ -1130,7 +1131,7 @@ int snapDerivedMesh(TransInfo *t, Object *ob, DerivedMesh *dm, float obmat[][4],
new_depth = VecLenf(location, ray_start);
- project_int(t->ar, t->view, location, screen_loc);
+ project_int(t->ar, location, screen_loc);
new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]);
if (new_dist <= *dist && new_depth < *depth)