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:
authorPablo Dobarro <pablodp606@gmail.com>2020-02-08 22:04:42 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-02-11 19:02:29 +0300
commit64e65442a1857033a9f139893eaff56b53cbd667 (patch)
tree656b0d0420622b6b2690e36840d432c21b67acbb /source/blender/editors/sculpt_paint/paint_hide.c
parent395e91b87cf73a9f4d6490f4eb1e462c2a02b71b (diff)
Cleanup: Sculpt/Paint, use correct types and iterator variable declaration
Reviewed By: brecht Differential Revision: https://developer.blender.org/D6788
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_hide.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_hide.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c
index 624200734e8..aed9e47b972 100644
--- a/source/blender/editors/sculpt_paint/paint_hide.c
+++ b/source/blender/editors/sculpt_paint/paint_hide.c
@@ -68,7 +68,7 @@ static bool is_effected(PartialVisArea area,
const float mask)
{
if (area == PARTIALVIS_ALL) {
- return 1;
+ return true;
}
else if (area == PARTIALVIS_MASKED) {
return mask > 0.5f;
@@ -137,7 +137,7 @@ static void partialvis_update_grids(Depsgraph *depsgraph,
{
CCGElem **grids;
BLI_bitmap **grid_hidden;
- int *grid_indices, totgrid, i;
+ int *grid_indices, totgrid;
bool any_changed = false, any_visible = false;
/* Get PBVH data. */
@@ -147,9 +147,9 @@ static void partialvis_update_grids(Depsgraph *depsgraph,
sculpt_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN);
- for (i = 0; i < totgrid; i++) {
+ for (int i = 0; i < totgrid; i++) {
int any_hidden = 0;
- int g = grid_indices[i], x, y;
+ int g = grid_indices[i];
BLI_bitmap *gh = grid_hidden[g];
if (!gh) {
@@ -172,8 +172,8 @@ static void partialvis_update_grids(Depsgraph *depsgraph,
continue;
}
- for (y = 0; y < key.grid_size; y++) {
- for (x = 0; x < key.grid_size; x++) {
+ for (int y = 0; y < key.grid_size; y++) {
+ for (int x = 0; x < key.grid_size; x++) {
CCGElem *elem = CCG_grid_elem(&key, grids[g], x, y);
const float *co = CCG_elem_co(&key, elem);
float mask = key.has_mask ? *CCG_elem_mask(&key, elem) : 0.0f;
@@ -349,7 +349,7 @@ static int hide_show_exec(bContext *C, wmOperator *op)
PBVHType pbvh_type;
float clip_planes[4][4];
rcti rect;
- int totnode, i;
+ int totnode;
/* Read operator properties. */
action = RNA_enum_get(op->ptr, "action");
@@ -376,7 +376,7 @@ static int hide_show_exec(bContext *C, wmOperator *op)
break;
}
- for (i = 0; i < totnode; i++) {
+ for (int i = 0; i < totnode; i++) {
switch (pbvh_type) {
case PBVH_FACES:
partialvis_update_mesh(ob, pbvh, nodes[i], action, area, clip_planes);