Hello,
I'm converting UVs to Vertex Colors and vice versa, and I'm trying to see if there's a faster way of converting a dictionary of Vector3 values to a dictionary of Vector4 values.
The UVs give a value like:
uvPolygon = {'a': c4d.Vector(), 'b': c4d.Vector(), 'c': c4d.Vector(), 'd': c4d.Vector()}
The Vertex Color is very similar but with Vector4D:
colorPolygon = {'a': c4d.Vector4d(), 'b': c4d.Vector4d(), 'c': c4d.Vector4d(), 'd': c4d.Vector4d()}
Despite being so similar, there doesn't seem to be a method to convert the two dictionaries, so I have to iterate through each item and convert it individually.
That means not only do I iterate through all the polygons with python, but I have to do it 4 times as much, one for each polygon point, which is wildly inefficient. Twice to go back and forth.
I was wondering if there's a better, faster way of achieving this.