From 129d9f79c9052874d5732a191ea0bb84fafc3906 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 22 Sep 2020 10:33:22 +0200 Subject: [PATCH] Cleanup in style from previous commit. Forgot that arc land also did the pus ot originh. --- .../editors/sculpt_paint/paint_image_proj.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index fbc99e5aa57..613a405d70c 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -5572,36 +5572,31 @@ static bool project_paint_op(void *state, const float lastpos[2], const float po image_pool = BKE_image_pool_new(); if (!ELEM(ps->source, PROJ_SRC_VIEW, PROJ_SRC_VIEW_FILL)) { - /*This means we are reprojecting an image, - make sure the image has the needed data available.*/ + /* This means we are reprojecting an image, make sure the image has the needed data available. + */ bool float_dest = false; bool uchar_dest = false; - /* check if the destination images are float or uchar */ + /* Check if the destination images are float or uchar. */ for (i = 0; i < ps->image_tot; i++) { if (ps->projImages[i].ibuf->rect != NULL) { uchar_dest = true; } - if (ps->projImages[i].ibuf->rect_float) { + if (ps->projImages[i].ibuf->rect_float != NULL) { float_dest = true; } } - /* generate missing data if needed */ - if (float_dest && ps->reproject_ibuf->rect_float == NULL) - { + /* Generate missing data if needed. */ + if (float_dest && ps->reproject_ibuf->rect_float == NULL) { IMB_float_from_rect(ps->reproject_ibuf); ps->reproject_ibuf_free_float = true; } - if (uchar_dest && ps->reproject_ibuf->rect == NULL) - { + if (uchar_dest && ps->reproject_ibuf->rect == NULL) { IMB_rect_from_float(ps->reproject_ibuf); ps->reproject_ibuf_free_uchar = true; } - } - - /* get the threads running */ for (a = 0; a < ps->thread_tot; a++) {