Sync changes from upstream repository

Co-authored-by: Andrew Le Bihan <andy@mcneel.com>
Co-authored-by: Dale Fugier <dale@mcneel.com>
Co-authored-by: Dale Lear <dalelear@mcneel.com>
Co-authored-by: David Eränen <deranen@gmail.com>
Co-authored-by: Greg Arden <greg@mcneel.com>
Co-authored-by: Jussi Aaltonen <jussi@mcneel.com>
Co-authored-by: Lowell <lowell@mcneel.com>
Co-authored-by: Mikko Oksanen <mikko@mcneel.com>
Co-authored-by: Pierre Cuvilliers <pierre@mcneel.com>
Co-authored-by: Steve Baer <steve@mcneel.com>
Co-authored-by: chuck <chuck@mcneel.com>
Co-authored-by: piac <giulio@mcneel.com>
Co-authored-by: wfcook <wfcook@mcneel.com>
This commit is contained in:
Bozo The Builder
2021-10-14 07:57:14 -07:00
parent 2b96cf3142
commit 95dde7ec84
50 changed files with 21418 additions and 882 deletions

View File

@@ -2921,6 +2921,22 @@ void ON_HistoryRecord::RemapObjectIds( const ON_SimpleArray<ON_UuidPair>& id_rem
objrev_v->m_value[j].RemapObjectId(id_remap);
}
}
// 24 May 2021, Mikko, RH-56171:
// Some commands like Offset use an UUID list to map inputs and outputs.
// Similar to remapping the objref ids, the uuid lists also need to be
// updated to use new ids.
// Other commands that currently use UUID lists are Divide, Slab, Ribbon,
// FilletSrf, ChamferSrf, ArrayCrv, Hatch.
else if (v && ON_Value::uuid_value == v->m_value_type)
{
ON_UuidValue* uuid_v = static_cast<ON_UuidValue*>(v);
for (j = 0; j < uuid_v->m_value.Count(); j++)
{
int index = id_remap.BinarySearch((const ON_UuidPair*)&uuid_v->m_value[j], ON_UuidPair::CompareFirstUuid);
if (index >= 0)
uuid_v->m_value[j] = id_remap[index].m_uuid[1];
}
}
}
}
}