VRMLExporter bug fix
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
If you use field data to color, VRMLExporter didn't pick up on it.
These few lines seem to fix it for me - I'm not sure how to submit a bug fix:
In VRMLExporter.cxx (Revision 1.68, VTK 4.2), after line 301 (pm->SetScalarMode), add:
if ( pm->GetScalarMode() == VTK_SCALAR_MODE_USE_POINT_FIELD_DATA || pm->GetScalarMode() == VTK_SCALAR_MODE_USE_CELL_FIELD_DATA ) { if ( anActor->GetMapper()->GetArrayAccessMode() == VTK_GET_ARRAY_BY_ID ) { pm->ColorByArrayComponent(anActor->GetMapper()->GetArrayId(), anActor->GetMapper()->GetArrayComponent()); } else { pm->ColorByArrayComponent(anActor->GetMapper()->GetArrayName(), anActor->GetMapper()->GetArrayComponent()); } }
Glad to finally give something back, Chris