GPv3: Overlay: only show visible and editable materials. #115740

Merged
Falk David merged 15 commits from casey-bianco-davis/blender:GPv3-Overlay-Visible-&-Editable-Materials into main 2023-12-08 10:38:22 +01:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit ecbdd4cce7 - Show all commits

View File

@ -191,7 +191,7 @@ int64_t count_booleans(const VArray<bool> &varray, const IndexMask &mask)
return *static_cast<const bool *>(info.data) ? mask.size() : 0;
}
casey-bianco-davis marked this conversation as resolved
Review

Since this is a generic version, this should be value += (varray[i] ? 1 : 0); or value += int(varray[i])

Since this is a generic version, this should be `value += (varray[i] ? 1 : 0);` or `value += int(varray[i])`
int64_t value = 0;
mask.foreach_index([&](const int64_t init) { value += int64_t(varray[init]); });
mask.foreach_index([&](const int64_t i) { value += int64_t(varray[i]); });
return value;
}