Simulation Nodes: Implement subframe mixing #107599

Merged
Hans Goudey merged 5 commits from HooglyBoogly/blender:simulation-subframe-mixing into main 2023-05-12 15:59:01 +02:00
1 changed files with 1 additions and 7 deletions
Showing only changes of commit db523f2347 - Show all commits

View File

@ -374,13 +374,7 @@ static bool sharing_info_equal(const ImplicitSharingInfo *a, const ImplicitShari
if (!a || !b) {
return false;
}
if (a != b) {
return false;
}
if (a->version() != b->version()) {
return false;
}
return true;
return a == b;
}
template<typename T>
HooglyBoogly marked this conversation as resolved
Review

This line probably does not make sense. Comparing versions across different sharing info is kinda meaningless, and if it is the same sharing info, the version will be the same. Two check if two attributes are the same, just check if the data pointer is the same.

Using the version makes sense when you want to compare the old state of an attribute with the new state without having keep the old state around if no one uses it anymore. But here you always keep the old and new state around anyway.

This line probably does not make sense. Comparing versions across different sharing info is kinda meaningless, and if it is the same sharing info, the version will be the same. Two check if two attributes are the same, just check if the data pointer is the same. Using the version makes sense when you want to compare the old state of an attribute with the new state without having keep the old state around if no one uses it anymore. But here you always keep the old and new state around anyway.