|
Hi, I have some problems with getting normal data when modifiers pipeline contains “Edit Normals” modifier.
I am using such code to apply all modifiers and get normal data:
// apply all modifiers
ObjectState os = node->EvalWorldState(getTimeOfExporting())
Object* object = os.obj;
...
//Build normals if needed if (!mesh.normalsBuilt) {
mesh.checkNormals(true)
}
...
//Find all normals int numVertex = mesh.getNumVerts() for (int i = 0; i < numVertex; ++i) {
RVertex& rv = mesh.getRVert(i)
if (rv.ern) {
for (unsigned int n = 0; n < (rv.rFlags & NORCT_MASK) ++n) {
// Add vertex in list
normals.push_back(rv.ern[n].getNormal())
}
} else {
normals.push_back( rv.rn.getNormal())
}
}
The problem is that normals obtained this way are not modified by “Edit Normals” modifier. However, rest of the modifiers works correctly. What am I doing wrong?
|
|
|