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>2014-08-29 09:35:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-08-29 09:35:19 +0400
commit8a215669e8668b81610903a80a0c11e1cf64ccac (patch)
tree8f36c005b3d3327c46cea7240feb5a1437020fd4
parent1dddad93c45bb29e001afe21e24ae1f34aaa3e7f (diff)
Cleanup
-rw-r--r--source/blender/blenlib/BLI_dial.h4
-rw-r--r--source/blender/blenlib/intern/BLI_dial.c9
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c4
4 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/blenlib/BLI_dial.h b/source/blender/blenlib/BLI_dial.h
index 61420f43bca..c8b57e803d2 100644
--- a/source/blender/blenlib/BLI_dial.h
+++ b/source/blender/blenlib/BLI_dial.h
@@ -52,8 +52,8 @@
typedef struct Dial Dial;
-Dial * BLI_dial_initialize(float start_position[2], float threshold);
+Dial *BLI_dial_initialize(float start_position[2], float threshold);
float BLI_dial_angle(Dial *dial, float current_position[2]);
-#endif /* __BLI_DIAL_H__ */ \ No newline at end of file
+#endif /* __BLI_DIAL_H__ */
diff --git a/source/blender/blenlib/intern/BLI_dial.c b/source/blender/blenlib/intern/BLI_dial.c
index 943e0b2bf99..cfbb52847fd 100644
--- a/source/blender/blenlib/intern/BLI_dial.c
+++ b/source/blender/blenlib/intern/BLI_dial.c
@@ -46,7 +46,7 @@ struct Dial {
};
-Dial * BLI_dial_initialize(float start_position[2], float threshold)
+Dial *BLI_dial_initialize(float start_position[2], float threshold)
{
Dial *dial = MEM_callocN(sizeof(Dial), "dial");
@@ -79,13 +79,14 @@ float BLI_dial_angle(Dial *dial, float current_position[2])
sinval = cross_v2v2(current_direction, dial->initial_direction);
/* clamp to avoid nans in acos */
- angle = atan2(sinval, cosval);
+ angle = atan2f(sinval, cosval);
/* change of sign, we passed the 180 degree threshold. This means we need to add a turn.
* to distinguish between transition from 0 to -1 and -PI to +PI, use comparison with PI/2 */
- if ((angle * dial->last_angle < 0.0f) && (fabsf(dial->last_angle) > (float)M_PI_2))
+ if ((angle * dial->last_angle < 0.0f) &&
+ (fabsf(dial->last_angle) > (float)M_PI_2))
{
- if (dial->last_angle < 0)
+ if (dial->last_angle < 0.0f)
dial->rotations--;
else
dial->rotations++;
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index f0176bcd04d..0d65a28b802 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1413,12 +1413,12 @@ void paint_proj_mesh_data_ensure(bContext *C, Object *ob, wmOperator *op)
Material *ma = BKE_material_add(CTX_data_main(C), "Material");
/* no material found, just assign to first slot */
assign_material(ob, ma, i, BKE_MAT_ASSIGN_USERPREF);
- proj_paint_add_slot(C, ma, NULL);
+ proj_paint_add_slot(C, ma, NULL);
}
}
}
}
- else if (imapaint->mode == IMAGEPAINT_MODE_IMAGE){
+ else if (imapaint->mode == IMAGEPAINT_MODE_IMAGE) {
if (imapaint->canvas == NULL) {
int width;
int height;
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 3c6fb5dfe20..fbe0a6942e7 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4518,9 +4518,9 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps, int
ps->do_material_slots = (settings->imapaint.mode == IMAGEPAINT_MODE_MATERIAL);
ps->stencil_ima = settings->imapaint.stencil;
ps->canvas_ima = (!ps->do_material_slots) ?
- settings->imapaint.canvas : NULL;
+ settings->imapaint.canvas : NULL;
ps->clone_ima = (!ps->do_material_slots) ?
- settings->imapaint.clone : NULL;
+ settings->imapaint.clone : NULL;
/* setup projection painting data */
ps->do_backfacecull = (settings->imapaint.flag & IMAGEPAINT_PROJECT_BACKFACE) ? 0 : 1;