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/blenkernel/intern/gpencil_geom.c')
-rw-r--r--source/blender/blenkernel/intern/gpencil_geom.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_geom.c b/source/blender/blenkernel/intern/gpencil_geom.c
index 66a7ae757a2..ff7dde27db8 100644
--- a/source/blender/blenkernel/intern/gpencil_geom.c
+++ b/source/blender/blenkernel/intern/gpencil_geom.c
@@ -189,7 +189,7 @@ BoundBox *BKE_gpencil_boundbox_get(Object *ob)
/* Update orig object's boundbox with re-computed evaluated values. This function can be
* called with the evaluated object and need update the original object bound box data
* to keep both values synchronized. */
- if ((ob_orig != NULL) && (ob != ob_orig)) {
+ if (!ELEM(ob_orig, NULL, ob)) {
if (ob_orig->runtime.bb == NULL) {
ob_orig->runtime.bb = MEM_callocN(sizeof(BoundBox), "GPencil boundbox");
}
@@ -778,7 +778,7 @@ bool BKE_gpencil_stroke_smooth(bGPDstroke *gps, int i, float inf)
/* Only affect endpoints by a fraction of the normal strength,
* to prevent the stroke from shrinking too much
*/
- if ((i == 0) || (i == gps->totpoints - 1)) {
+ if (ELEM(i, 0, gps->totpoints - 1)) {
inf *= 0.1f;
}
@@ -838,7 +838,7 @@ bool BKE_gpencil_stroke_smooth_strength(bGPDstroke *gps, int point_index, float
}
/* Only affect endpoints by a fraction of the normal influence */
float inf = influence;
- if ((point_index == 0) || (point_index == gps->totpoints - 1)) {
+ if (ELEM(point_index, 0, gps->totpoints - 1)) {
inf *= 0.01f;
}
/* Limit max influence to reduce pop effect. */
@@ -902,7 +902,7 @@ bool BKE_gpencil_stroke_smooth_thickness(bGPDstroke *gps, int point_index, float
}
/* Only affect endpoints by a fraction of the normal influence */
float inf = influence;
- if ((point_index == 0) || (point_index == gps->totpoints - 1)) {
+ if (ELEM(point_index, 0, gps->totpoints - 1)) {
inf *= 0.01f;
}
/* Limit max influence to reduce pop effect. */
@@ -1402,7 +1402,7 @@ bool BKE_gpencil_stroke_trim(bGPDstroke *gps)
memcpy(dvert->dw, dvert_src->dw, sizeof(MDeformWeight));
}
}
- if (idx == start || idx == end) {
+ if (ELEM(idx, start, end)) {
copy_v3_v3(&pt_new->x, point);
}
}