Commit a33bf969 authored by Zhuokai Zhao's avatar Zhuokai Zhao

Modified logics in vtkmClip.m.

parent 12169702
......@@ -119,9 +119,10 @@ int vtkmClip::RequestData(vtkInformation *,
// Find the scalar array:
int assoc = this->GetInputArrayAssociation(0, inInfoVec);
vtkDataArray *scalars = this->GetInputArrayToProcess(0, inInfoVec);
if (assoc != vtkDataObject::FIELD_ASSOCIATION_POINTS ||
if (!this->ClipFunction &&
(assoc != vtkDataObject::FIELD_ASSOCIATION_POINTS ||
scalars == nullptr || scalars->GetName() == nullptr ||
scalars->GetName()[0] == '\0')
scalars->GetName()[0] == '\0'))
{
vtkErrorMacro("Invalid scalar array; array missing or not a point array.");
return 0;
......@@ -179,7 +180,7 @@ int vtkmClip::RequestData(vtkInformation *,
return 0;
}
if (this->ComputeScalars)
if (!this->ClipFunction && this->ComputeScalars)
{
output->GetPointData()->SetActiveScalars(scalars->GetName());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment