diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-02-10 18:59:57 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-02-10 18:59:57 +0300 |
commit | a7ae33202fa94a52235fbe595873d81e482d5f58 (patch) | |
tree | c075afc26803edd25de9021d3190d2d9613f741d /source/blender/blenkernel/intern/subdiv_foreach.c | |
parent | a5cddaefd344a4ab8c1d5d1be39edf6e6dc456e0 (diff) | |
parent | ad77b52abcbd0daf0d1a3ad395983cb90beeb72a (diff) |
Merge branch 'master' into greasepencil-objectgreasepencil-object
Conflicts:
release/scripts/startup/bl_ui/space_userpref.py
source/blender/blenkernel/BKE_gpencil.h
source/blender/blenkernel/BKE_gpencil_update_cache.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/gpencil.c
source/blender/blenkernel/intern/gpencil_update_cache.c
source/blender/blenlib/BLI_listbase.h
source/blender/blenlib/intern/DLRB_tree.c
source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_gpencil.cc
source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_gpencil.h
source/blender/makesdna/DNA_gpencil_types.h
source/blender/makesrna/intern/rna_gpencil.c
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_foreach.c')
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_foreach.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_foreach.c b/source/blender/blenkernel/intern/subdiv_foreach.c index 69bead27fe6..b510a9b3bba 100644 --- a/source/blender/blenkernel/intern/subdiv_foreach.c +++ b/source/blender/blenkernel/intern/subdiv_foreach.c @@ -734,7 +734,7 @@ static int subdiv_foreach_edges_row(SubdivForeachTaskContext *ctx, const int v1 = vertex_index; const int v2 = vertex_index + 1; ctx->foreach_context->edge( - ctx->foreach_context, tls, coarse_edge_index, subdiv_edge_index, v1, v2); + ctx->foreach_context, tls, coarse_edge_index, subdiv_edge_index, false, v1, v2); vertex_index += 1; } return subdiv_edge_index; @@ -762,7 +762,7 @@ static int subdiv_foreach_edges_column(SubdivForeachTaskContext *ctx, const int v1 = vertex_index; const int v2 = vertex_index + num_edges_per_row; ctx->foreach_context->edge( - ctx->foreach_context, tls, coarse_edge_index, subdiv_edge_index, v1, v2); + ctx->foreach_context, tls, coarse_edge_index, subdiv_edge_index, false, v1, v2); vertex_index += 1; } return subdiv_edge_index; @@ -862,7 +862,7 @@ static void subdiv_foreach_edges_all_patches_regular(SubdivForeachTaskContext *c const int v1 = (flip) ? (start_edge_vertex + (resolution - i - 3)) : (start_edge_vertex + i); const int v2 = side_start_index + side_stride * i; ctx->foreach_context->edge( - ctx->foreach_context, tls, ORIGINDEX_NONE, subdiv_edge_index, v1, v2); + ctx->foreach_context, tls, ORIGINDEX_NONE, subdiv_edge_index, false, v1, v2); } } } @@ -926,7 +926,7 @@ static void subdiv_foreach_edges_all_patches_special(SubdivForeachTaskContext *c const int v1 = current_patch_vertex_index; const int v2 = next_path_vertex_index; ctx->foreach_context->edge( - ctx->foreach_context, tls, ORIGINDEX_NONE, subdiv_edge_index, v1, v2); + ctx->foreach_context, tls, ORIGINDEX_NONE, subdiv_edge_index, false, v1, v2); current_patch_vertex_index += ptex_face_inner_resolution + 1; next_path_vertex_index += 1; } @@ -940,7 +940,7 @@ static void subdiv_foreach_edges_all_patches_special(SubdivForeachTaskContext *c const int v1 = center_vertex_index; const int v2 = current_patch_end_vertex_index; ctx->foreach_context->edge( - ctx->foreach_context, tls, ORIGINDEX_NONE, subdiv_edge_index, v1, v2); + ctx->foreach_context, tls, ORIGINDEX_NONE, subdiv_edge_index, false, v1, v2); } } /* Connect inner path of patch to boundary. */ @@ -964,7 +964,7 @@ static void subdiv_foreach_edges_all_patches_special(SubdivForeachTaskContext *c (start_edge_vertex + i); const int v2 = side_start_index + i; ctx->foreach_context->edge( - ctx->foreach_context, tls, ORIGINDEX_NONE, subdiv_edge_index, v1, v2); + ctx->foreach_context, tls, ORIGINDEX_NONE, subdiv_edge_index, false, v1, v2); } } if (ptex_face_resolution >= 3) { @@ -978,7 +978,7 @@ static void subdiv_foreach_edges_all_patches_special(SubdivForeachTaskContext *c (start_edge_vertex + i); const int v2 = side_start_index + (ptex_face_inner_resolution + 1) * i; ctx->foreach_context->edge( - ctx->foreach_context, tls, ORIGINDEX_NONE, subdiv_edge_index, v1, v2); + ctx->foreach_context, tls, ORIGINDEX_NONE, subdiv_edge_index, false, v1, v2); } } prev_coarse_loop = coarse_loop; @@ -1015,6 +1015,8 @@ static void subdiv_foreach_boundary_edges(SubdivForeachTaskContext *ctx, const int resolution = ctx->settings->resolution; const int num_subdiv_vertices_per_coarse_edge = resolution - 2; const int num_subdiv_edges_per_coarse_edge = resolution - 1; + const bool is_loose = !BLI_BITMAP_TEST_BOOL(ctx->coarse_edges_used_map, coarse_edge_index); + int subdiv_edge_index = ctx->edge_boundary_offset + coarse_edge_index * num_subdiv_edges_per_coarse_edge; int last_vertex_index = ctx->vertices_corner_offset + coarse_edge->v1; @@ -1023,13 +1025,13 @@ static void subdiv_foreach_boundary_edges(SubdivForeachTaskContext *ctx, const int v2 = ctx->vertices_edge_offset + coarse_edge_index * num_subdiv_vertices_per_coarse_edge + i; ctx->foreach_context->edge( - ctx->foreach_context, tls, coarse_edge_index, subdiv_edge_index, v1, v2); + ctx->foreach_context, tls, coarse_edge_index, subdiv_edge_index, is_loose, v1, v2); last_vertex_index = v2; } const int v1 = last_vertex_index; const int v2 = ctx->vertices_corner_offset + coarse_edge->v2; ctx->foreach_context->edge( - ctx->foreach_context, tls, coarse_edge_index, subdiv_edge_index, v1, v2); + ctx->foreach_context, tls, coarse_edge_index, subdiv_edge_index, is_loose, v1, v2); } /** \} */ |