[vtkusers] VRMLExporter bug fix
Christopher.Moore at noaa.gov
Christopher.Moore at noaa.gov
Wed Mar 17 15:28:07 EST 2004
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
__________________________________________________________________
Christopher Moore email: Christopher.Moore at noaa.gov
Research Scientist, Oceanography tel: 206.526.6779
University of Washington/JISAO/NOAA-PMEL fax: 206.526.6744
------------------------------------------------------------------
More information about the vtkusers
mailing list