Fix T71199: Child-parent relationships arent kept after you make instances real.

Comparison function of the of the parent ghash was not fully correct,
could lead to some false positives in some cases...
This commit is contained in:
Bastien Montagne 2019-11-08 14:27:48 +01:00
parent 6900187092
commit e8cd2269b4
Notes: blender-bot 2023-02-14 00:21:26 +01:00
Referenced by issue #71199, Child-parent relationships arent kept after you make instances real
1 changed files with 5 additions and 1 deletions

View File

@ -1714,7 +1714,11 @@ static bool dupliobject_cmp(const void *a_, const void *b_)
return true;
}
if (ELEM(a->type, b->type, OB_DUPLICOLLECTION)) {
if (a->type != b->type) {
return true;
}
if (a->type == OB_DUPLICOLLECTION) {
for (int i = 1; (i < MAX_DUPLI_RECUR); i++) {
if (a->persistent_id[i] != b->persistent_id[i]) {
return true;