Hi! I'm looking for quick way to copy all points, edges and polygons data from one poly object to another with Python tag.
Right now i'm using this loops:
for i in range(0, pointCount):
targetObj.SetPoint(i, sourceObj.GetPoint(i))
for i in range(0, polygonCount):
poly = sourceObj.GetPolygon(i)
if poly.IsTriangle():
targetObj.SetPolygon(i, c4d.CPolygon(poly.a, poly.b, poly.c))
else:
targetObj.SetPolygon(i, c4d.CPolygon(poly.a, poly.b, poly.c, poly.d))
It's missing hidden edges for Ngons feature but already really slow on 10k+ polygons. Is there way to do it faster?
I'm looking into Edit->Copy & Edit->Paste commands but its really hacky way since its tag, not a single execution script.
Also C4DAtom.CopyTo() looks promising but I have no idea what flag I should pass to copy only mesh, not every object property