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/armature')
-rw-r--r--source/blender/editors/armature/editarmature.c20
-rw-r--r--source/blender/editors/armature/meshlaplacian.c18
-rw-r--r--source/blender/editors/armature/poseobject.c18
-rw-r--r--source/blender/editors/armature/reeb.c14
4 files changed, 35 insertions, 35 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index cd698bbf09f..969127325e6 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -680,7 +680,7 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
* 2. remove this from the 'visual' y-rotation
*/
{
- float premat[3][3], imat[3][3],pmat[3][3], tmat[3][3];
+ float premat[3][3], imat[3][3], pmat[3][3], tmat[3][3];
float delta[3], eul[3];
/* obtain new auto y-rotation */
@@ -693,7 +693,7 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
/* remove auto from visual and get euler rotation */
mul_m3_m3m3(tmat, imat, pmat);
- mat3_to_eul( eul,tmat);
+ mat3_to_eul( eul, tmat);
/* just use this euler-y as new roll value */
curbone->roll= eul[1];
@@ -2285,7 +2285,7 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op))
View3D *v3d;
bArmature *arm;
EditBone *ebone, *newbone, *flipbone;
- float *curs, mat[3][3],imat[3][3];
+ float *curs, mat[3][3], imat[3][3];
int a, to_root= 0;
Object *obedit;
Scene *scene;
@@ -3457,7 +3457,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "name", name);
- copy_v3_v3(curs, give_cursor(CTX_data_scene(C),CTX_wm_view3d(C)));
+ copy_v3_v3(curs, give_cursor(CTX_data_scene(C), CTX_wm_view3d(C)));
/* Get inverse point for head and orientation for tail */
invert_m4_m4(obedit->imat, obedit->obmat);
@@ -4440,7 +4440,7 @@ static int vgroup_add_unique_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr))
* If such a vertex group aleady exist the routine exits.
*/
if (!(bone->flag & BONE_NO_DEFORM)) {
- if (!defgroup_find_name(ob,bone->name)) {
+ if (!defgroup_find_name(ob, bone->name)) {
ED_vgroup_add_name(ob, bone->name);
return 1;
}
@@ -4828,7 +4828,7 @@ static void pchan_clear_rot(bPoseChannel *pchan)
quat_to_eul(oldeul, quat1);
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
- axis_angle_to_eulO( oldeul, EULER_ORDER_DEFAULT,pchan->rotAxis, pchan->rotAngle);
+ axis_angle_to_eulO( oldeul, EULER_ORDER_DEFAULT, pchan->rotAxis, pchan->rotAngle);
}
else {
copy_v3_v3(oldeul, pchan->eul);
@@ -4855,7 +4855,7 @@ static void pchan_clear_rot(bPoseChannel *pchan)
}
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
- eulO_to_axis_angle( pchan->rotAxis, &pchan->rotAngle,eul, EULER_ORDER_DEFAULT);
+ eulO_to_axis_angle( pchan->rotAxis, &pchan->rotAngle, eul, EULER_ORDER_DEFAULT);
}
else {
copy_v3_v3(pchan->eul, eul);
@@ -5094,7 +5094,7 @@ void POSE_OT_select_all(wmOperatorType *ot)
static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- bPoseChannel *pchan,*parent;
+ bPoseChannel *pchan, *parent;
/* Determine if there is an active bone */
pchan=CTX_data_active_pose_bone(C);
@@ -5737,8 +5737,8 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
/* Copy orientation from source */
copy_v3_v3(dst->loc, src->obmat[3]);
- mat4_to_eul( dst->rot,src->obmat);
- mat4_to_size( dst->size,src->obmat);
+ mat4_to_eul(dst->rot, src->obmat);
+ mat4_to_size(dst->size, src->obmat);
where_is_object(scene, obedit);
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 59a7437e753..a5db3dc118f 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -584,7 +584,7 @@ static void heat_calc_vnormals(LaplacianSystem *sys)
v2= (*face)[1];
v3= (*face)[2];
- normal_tri_v3( fnor,sys->verts[v1], sys->verts[v2], sys->verts[v3]);
+ normal_tri_v3(fnor, sys->verts[v1], sys->verts[v2], sys->verts[v3]);
add_v3_v3(sys->heat.vnors[v1], fnor);
add_v3_v3(sys->heat.vnors[v2], fnor);
@@ -945,7 +945,7 @@ void rigid_deform_iteration()
}
}
- /* solve for positions, for X,Y and Z separately */
+ /* solve for positions, for X, Y and Z separately */
for (i=0; i<3; i++) {
laplacian_begin_solve(sys, i);
@@ -1069,7 +1069,7 @@ void rigid_deform_end(int cancel)
#define MESHDEFORM_MIN_INFLUENCE 0.0005f
static int MESHDEFORM_OFFSET[7][3] =
- {{0,0,0}, {1,0,0}, {-1,0,0}, {0,1,0}, {0,-1,0}, {0,0,1}, {0,0,-1}};
+ {{0, 0, 0}, {1, 0, 0}, {-1, 0, 0}, {0, 1, 0}, {0, -1, 0}, {0, 0, 1}, {0, 0, -1}};
typedef struct MDefBoundIsect {
float co[3], uvw[4];
@@ -1128,10 +1128,10 @@ typedef struct MeshDeformIsect {
/* our own triangle intersection, so we can fully control the epsilons and
* prevent corner case from going wrong*/
static int meshdeform_tri_intersect(float orig[3], float end[3], float vert0[3],
- float vert1[3], float vert2[3], float *isectco, float *uvw)
+ float vert1[3], float vert2[3], float *isectco, float *uvw)
{
float edge1[3], edge2[3], tvec[3], pvec[3], qvec[3];
- float det,inv_det, u, v, dir[3], isectdir[3];
+ float det, inv_det, u, v, dir[3], isectdir[3];
sub_v3_v3v3(dir, end, orig);
@@ -1208,16 +1208,16 @@ static int meshdeform_intersect(MeshDeformBind *mdb, MeshDeformIsect *isec)
hit = meshdeform_tri_intersect(isec->start, end, face[0], face[1], face[2], co, uvw);
if (hit) {
- normal_tri_v3( nor,face[0], face[1], face[2]);
+ normal_tri_v3(nor, face[0], face[1], face[2]);
}
else {
hit= meshdeform_tri_intersect(isec->start, end, face[0], face[2], face[3], co, uvw);
- normal_tri_v3( nor,face[0], face[2], face[3]);
+ normal_tri_v3(nor, face[0], face[2], face[3]);
}
}
else {
hit= meshdeform_tri_intersect(isec->start, end, face[0], face[1], face[2], co, uvw);
- normal_tri_v3( nor,face[0], face[1], face[2]);
+ normal_tri_v3(nor, face[0], face[1], face[2]);
}
if (hit) {
@@ -1281,7 +1281,7 @@ static MDefBoundIsect *meshdeform_ray_tree_intersect(MeshDeformBind *mdb, float
copy_v3_v3(vert[1], cagecos[mface->v2]);
copy_v3_v3(vert[2], cagecos[mface->v3]);
if (mface->v4) copy_v3_v3(vert[3], cagecos[mface->v4]);
- interp_weights_poly_v3( isect->uvw,vert, isect->nvert, isect->co);
+ interp_weights_poly_v3( isect->uvw, vert, isect->nvert, isect->co);
return isect;
}
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index f54cdb330e3..87cf25e99be 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -792,7 +792,7 @@ static void pose_copy_menu(Scene *scene)
if (nr != 5) {
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- if ( (arm->layer & pchan->bone->layer) &&
+ if ((arm->layer & pchan->bone->layer) &&
(pchan->bone->flag & BONE_SELECTED) &&
(pchan != pchanact) )
{
@@ -861,13 +861,13 @@ static void pose_copy_menu(Scene *scene)
float tmp_quat[4];
/* need to convert to quat first (in temp var)... */
- mat4_to_quat( tmp_quat,delta_mat);
- quat_to_axis_angle( pchan->rotAxis, &pchan->rotAngle,tmp_quat);
+ mat4_to_quat(tmp_quat, delta_mat);
+ quat_to_axis_angle(pchan->rotAxis, &pchan->rotAngle, tmp_quat);
}
else if (pchan->rotmode == ROT_MODE_QUAT)
- mat4_to_quat( pchan->quat,delta_mat);
+ mat4_to_quat(pchan->quat, delta_mat);
else
- mat4_to_eulO( pchan->eul, pchan->rotmode,delta_mat);
+ mat4_to_eulO(pchan->eul, pchan->rotmode, delta_mat);
}
break;
case 11: /* Visual Size */
@@ -875,7 +875,7 @@ static void pose_copy_menu(Scene *scene)
float delta_mat[4][4], size[4];
armature_mat_pose_to_bone(pchan, pchanact->pose_mat, delta_mat);
- mat4_to_size( size,delta_mat);
+ mat4_to_size(size, delta_mat);
copy_v3_v3(pchan->size, size);
}
}
@@ -914,7 +914,7 @@ static void pose_copy_menu(Scene *scene)
/* Copy the temo listbase to the selected posebones */
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- if ( (arm->layer & pchan->bone->layer) &&
+ if ((arm->layer & pchan->bone->layer) &&
(pchan->bone->flag & BONE_SELECTED) &&
(pchan!=pchanact) )
{
@@ -1050,9 +1050,9 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
else if (pchan->rotmode > 0) {
/* quat/axis-angle to euler */
if (chan->rotmode == ROT_MODE_AXISANGLE)
- axis_angle_to_eulO( pchan->eul, pchan->rotmode,chan->rotAxis, chan->rotAngle);
+ axis_angle_to_eulO(pchan->eul, pchan->rotmode, chan->rotAxis, chan->rotAngle);
else
- quat_to_eulO( pchan->eul, pchan->rotmode,chan->quat);
+ quat_to_eulO(pchan->eul, pchan->rotmode, chan->quat);
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
/* quat/euler to axis angle */
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index eebdeafcea9..efcbab78884 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -197,7 +197,7 @@ void REEB_freeGraph(ReebGraph *rg)
// free arcs
arc = rg->arcs.first;
- while ( arc ) {
+ while (arc) {
ReebArc *next = arc->next;
REEB_freeArc((BArc*)arc);
arc = next;
@@ -1683,7 +1683,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
int merging = 0;
int total = BLI_ghash_size(arc->faces);
float avg_angle = 0;
- float avg_vec[3] = {0,0,0};
+ float avg_vec[3] = {0, 0, 0};
for (BLI_ghashIterator_init(&ghi, arc->faces);
!BLI_ghashIterator_isDone(&ghi);
@@ -1873,7 +1873,7 @@ static void finalizeGraph(ReebGraph *rg, char passes, char method)
/************************************** WEIGHT SPREADING ***********************************************/
-static int compareVerts( const void* a, const void* b )
+static int compareVerts(const void* a, const void* b)
{
EditVert *va = *(EditVert**)a;
EditVert *vb = *(EditVert**)b;
@@ -2090,7 +2090,7 @@ void mergeArcEdges(ReebGraph *rg, ReebArc *aDst, ReebArc *aSrc, MergeDirection d
e->arc = aDst; // Edge is stolen by new arc
}
- BLI_movelisttolist(&aDst->edges , &aSrc->edges);
+ BLI_movelisttolist(&aDst->edges, &aSrc->edges);
}
else {
for (e = aSrc->edges.first; e; e = e->next) {
@@ -3470,18 +3470,18 @@ void REEB_draw()
glColor3f(0, 1, 0);
glRasterPos3fv(vec);
- BMF_DrawString( G.fonts, text);
+ BMF_DrawString(G.fonts, text);
}
if (G.scene->toolsettings->skgen_options & SKGEN_DISP_INDEX)
{
sprintf(text, " %i", arc->head->index);
glRasterPos3fv(arc->head->p);
- BMF_DrawString( G.fonts, text);
+ BMF_DrawString(G.fonts, text);
sprintf(text, " %i", arc->tail->index);
glRasterPos3fv(arc->tail->p);
- BMF_DrawString( G.fonts, text);
+ BMF_DrawString(G.fonts, text);
}
}
glEnable(GL_DEPTH_TEST);