mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix: LineArt: Fix potential out of range original index after chaining
Due to the existence of intersection and lines from different objects can be chained together, there could be index that's out of range from _current_ object reference from a chain, which is normal and was handled before !148840, that logic was mistakenly lost, now it's fixed. Pull Request: https://projects.blender.org/blender/blender/pulls/149455
This commit is contained in:
parent
0574c4b6f9
commit
a445f6be96
1 changed files with 2 additions and 2 deletions
|
|
@ -5444,7 +5444,7 @@ void MOD_lineart_gpencil_generate_v3(const LineartCache *cache,
|
|||
|
||||
auto transfer_to_matching_groups = [&](const int64_t source_index, const int target_index) {
|
||||
for (const int from_group : src_to_dst_defgroup.index_range()) {
|
||||
if (from_group < 0) {
|
||||
if (from_group < 0 || UNLIKELY(source_index >= src_dvert.size())) {
|
||||
continue;
|
||||
}
|
||||
const MDeformWeight *mdw_from = BKE_defvert_find_index(&src_dvert[source_index],
|
||||
|
|
@ -5459,7 +5459,7 @@ void MOD_lineart_gpencil_generate_v3(const LineartCache *cache,
|
|||
auto transfer_to_singular_group = [&](const int64_t source_index, const int target_index) {
|
||||
float highest_weight = 0.0f;
|
||||
for (const int from_group : src_to_dst_defgroup.index_range()) {
|
||||
if (from_group < 0) {
|
||||
if (from_group < 0 || UNLIKELY(source_index >= src_dvert.size())) {
|
||||
continue;
|
||||
}
|
||||
const MDeformWeight *mdw_from = BKE_defvert_find_index(&src_dvert[source_index],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue