Skip to content
Snippets Groups Projects
Commit 921e2d17 authored by Evgenii Startcev's avatar Evgenii Startcev Committed by Lucas Givord
Browse files

vtkOBJImporter: Fix bug in multi-file processing

Static variable was used to vertices indexing.
It causes incorrect start index for other than first file.

(cherry picked from commit 4321af04)
parent 1dab02f7
No related branches found
No related tags found
No related merge requests found
......@@ -460,6 +460,7 @@ int vtkOBJPolyDataProcessor::RequestData(vtkInformation* vtkNotUsed(request),
float col[3];
int lineNr = 0;
long lastVertexIndex = 0;
while (everything_ok && fgets(rawLine, MAX_LINE, in) != nullptr)
{ /** While OK and there is another line in the file */
lineNr++;
......@@ -495,7 +496,6 @@ int vtkOBJPolyDataProcessor::RequestData(vtkInformation* vtkNotUsed(request),
}
// in the OBJ format the first characters determine how to interpret the line:
static long lastVertexIndex = 0;
if (strcmp(cmd, "v") == 0)
{
// this is a vertex definition, expect three floats (six if vertex color), separated by
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment