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:
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c20
-rw-r--r--source/blender/editors/transform/transform.h108
-rw-r--r--source/blender/editors/transform/transform_constraints.c2
-rw-r--r--source/blender/editors/transform/transform_conversions.c34
-rw-r--r--source/blender/editors/transform/transform_ndofinput.c8
-rw-r--r--source/blender/editors/transform/transform_ops.c8
-rw-r--r--source/blender/editors/transform/transform_orientations.c4
7 files changed, 92 insertions, 92 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 8ac7d2aeab3..414e789787a 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -559,7 +559,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
t->redraw |= TREDRAW_SOFT;
if (t->state == TRANS_STARTING) {
- t->state = TRANS_RUNNING;
+ t->state = TRANS_RUNNING;
}
applyMouseInput(t, &t->mouse, t->mval, t->values);
@@ -2540,16 +2540,16 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't resize objects itself
if((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)){
/* scale val and reset size */
- *td->val = td->ival * (1 + (fsize[0] - 1) * td->factor);
+ *td->val = td->ival * (1 + (fsize[0] - 1) * td->factor);
td->ext->size[0] = td->ext->isize[0];
td->ext->size[1] = td->ext->isize[1];
td->ext->size[2] = td->ext->isize[2];
- }
+ }
else {
/* Reset val if SINGLESIZE but using a constraint */
if (td->flag & TD_SINGLESIZE)
- *td->val = td->ival;
+ *td->val = td->ival;
td->ext->size[0] = td->ext->isize[0] * (1 + (fsize[0] - 1) * td->factor);
td->ext->size[1] = td->ext->isize[1] * (1 + (fsize[1] - 1) * td->factor);
@@ -2948,7 +2948,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
/* rotation */
if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't rotate objects itself
/* euler or quaternion? */
- if ((td->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) {
+ if ((td->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) {
mul_serie_m3(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0);
mat3_to_quat( quat,fmat); // Actual transform
@@ -5719,11 +5719,11 @@ void BIF_TransformSetUndo(char *str)
void NDofTransform()
{
#if 0 // TRANSFORM_FIX_ME
- float fval[7];
- float maxval = 50.0f; // also serves as threshold
- int axis = -1;
- int mode = 0;
- int i;
+ float fval[7];
+ float maxval = 50.0f; // also serves as threshold
+ int axis = -1;
+ int mode = 0;
+ int i;
getndof(fval);
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 4f2a3960491..3fe61bbe851 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -108,25 +108,25 @@ typedef struct TransSnap {
typedef struct TransCon {
short orientation; /**/
- char text[50]; /* Description of the Constraint for header_print */
- float mtx[3][3]; /* Matrix of the Constraint space */
- float imtx[3][3]; /* Inverse Matrix of the Constraint space */
- float pmtx[3][3]; /* Projection Constraint Matrix (same as imtx with some axis == 0) */
- float center[3]; /* transformation center to define where to draw the view widget
- ALWAYS in global space. Unlike the transformation center */
+ char text[50]; /* Description of the Constraint for header_print */
+ float mtx[3][3]; /* Matrix of the Constraint space */
+ float imtx[3][3]; /* Inverse Matrix of the Constraint space */
+ float pmtx[3][3]; /* Projection Constraint Matrix (same as imtx with some axis == 0) */
+ float center[3]; /* transformation center to define where to draw the view widget
+ ALWAYS in global space. Unlike the transformation center */
short imval[2]; /* initial mouse value for visual calculation */
- /* the one in TransInfo is not garanty to stay the same (Rotates change it) */
- int mode; /* Mode flags of the Constraint */
+ /* the one in TransInfo is not garanty to stay the same (Rotates change it) */
+ int mode; /* Mode flags of the Constraint */
void (*drawExtra)(struct TransInfo *);
/* For constraints that needs to draw differently from the other
uses this instead of the generic draw function */
- void (*applyVec)(struct TransInfo *, struct TransData *, float *, float *, float *);
- /* Apply function pointer for linear vectorial transformation */
- /* The last three parameters are pointers to the in/out/printable vectors */
- void (*applySize)(struct TransInfo *, struct TransData *, float [3][3]);
- /* Apply function pointer for size transformation */
- void (*applyRot)(struct TransInfo *, struct TransData *, float [3], float *);
- /* Apply function pointer for rotation transformation */
+ void (*applyVec)(struct TransInfo *, struct TransData *, float *, float *, float *);
+ /* Apply function pointer for linear vectorial transformation */
+ /* The last three parameters are pointers to the in/out/printable vectors */
+ void (*applySize)(struct TransInfo *, struct TransData *, float [3][3]);
+ /* Apply function pointer for size transformation */
+ void (*applyRot)(struct TransInfo *, struct TransData *, float [3], float *);
+ /* Apply function pointer for rotation transformation */
} TransCon;
typedef struct TransDataExtension {
@@ -135,16 +135,16 @@ typedef struct TransDataExtension {
float drotAxis[3]; /* Initial object drotAxis */
float dquat[4]; /* Initial object dquat */
float dsize[3]; /* Initial object dsize */
- float *rot; /* Rotation of the data to transform (Faculative) */
- float irot[3]; /* Initial rotation */
- float *quat; /* Rotation quaternion of the data to transform (Faculative) */
- float iquat[4]; /* Initial rotation quaternion */
+ float *rot; /* Rotation of the data to transform (Faculative) */
+ float irot[3]; /* Initial rotation */
+ float *quat; /* Rotation quaternion of the data to transform (Faculative) */
+ float iquat[4]; /* Initial rotation quaternion */
float *rotAngle; /* Rotation angle of the data to transform (Faculative) */
float irotAngle; /* Initial rotation angle */
float *rotAxis; /* Rotation axis of the data to transform (Faculative) */
float irotAxis[4]; /* Initial rotation axis */
- float *size; /* Size of the data to transform (Faculative) */
- float isize[3]; /* Initial size */
+ float *size; /* Size of the data to transform (Faculative) */
+ float isize[3]; /* Initial size */
float obmat[4][4]; /* Object matrix */
} TransDataExtension;
@@ -214,20 +214,20 @@ typedef struct TransData {
float dist; /* Distance needed to affect element (for Proportionnal Editing) */
float rdist; /* Distance to the nearest element (for Proportionnal Editing) */
float factor; /* Factor of the transformation (for Proportionnal Editing) */
- float *loc; /* Location of the data to transform */
- float iloc[3]; /* Initial location */
+ float *loc; /* Location of the data to transform */
+ float iloc[3]; /* Initial location */
float *val; /* Value pointer for special transforms */
float ival; /* Old value*/
- float center[3]; /* Individual data center */
- float mtx[3][3]; /* Transformation matrix from data space to global space */
- float smtx[3][3]; /* Transformation matrix from global space to data space */
+ float center[3]; /* Individual data center */
+ float mtx[3][3]; /* Transformation matrix from data space to global space */
+ float smtx[3][3]; /* Transformation matrix from global space to data space */
float axismtx[3][3];/* Axis orientation matrix of the data */
struct Object *ob;
struct bConstraint *con; /* for objects/bones, the first constraint in its constraint stack */
TransDataExtension *ext; /* for objects, poses. 1 single malloc per TransInfo! */
TransDataCurveHandleFlags *hdata; /* for curves, stores handle flags for modification/cancel */
void *extra; /* extra data (mirrored element pointer, in editmode mesh to EditVert) (editbone for roll fixing) (...) */
- int flag; /* Various flags */
+ int flag; /* Various flags */
short protectflag; /* If set, copy of Object or PoseChannel protection */
int rotOrder; /* rotation mode, as defined in eRotationModes (DNA_action_types.h) */
} TransData;
@@ -236,7 +236,7 @@ typedef struct MouseInput {
void (*apply)(struct TransInfo *, struct MouseInput *, short [2], float [3]);
void (*post)(struct TransInfo *, float [3]);
- short imval[2]; /* initial mouse position */
+ short imval[2]; /* initial mouse position */
char precision;
short precision_mval[2]; /* mouse position when precision key was pressed */
int center[2];
@@ -245,32 +245,32 @@ typedef struct MouseInput {
} MouseInput;
typedef struct TransInfo {
- int mode; /* current mode */
- int flag; /* generic flags for special behaviors */
- int modifiers; /* special modifiers, by function, not key */
+ int mode; /* current mode */
+ int flag; /* generic flags for special behaviors */
+ int modifiers; /* special modifiers, by function, not key */
short state; /* current state (running, canceled,...)*/
- int options; /* current context/options for transform */
- float val; /* init value for some transformations (and rotation angle) */
- float fac; /* factor for distance based transform */
- int (*transform)(struct TransInfo *, short *);
- /* transform function pointer */
+ int options; /* current context/options for transform */
+ float val; /* init value for some transformations (and rotation angle) */
+ float fac; /* factor for distance based transform */
+ int (*transform)(struct TransInfo *, short *);
+ /* transform function pointer */
int (*handleEvent)(struct TransInfo *, struct wmEvent *);
/* event handler function pointer RETURN 1 if redraw is needed */
- int total; /* total number of transformed data */
- TransData *data; /* transformed data (array) */
+ int total; /* total number of transformed data */
+ TransData *data; /* transformed data (array) */
TransDataExtension *ext; /* transformed data extension (array) */
TransData2D *data2d; /* transformed data for 2d (array) */
- TransCon con; /* transformed constraint */
- TransSnap tsnap;
- NumInput num; /* numerical input */
- NDofInput ndof; /* ndof input */
- MouseInput mouse; /* mouse input */
- char redraw; /* redraw flag */
+ TransCon con; /* transformed constraint */
+ TransSnap tsnap;
+ NumInput num; /* numerical input */
+ NDofInput ndof; /* ndof input */
+ MouseInput mouse; /* mouse input */
+ char redraw; /* redraw flag */
float prop_size; /* proportional circle radius */
char proptext[20]; /* proportional falloff text */
- float center[3]; /* center of transformation */
- int center2d[2]; /* center in screen coordinates */
- short imval[2]; /* initial mouse position */
+ float center[3]; /* center of transformation */
+ int center2d[2]; /* center in screen coordinates */
+ short imval[2]; /* initial mouse position */
short event_type; /* event->type used to invoke transform */
short idx_max; /* maximum index on the input vector */
float snap[3]; /* Snapping Gears */
@@ -317,12 +317,12 @@ typedef struct TransInfo {
struct Scene *scene;
struct ToolSettings *settings;
struct wmTimer *animtimer;
- short mval[2]; /* current mouse position */
- struct Object *obedit;
- void *draw_handle_apply;
- void *draw_handle_view;
- void *draw_handle_pixel;
- void *draw_handle_cursor;
+ short mval[2]; /* current mouse position */
+ struct Object *obedit;
+ void *draw_handle_apply;
+ void *draw_handle_view;
+ void *draw_handle_pixel;
+ void *draw_handle_cursor;
} TransInfo;
@@ -349,7 +349,7 @@ typedef struct TransInfo {
#define T_POSE (1 << 2)
#define T_TEXTURE (1 << 3)
#define T_CAMERA (1 << 4)
- // trans on points, having no rotation/scale
+ // trans on points, having no rotation/scale
#define T_POINTS (1 << 6)
// for manipulator exceptions, like scaling using center point, drawing help lines
#define T_USES_MANIPULATOR (1 << 7)
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index d27e87932b0..b9e047c95e8 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -877,7 +877,7 @@ static void setNearestAxis3d(TransInfo *t)
axis[1] = (float)(icoord[1] - t->center2d[1]);
axis[2] = 0.0f;
- if (normalize_v3(axis) != 0.0f) {
+ if (normalize_v3(axis) != 0.0f) {
project_v3_v3v3(proj, mvec, axis);
sub_v3_v3v3(axis, mvec, proj);
len[i] = normalize_v3(axis);
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 4e4fd0c24ae..2aca6329717 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1001,8 +1001,8 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob)
t->poseobj= ob; /* we also allow non-active objects to be transformed, in weightpaint */
/* init trans data */
- td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransPoseBone");
- tdx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransPoseBoneExt");
+ td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransPoseBone");
+ tdx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransPoseBoneExt");
for(i=0; i<t->total; i++, td++, tdx++) {
td->ext= tdx;
td->val = NULL;
@@ -1069,12 +1069,12 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
}
}
- if (!t->total) return;
+ if (!t->total) return;
copy_m3_m4(mtx, t->obedit->obmat);
invert_m3_m3(smtx, mtx);
- td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransEditBone");
+ td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransEditBone");
for (ebo = edbo->first; ebo; ebo = ebo->next)
{
@@ -1231,7 +1231,7 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t)
static void createTransMBallVerts(bContext *C, TransInfo *t)
{
MetaBall *mb = (MetaBall*)t->obedit->data;
- MetaElem *ml;
+ MetaElem *ml;
TransData *td;
TransDataExtension *tx;
float mtx[3][3], smtx[3][3];
@@ -1361,7 +1361,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
Object *obedit= CTX_data_edit_object(C);
Curve *cu= obedit->data;
TransData *td = NULL;
- Nurb *nu;
+ Nurb *nu;
BezTriple *bezt;
BPoint *bp;
float mtx[3][3], smtx[3][3];
@@ -1409,7 +1409,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
copy_m3_m4(mtx, t->obedit->obmat);
invert_m3_m3(smtx, mtx);
- td = t->data;
+ td = t->data;
for(nu= cu->editnurb->first; nu; nu= nu->next) {
if(nu->type == CU_BEZIER) {
TransData *head, *tail;
@@ -1581,7 +1581,7 @@ static void createTransLatticeVerts(bContext *C, TransInfo *t)
bp++;
}
- /* note: in prop mode we need at least 1 selected */
+ /* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
if(propmode) t->total = count;
@@ -1666,7 +1666,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
}
}
- /* note: in prop mode we need at least 1 selected */
+ /* note: in prop mode we need at least 1 selected */
if (hasselected==0) return;
t->total = count;
@@ -2148,7 +2148,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
}
- /* note: in prop mode we need at least 1 selected */
+ /* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
/* check active */
@@ -2471,7 +2471,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
}
}
- /* note: in prop mode we need at least 1 selected */
+ /* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
t->total= (propmode)? count: countsel;
@@ -3602,7 +3602,7 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv
/* dynamically allocate an array of chars to mark whether an TransData's
* pointers have been fixed already, so that we don't override ones that are
* already done
- */
+ */
adjusted= MEM_callocN(t->total, "beztmap_adjusted_map");
/* for each beztmap item, find if it is used anywhere */
@@ -4756,7 +4756,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
FCurve *fcu= (FCurve *)ale->key_data;
if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
- ((cancelled == 0) || (duplicate)) )
+ ((cancelled == 0) || (duplicate)) )
{
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
@@ -4783,7 +4783,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
/* Do curve cleanups? */
if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
- ((cancelled == 0) || (duplicate)) )
+ ((cancelled == 0) || (duplicate)) )
{
posttrans_action_clean(&ac, (bAction *)ac.data);
}
@@ -4852,7 +4852,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
FCurve *fcu= (FCurve *)ale->key_data;
if ( (sipo->flag & SIPO_NOTRANSKEYCULL)==0 &&
- ((cancelled == 0) || (duplicate)) )
+ ((cancelled == 0) || (duplicate)) )
{
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
@@ -5215,7 +5215,7 @@ void createTransData(bContext *C, TransInfo *t)
t->ext = NULL;
if (t->obedit->type == OB_MESH) {
createTransEditVerts(C, t);
- }
+ }
else if ELEM(t->obedit->type, OB_CURVE, OB_SURF) {
createTransCurveVerts(C, t);
}
@@ -5228,7 +5228,7 @@ void createTransData(bContext *C, TransInfo *t)
else if (t->obedit->type==OB_ARMATURE) {
t->flag &= ~T_PROP_EDIT;
createTransArmatureVerts(C, t);
- }
+ }
else {
printf("edit type not implemented!\n");
}
diff --git a/source/blender/editors/transform/transform_ndofinput.c b/source/blender/editors/transform/transform_ndofinput.c
index a6171723752..2796518dbc6 100644
--- a/source/blender/editors/transform/transform_ndofinput.c
+++ b/source/blender/editors/transform/transform_ndofinput.c
@@ -44,7 +44,7 @@ static void resetNDofInput(NDofInput *n);
void initNDofInput(NDofInput *n)
{
- int i;
+ int i;
n->flag = 0;
n->axis = 0;
@@ -128,9 +128,9 @@ void applyNDofInput(NDofInput *n, float *vec)
static int updateNDofMotion(NDofInput *n)
{
- float fval[7];
- int i;
- int retval = 0;
+ float fval[7];
+ int i;
+ int retval = 0;
getndof(fval);
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 6ff30a0b683..fd1d50c551a 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -533,9 +533,9 @@ void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Tilt";
- /*optionals -
- "Tilt selected vertices."
- "Specify an extra axis rotation for selected vertices of 3d curve." */
+ /*optionals -
+ "Tilt selected vertices."
+ "Specify an extra axis rotation for selected vertices of 3d curve." */
ot->description= "Tilt selected control vertices of 3d curve";
ot->idname = OP_TILT;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -640,7 +640,7 @@ void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "To Sphere";
- //added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()"
+ //added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()"
ot->description= "Move selected vertices outward in a spherical shape around mesh center";
ot->idname = OP_TOSPHERE;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 6516582b9fc..a8a469ccd98 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -483,7 +483,7 @@ void applyTransformOrientation(const bContext *C, float mat[3][3], char *name) {
break;
}
}
- }
+ }
}
static int count_bone_select(bArmature *arm, ListBase *lb, int do_it)
@@ -815,7 +815,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
float mat[4][4];
/* Rotation of MetaElem is stored in quat */
- quat_to_mat4( mat,ml_sel->quat);
+ quat_to_mat4( mat,ml_sel->quat);
VECCOPY(normal, mat[2]);