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>2018-07-02 19:48:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-02 19:55:24 +0300
commite35f9f0408a77422f0f7c1593dcabede69820527 (patch)
tree396535726e3aeab9e0d125eaeb5bc3fcd42ac025 /source/blender/editors/sculpt_paint/paint_utils.c
parent12603826eac9bd7399e065987d3c583e2734b0a7 (diff)
parentdbe1b07e058db33a9e806d8e9808463d563d4aa5 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 99b319f422a..697ffc32759 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -87,12 +87,13 @@
/* Convert the object-space axis-aligned bounding box (expressed as
* its minimum and maximum corners) into a screen-space rectangle,
* returns zero if the result is empty */
-bool paint_convert_bb_to_rect(rcti *rect,
- const float bb_min[3],
- const float bb_max[3],
- const ARegion *ar,
- RegionView3D *rv3d,
- Object *ob)
+bool paint_convert_bb_to_rect(
+ rcti *rect,
+ const float bb_min[3],
+ const float bb_max[3],
+ const ARegion *ar,
+ RegionView3D *rv3d,
+ Object *ob)
{
float projection_mat[4][4];
int i, j, k;
@@ -133,10 +134,11 @@ bool paint_convert_bb_to_rect(rcti *rect,
/* Get four planes in object-space that describe the projection of
* screen_rect from screen into object-space (essentially converting a
* 2D screens-space bounding box into four 3D planes) */
-void paint_calc_redraw_planes(float planes[4][4],
- const ARegion *ar,
- Object *ob,
- const rcti *screen_rect)
+void paint_calc_redraw_planes(
+ float planes[4][4],
+ const ARegion *ar,
+ Object *ob,
+ const rcti *screen_rect)
{
BoundBox bb;
rcti rect;
@@ -152,8 +154,9 @@ void paint_calc_redraw_planes(float planes[4][4],
negate_m4(planes);
}
-float paint_calc_object_space_radius(ViewContext *vc, const float center[3],
- float pixel_radius)
+float paint_calc_object_space_radius(
+ ViewContext *vc, const float center[3],
+ float pixel_radius)
{
Object *ob = vc->obact;
float delta[3], scale, loc[3];
@@ -182,7 +185,9 @@ float paint_get_tex_pixel(const MTex *mtex, float u, float v, struct ImagePool *
return intensity;
}
-void paint_get_tex_pixel_col(const MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool, int thread, bool convert_to_linear, struct ColorSpace *colorspace)
+void paint_get_tex_pixel_col(
+ const MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool,
+ int thread, bool convert_to_linear, struct ColorSpace *colorspace)
{
float co[3] = {u, v, 0.0f};
int hasrgb;
@@ -238,9 +243,10 @@ static void imapaint_project(float matrix[4][4], const float co[3], float pco[4]
mul_m4_v4(matrix, pco);
}
-static void imapaint_tri_weights(float matrix[4][4], GLint view[4],
- const float v1[3], const float v2[3], const float v3[3],
- const float co[2], float w[3])
+static void imapaint_tri_weights(
+ float matrix[4][4], GLint view[4],
+ const float v1[3], const float v2[3], const float v3[3],
+ const float co[2], float w[3])
{
float pv1[4], pv2[4], pv3[4], h[3], divw;
float wmat[3][3], invwmat[3][3];