Hi @i_mazlov
I'm currently using CopyTagsTo(), to copy the tag from the object to the cache. The problem with the methodology is that if I'm linking to the VertexColorTag externally, that deleting it and creating a new tag would break that link.
That's where I was left at this point:
PolygonObject* myGeometry = PolygonObject::Alloc(polygonCount,pointCount);
//create geometry
VertexColorTag* existingVertexColor = static_cast<VertexColorTag*>(op->GetTag(Tvertexcolor));
if(vertexColorTag == nullptr)
{
existingVertexColor = VertexColorTag::Alloc(pointCount);
op->InsertTag(existingVertexColor);
}
if(pointCount != oldPointCount)
{
VertexColorTag* largerVertexColor = VertexColorTag::Alloc(pointCount);
//fill in color data for the new tag, then copy it to the existing tag
largerVertexColor->CopyTo(existingVertexColor, COPYFLAGS::NONE, nullptr);
}
else
{
//fill in color data for existingVertexColor
}
op->CopyTagsTo(myGeometry, true, true, false, nullptr);
The problem I was encountering here is that CopyTo() doesn't seem to be copying the data from the new correct larger tag to the smaller existing one.
Should CopyTo() work here?
Dan