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:
authorCampbell Barton <ideasman42@gmail.com>2010-03-22 12:30:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-03-22 12:30:00 +0300
commit1e9bf0cfdb6c925b28af6f0330467e7d9d798c05 (patch)
treec8356d8bc812dc6e3f23b9c381e94ec4c9d4c879 /source/blender/editors/space_view3d
parent9b2dd9aac65aa49c05176bb8b7aabde9fe1aeeac (diff)
spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c48
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c22
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c240
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c20
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c38
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c32
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c42
9 files changed, 225 insertions, 225 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 3ed8fdc3eab..13f13ffca01 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -1205,7 +1205,7 @@ static void draw_bone(int dt, int armflag, int boneflag, int constflag, unsigned
{
/* Draw a 3d octahedral bone, we use normalized space based on length,
- for glDisplayLists */
+ for glDisplayLists */
glScalef(length, length, length);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index f220229deeb..b7de750e601 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -5812,10 +5812,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
}
- if(ob->pd && ob->pd->forcefield) {
- draw_forcefield(scene, ob, rv3d);
- }
- }
+ if(ob->pd && ob->pd->forcefield) {
+ draw_forcefield(scene, ob, rv3d);
+ }
+ }
/* code for new particle system */
if( (warning_recursive==0) &&
@@ -5972,7 +5972,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
}
- if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
+ if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
bConstraint *con;
for(con=ob->constraints.first; con; con= con->next)
@@ -5985,24 +5985,24 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
}
- /* draw extra: after normal draw because of makeDispList */
- if(dtx && (G.f & G_RENDER_OGL)==0) {
+ /* draw extra: after normal draw because of makeDispList */
+ if(dtx && (G.f & G_RENDER_OGL)==0) {
- if(dtx & OB_AXIS) {
- drawaxes(1.0f, flag, OB_ARROWS);
- }
- if(dtx & OB_BOUNDBOX) draw_bounding_volume(scene, ob);
- if(dtx & OB_TEXSPACE) drawtexspace(ob);
- if(dtx & OB_DRAWNAME) {
- /* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */
- /* but, we also dont draw names for sets or duplicators */
- if(flag == 0) {
- view3d_cached_text_draw_add(0.0f, 0.0f, 0.0f, ob->id.name+2, 10, 0);
- }
- }
- /*if(dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);*/
- if((dtx & OB_DRAWWIRE) && dt>=OB_SOLID) drawWireExtra(scene, rv3d, ob);
- }
+ if(dtx & OB_AXIS) {
+ drawaxes(1.0f, flag, OB_ARROWS);
+ }
+ if(dtx & OB_BOUNDBOX) draw_bounding_volume(scene, ob);
+ if(dtx & OB_TEXSPACE) drawtexspace(ob);
+ if(dtx & OB_DRAWNAME) {
+ /* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */
+ /* but, we also dont draw names for sets or duplicators */
+ if(flag == 0) {
+ view3d_cached_text_draw_add(0.0f, 0.0f, 0.0f, ob->id.name+2, 10, 0);
+ }
+ }
+ /*if(dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);*/
+ if((dtx & OB_DRAWWIRE) && dt>=OB_SOLID) drawWireExtra(scene, rv3d, ob);
+ }
}
if(dt<OB_SHADED) {
@@ -6053,8 +6053,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
else if((flag & DRAW_CONSTCOLOR)==0) {
/* we don't draw centers for duplicators and sets */
if(U.obcenter_dia > 0) {
- /* check > 0 otherwise grease pencil can draw into the circle select which is annoying. */
- drawcentercircle(v3d, rv3d, ob->obmat[3], do_draw_center, ob->id.lib || ob->id.us>1);
+ /* check > 0 otherwise grease pencil can draw into the circle select which is annoying. */
+ drawcentercircle(v3d, rv3d, ob->obmat[3], do_draw_center, ob->id.lib || ob->id.us>1);
}
}
}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index ce3bf293051..5a507556e1b 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -476,11 +476,11 @@ static void drawfloor(Scene *scene, View3D *v3d)
if (draw_line) {
glBegin(GL_LINE_STRIP);
- vert[0]= a*v3d->grid;
- vert[1]= grid;
- glVertex3fv(vert);
- vert[1]= -grid;
- glVertex3fv(vert);
+ vert[0]= a*v3d->grid;
+ vert[1]= grid;
+ glVertex3fv(vert);
+ vert[1]= -grid;
+ glVertex3fv(vert);
glEnd();
}
}
@@ -515,11 +515,11 @@ static void drawfloor(Scene *scene, View3D *v3d)
if (draw_line) {
glBegin(GL_LINE_STRIP);
- vert[1]= a*v3d->grid;
- vert[0]= grid;
- glVertex3fv(vert );
- vert[0]= -grid;
- glVertex3fv(vert);
+ vert[1]= a*v3d->grid;
+ vert[0]= grid;
+ glVertex3fv(vert );
+ vert[0]= -grid;
+ glVertex3fv(vert);
glEnd();
}
}
@@ -1077,7 +1077,7 @@ void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
rcti winrct;
if(base && (base->object->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT) ||
- paint_facesel_test(base->object)));
+ paint_facesel_test(base->object)));
else if((base && (base->object->mode & OB_MODE_TEXTURE_PAINT)) &&
scene->toolsettings && (scene->toolsettings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE));
else if((base && (base->object->mode & OB_MODE_PARTICLE_EDIT)) && v3d->drawtype>OB_WIRE && (v3d->flag & V3D_ZBUF_SELECT));
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index ce1bd14f9fe..16c754ddc2d 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -1277,9 +1277,9 @@ static int viewhome_exec(bContext *C, wmOperator *op) /* was view3d_home() in 2.
rv3d->persp= RV3D_PERSP;
smooth_view(C, NULL, v3d->camera, new_ofs, NULL, &new_dist, NULL);
}
- else {
- smooth_view(C, NULL, NULL, new_ofs, NULL, &new_dist, NULL);
- }
+ else {
+ smooth_view(C, NULL, NULL, new_ofs, NULL, &new_dist, NULL);
+ }
}
// XXX BIF_view3d_previewrender_signal(curarea, PR_DBASE|PR_DISPRECT);
@@ -2647,21 +2647,21 @@ float m_dist;
void viewmoveNDOFfly(ARegion *ar, View3D *v3d, int mode)
{
RegionView3D *rv3d= ar->regiondata;
- int i;
- float phi;
- float dval[7];
+ int i;
+ float phi;
+ float dval[7];
// static fval[6] for low pass filter; device input vector is dval[6]
static float fval[6];
- float tvec[3],rvec[3];
- float q1[4];
+ float tvec[3],rvec[3];
+ float q1[4];
float mat[3][3];
float upvec[3];
- /*----------------------------------------------------
+ /*----------------------------------------------------
* sometimes this routine is called from headerbuttons
- * viewmove needs to refresh the screen
- */
+ * viewmove needs to refresh the screen
+ */
// XXX areawinset(ar->win);
@@ -2765,8 +2765,8 @@ void viewmoveNDOFfly(ARegion *ar, View3D *v3d, int mode)
/*----------------------------------------------------
- * refresh the screen XXX
- */
+ * refresh the screen XXX
+ */
// update render preview window
@@ -2796,10 +2796,10 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
float mat[3][3];
float upvec[3];
- /* Sensitivity will control how fast the view rotates. The value was
- * obtained experimentally by tweaking until the author didn't get dizzy watching.
- * Perhaps this should be a configurable user parameter.
- */
+ /* Sensitivity will control how fast the view rotates. The value was
+ * obtained experimentally by tweaking until the author didn't get dizzy watching.
+ * Perhaps this should be a configurable user parameter.
+ */
float psens = 0.005f * (float) U.ndof_pan; /* pan sensitivity */
float rsens = 0.005f * (float) U.ndof_rotate; /* rotate sensitivity */
float zsens = 0.3f; /* zoom sensitivity */
@@ -2825,16 +2825,16 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
add_v3_v3v3(rv3d->ofs, rv3d->ofs, upvec);
}
- /*----------------------------------------------------
+ /*----------------------------------------------------
* sometimes this routine is called from headerbuttons
- * viewmove needs to refresh the screen
- */
+ * viewmove needs to refresh the screen
+ */
// XXX areawinset(curarea->win);
- /*----------------------------------------------------
- * record how much time has passed. clamp at 10 Hz
- * pretend the previous frame occured at the clamped time
- */
+ /*----------------------------------------------------
+ * record how much time has passed. clamp at 10 Hz
+ * pretend the previous frame occured at the clamped time
+ */
// now = PIL_check_seconds_timer();
// frametime = (now - prevTime);
// if (frametime > 0.1f){ /* if more than 1/10s */
@@ -2843,13 +2843,13 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
// prevTime = now;
// sbadjust *= 60 * frametime; /* normalize ndof device adjustments to 100Hz for framerate independence */
- /* fetch the current state of the ndof device & enforce dominant mode if selected */
+ /* fetch the current state of the ndof device & enforce dominant mode if selected */
// XXX getndof(fval);
if (v3d->ndoffilter)
filterNDOFvalues(fval);
- // put scaling back here, was previously in ghostwinlay
+ // put scaling back here, was previously in ghostwinlay
fval[0] = fval[0] * (1.0f/600.0f);
fval[1] = fval[1] * (1.0f/600.0f);
fval[2] = fval[2] * (1.0f/1100.0f);
@@ -2858,7 +2858,7 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
fval[5] = fval[5] * 0.00005f;
fval[6] = fval[6] / 1000000.0f;
- // scale more if not in perspective mode
+ // scale more if not in perspective mode
if (rv3d->persp == RV3D_ORTHO) {
fval[0] = fval[0] * 0.05f;
fval[1] = fval[1] * 0.05f;
@@ -2869,7 +2869,7 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
zsens *= 8;
}
- /* set object offset */
+ /* set object offset */
if (ob) {
obofs[0] = -ob->obmat[3][0];
obofs[1] = -ob->obmat[3][1];
@@ -2879,102 +2879,102 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int mode)
VECCOPY(obofs, rv3d->ofs);
}
- /* calc an adjustment based on distance from camera
- disabled per patch 14402 */
- d = 1.0f;
+ /* calc an adjustment based on distance from camera
+ disabled per patch 14402 */
+ d = 1.0f;
/* if (ob) {
- sub_v3_v3v3(diff, obofs, rv3d->ofs);
- d = len_v3(diff);
- }
+ sub_v3_v3v3(diff, obofs, rv3d->ofs);
+ d = len_v3(diff);
+ }
*/
- reverse = (rv3d->persmat[2][1] < 0.0f) ? -1.0f : 1.0f;
-
- /*----------------------------------------------------
- * ndof device pan
- */
- psens *= 1.0f + d;
- curareaX = sbadjust * psens * fval[0];
- curareaY = sbadjust * psens * fval[1];
- dvec[0] = curareaX * rv3d->persinv[0][0] + curareaY * rv3d->persinv[1][0];
- dvec[1] = curareaX * rv3d->persinv[0][1] + curareaY * rv3d->persinv[1][1];
- dvec[2] = curareaX * rv3d->persinv[0][2] + curareaY * rv3d->persinv[1][2];
- add_v3_v3v3(rv3d->ofs, rv3d->ofs, dvec);
-
- /*----------------------------------------------------
- * ndof device dolly
- */
- len = zsens * sbadjust * fval[2];
-
- if (rv3d->persp==RV3D_CAMOB) {
- if(rv3d->persp==RV3D_CAMOB) { /* This is stupid, please fix - TODO */
- rv3d->camzoom+= 10.0f * -len;
- }
- if (rv3d->camzoom < minZoom) rv3d->camzoom = minZoom;
- else if (rv3d->camzoom > maxZoom) rv3d->camzoom = maxZoom;
- }
- else if ((rv3d->dist> 0.001*v3d->grid) && (rv3d->dist<10.0*v3d->far)) {
- rv3d->dist*=(1.0 + len);
- }
-
-
- /*----------------------------------------------------
- * ndof device turntable
- * derived from the turntable code in viewmove
- */
-
- /* Get the 3x3 matrix and its inverse from the quaternion */
- quat_to_mat3( m,rv3d->viewquat);
- invert_m3_m3(m_inv,m);
-
- /* Determine the direction of the x vector (for rotating up and down) */
- /* This can likely be compuated directly from the quaternion. */
- mul_m3_v3(m_inv,xvec);
- mul_m3_v3(m_inv,yvec);
- mul_m3_v3(m_inv,zvec);
-
- /* Perform the up/down rotation */
- phi = sbadjust * rsens * /*0.5f * */ fval[3]; /* spin vertically half as fast as horizontally */
- q1[0] = cos(phi);
- mul_v3_v3fl(q1+1, xvec, sin(phi));
- mul_qt_qtqt(rv3d->viewquat, rv3d->viewquat, q1);
-
- if (use_sel) {
- conjugate_qt(q1); /* conj == inv for unit quat */
- sub_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
- mul_qt_v3(q1, rv3d->ofs);
- add_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
- }
-
- /* Perform the orbital rotation */
- /* Perform the orbital rotation
- If the seen Up axis is parallel to the zoom axis, rotation should be
- achieved with a pure Roll motion (no Spin) on the device. When you start
- to tilt, moving from Top to Side view, Spinning will increasingly become
- more relevant while the Roll component will decrease. When a full
- Side view is reached, rotations around the world's Up axis are achieved
- with a pure Spin-only motion. In other words the control of the spinning
- around the world's Up axis should move from the device's Spin axis to the
- device's Roll axis depending on the orientation of the world's Up axis
- relative to the screen. */
- //phi = sbadjust * rsens * reverse * fval[4]; /* spin the knob, y axis */
- phi = sbadjust * rsens * (yvec[2] * fval[4] + zvec[2] * fval[5]);
- q1[0] = cos(phi);
- q1[1] = q1[2] = 0.0;
- q1[3] = sin(phi);
- mul_qt_qtqt(rv3d->viewquat, rv3d->viewquat, q1);
-
- if (use_sel) {
- conjugate_qt(q1);
- sub_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
- mul_qt_v3(q1, rv3d->ofs);
- add_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
- }
-
- /*----------------------------------------------------
- * refresh the screen
- */
+ reverse = (rv3d->persmat[2][1] < 0.0f) ? -1.0f : 1.0f;
+
+ /*----------------------------------------------------
+ * ndof device pan
+ */
+ psens *= 1.0f + d;
+ curareaX = sbadjust * psens * fval[0];
+ curareaY = sbadjust * psens * fval[1];
+ dvec[0] = curareaX * rv3d->persinv[0][0] + curareaY * rv3d->persinv[1][0];
+ dvec[1] = curareaX * rv3d->persinv[0][1] + curareaY * rv3d->persinv[1][1];
+ dvec[2] = curareaX * rv3d->persinv[0][2] + curareaY * rv3d->persinv[1][2];
+ add_v3_v3v3(rv3d->ofs, rv3d->ofs, dvec);
+
+ /*----------------------------------------------------
+ * ndof device dolly
+ */
+ len = zsens * sbadjust * fval[2];
+
+ if (rv3d->persp==RV3D_CAMOB) {
+ if(rv3d->persp==RV3D_CAMOB) { /* This is stupid, please fix - TODO */
+ rv3d->camzoom+= 10.0f * -len;
+ }
+ if (rv3d->camzoom < minZoom) rv3d->camzoom = minZoom;
+ else if (rv3d->camzoom > maxZoom) rv3d->camzoom = maxZoom;
+ }
+ else if ((rv3d->dist> 0.001*v3d->grid) && (rv3d->dist<10.0*v3d->far)) {
+ rv3d->dist*=(1.0 + len);
+ }
+
+
+ /*----------------------------------------------------
+ * ndof device turntable
+ * derived from the turntable code in viewmove
+ */
+
+ /* Get the 3x3 matrix and its inverse from the quaternion */
+ quat_to_mat3( m,rv3d->viewquat);
+ invert_m3_m3(m_inv,m);
+
+ /* Determine the direction of the x vector (for rotating up and down) */
+ /* This can likely be compuated directly from the quaternion. */
+ mul_m3_v3(m_inv,xvec);
+ mul_m3_v3(m_inv,yvec);
+ mul_m3_v3(m_inv,zvec);
+
+ /* Perform the up/down rotation */
+ phi = sbadjust * rsens * /*0.5f * */ fval[3]; /* spin vertically half as fast as horizontally */
+ q1[0] = cos(phi);
+ mul_v3_v3fl(q1+1, xvec, sin(phi));
+ mul_qt_qtqt(rv3d->viewquat, rv3d->viewquat, q1);
+
+ if (use_sel) {
+ conjugate_qt(q1); /* conj == inv for unit quat */
+ sub_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
+ mul_qt_v3(q1, rv3d->ofs);
+ add_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
+ }
+
+ /* Perform the orbital rotation */
+ /* Perform the orbital rotation
+ If the seen Up axis is parallel to the zoom axis, rotation should be
+ achieved with a pure Roll motion (no Spin) on the device. When you start
+ to tilt, moving from Top to Side view, Spinning will increasingly become
+ more relevant while the Roll component will decrease. When a full
+ Side view is reached, rotations around the world's Up axis are achieved
+ with a pure Spin-only motion. In other words the control of the spinning
+ around the world's Up axis should move from the device's Spin axis to the
+ device's Roll axis depending on the orientation of the world's Up axis
+ relative to the screen. */
+ //phi = sbadjust * rsens * reverse * fval[4]; /* spin the knob, y axis */
+ phi = sbadjust * rsens * (yvec[2] * fval[4] + zvec[2] * fval[5]);
+ q1[0] = cos(phi);
+ q1[1] = q1[2] = 0.0;
+ q1[3] = sin(phi);
+ mul_qt_qtqt(rv3d->viewquat, rv3d->viewquat, q1);
+
+ if (use_sel) {
+ conjugate_qt(q1);
+ sub_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
+ mul_qt_v3(q1, rv3d->ofs);
+ add_v3_v3v3(rv3d->ofs, rv3d->ofs, obofs);
+ }
+
+ /*----------------------------------------------------
+ * refresh the screen
+ */
// XXX scrarea_do_windraw(curarea);
}
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index af03662c524..fad86ac12e8 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -397,25 +397,25 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
if( shift==0 || v3d->twtype==0) {
v3d->twtype= V3D_MANIP_TRANSLATE;
}
- ED_area_tag_redraw(sa);
- break;
+ ED_area_tag_redraw(sa);
+ break;
case B_MAN_ROT:
if( shift==0 || v3d->twtype==0) {
- v3d->twtype= V3D_MANIP_ROTATE;
+ v3d->twtype= V3D_MANIP_ROTATE;
}
- ED_area_tag_redraw(sa);
+ ED_area_tag_redraw(sa);
break;
case B_MAN_SCALE:
if( shift==0 || v3d->twtype==0) {
- v3d->twtype= V3D_MANIP_SCALE;
+ v3d->twtype= V3D_MANIP_SCALE;
}
- ED_area_tag_redraw(sa);
+ ED_area_tag_redraw(sa);
break;
case B_NDOF:
- ED_area_tag_redraw(sa);
+ ED_area_tag_redraw(sa);
break;
case B_MAN_MODE:
- ED_area_tag_redraw(sa);
+ ED_area_tag_redraw(sa);
break;
default:
break;
@@ -506,8 +506,8 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiDefIconTextButC(block, ICONTEXTROW,B_NDOF, ICON_NDOF_TURN, ndof_pup(), 0,0,XIC+10,YIC, &(v3d->ndofmode), 0, 3.0, 0, 0, "Ndof mode");
uiDefIconButC(block, TOG, B_NDOF, ICON_NDOF_DOM,
- 0,0,XIC,YIC,
- &v3d->ndoffilter, 0, 1, 0, 0, "dominant axis");
+ 0,0,XIC,YIC,
+ &v3d->ndoffilter, 0, 1, 0, 0, "dominant axis");
}
*/
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 6d75d1d0b81..a5d18e30023 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -186,25 +186,25 @@ void view3d_keymap(wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELUPMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPUP);
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELDOWNMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPDOWN);
- /* active aligned, replaces '*' key in 2.4x */
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT, 0);
- RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_FRONT);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT, 0);
- RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_RIGHT);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT, 0);
- RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_TOP);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
- RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_BACK);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
- RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_LEFT);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
- RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_BOTTOM);
- RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ /* active aligned, replaces '*' key in 2.4x */
+ kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT, 0);
+ RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_FRONT);
+ RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT, 0);
+ RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_RIGHT);
+ RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT, 0);
+ RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_TOP);
+ RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_BACK);
+ RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_LEFT);
+ RNA_boolean_set(kmi->ptr, "align_active", TRUE);
+ kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_BOTTOM);
+ RNA_boolean_set(kmi->ptr, "align_active", TRUE);
WM_keymap_add_item(keymap, "VIEW3D_OT_localview", PADSLASHKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 2eecede4907..b473ae33aa4 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -2051,10 +2051,10 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
int x= RNA_int_get(op->ptr, "x");
int y= RNA_int_get(op->ptr, "y");
int radius= RNA_int_get(op->ptr, "radius");
- int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
- int selecting;
+ int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
+ int selecting;
- selecting= (gesture_mode==GESTURE_MODAL_SELECT);
+ selecting= (gesture_mode==GESTURE_MODAL_SELECT);
if(CTX_data_edit_object(C) || (obact && obact->mode & OB_MODE_PARTICLE_EDIT)) {
ViewContext vc;
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index ada0462a8ff..bd02a34cbd8 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -255,7 +255,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
bArmature *arm= obedit->data;
int totmalloc= BLI_countlist(arm->edbo);
- totmalloc *= 2; /* probably overkill but bones can have 2 trans verts each */
+ totmalloc *= 2; /* probably overkill but bones can have 2 trans verts each */
tv=transvmain= MEM_callocN(totmalloc*sizeof(TransVert), "maketransverts armature");
@@ -1088,18 +1088,18 @@ void VIEW3D_OT_snap_selected_to_center(wmOperatorType *ot)
/*New Code - Snap Cursor to Center -*/
static int snap_curs_to_center(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
- float *curs;
- curs= give_cursor(scene, v3d);
-
- curs[0]= 0.0;
- curs[1]= 0.0;
- curs[2]= 0.0;
+ Scene *scene= CTX_data_scene(C);
+ View3D *v3d= CTX_wm_view3d(C);
+ float *curs;
+ curs= give_cursor(scene, v3d);
+
+ curs[0]= 0.0;
+ curs[1]= 0.0;
+ curs[2]= 0.0;
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d);
- return OPERATOR_FINISHED;
+ return OPERATOR_FINISHED;
}
void VIEW3D_OT_snap_cursor_to_center(wmOperatorType *ot)
@@ -1110,12 +1110,12 @@ void VIEW3D_OT_snap_cursor_to_center(wmOperatorType *ot)
ot->description= "Snap cursor to the Center";
ot->idname= "VIEW3D_OT_snap_cursor_to_center";
- /* api callbacks */
- ot->exec= snap_curs_to_center;
- ot->poll= ED_operator_view3d_active;
+ /* api callbacks */
+ ot->exec= snap_curs_to_center;
+ ot->poll= ED_operator_view3d_active;
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* **************************************************** */
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index fd7e2c22137..c03ea0e36c1 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -260,14 +260,14 @@ void smooth_view(bContext *C, Object *oldcamera, Object *camera, float *ofs, flo
* the angle between quats
* this means small rotations wont lag */
if (quat && !ofs && !dist) {
- float vec1[3], vec2[3];
+ float vec1[3], vec2[3];
- VECCOPY(vec1, sms.new_quat);
- VECCOPY(vec2, sms.orig_quat);
- normalize_v3(vec1);
- normalize_v3(vec2);
- /* scale the time allowed by the rotation */
- sms.time_allowed *= angle_normalized_v3v3(vec1, vec2)/(M_PI/2);
+ VECCOPY(vec1, sms.new_quat);
+ VECCOPY(vec2, sms.orig_quat);
+ normalize_v3(vec1);
+ normalize_v3(vec2);
+ /* scale the time allowed by the rotation */
+ sms.time_allowed *= angle_normalized_v3v3(vec1, vec2)/(M_PI/2);
}
/* original values */
@@ -692,8 +692,8 @@ void view3d_unproject(bglMats *mats, float out[3], const short x, const short y,
{
double ux, uy, uz;
- gluUnProject(x,y,z, mats->modelview, mats->projection,
- (GLint *)mats->viewport, &ux, &uy, &uz );
+ gluUnProject(x,y,z, mats->modelview, mats->projection,
+ (GLint *)mats->viewport, &ux, &uy, &uz );
out[0] = ux;
out[1] = uy;
out[2] = uz;
@@ -902,20 +902,20 @@ int get_view3d_ortho(View3D *v3d, RegionView3D *rv3d)
Camera *cam;
if(rv3d->persp==RV3D_CAMOB) {
- if(v3d->camera && v3d->camera->type==OB_CAMERA) {
- cam= v3d->camera->data;
-
- if(cam && cam->type==CAM_ORTHO)
- return 1;
- else
- return 0;
- }
- else
- return 0;
+ if(v3d->camera && v3d->camera->type==OB_CAMERA) {
+ cam= v3d->camera->data;
+
+ if(cam && cam->type==CAM_ORTHO)
+ return 1;
+ else
+ return 0;
+ }
+ else
+ return 0;
}
if(rv3d->persp==RV3D_ORTHO)
- return 1;
+ return 1;
return 0;
}
@@ -2571,7 +2571,7 @@ static int flyApply(bContext *C, FlyInfo *fly)
ID *id_key;
/* transform the parent or the camera? */
if(fly->root_parent) {
- Object *ob_update;
+ Object *ob_update;
float view_mat[4][4];
float prev_view_imat[4][4];