Fixing crash caused by reading nodes containing vertex colors with multiple meshes. I was accidentally using the total number of vertices when iterating through the colors and not the number of mesh vertices. This worked fine if node has only one mesh, but obviously fails if there are multiple.
This kind of let me to think how it should work if there is a node with vertex colors only on some of the meshes. This implementation does not add vertex colors to any meshes in that case. Because it returns NULL if just one of the meshes does not have vertex colors specified.
Fixing crash caused by reading nodes containing vertex colors with multiple meshes. I was accidentally using the total number of vertices when iterating through the colors and not the number of mesh vertices. This worked fine if node has only one mesh, but obviously fails if there are multiple.
This kind of let me to think how it should work if there is a node with vertex colors only on some of the meshes. This implementation does not add vertex colors to any meshes in that case. Because it returns
NULL
if just one of the meshes does not have vertex colors specified.