View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0004272 | ParaView | (No Category) | public | 2007-01-03 10:25 | 2007-02-27 14:00 | ||||
Reporter | David Karelitz | ||||||||
Assigned To | Dave DeMarle | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0004272: PythonScript filter does not work with Load State | ||||||||
Description | If you try to Load State when there is a PythonScript Filter present, the XML parser complains. The relevant XML is below and the error occurs after 'data=pdi.GetPointData().GetArray("Temp") '. It appears that the quotes in the python script are not escaped so they interact with the quotes in the XML. <Proxy group="filters" type="PythonScript" id="159"> <Property name="Input" id="159.Input" number_of_elements="1"> <Proxy value="250"/> <Domain name="groups" id="159.Input.groups"> <Group value="sources"/> <Group value="filters"/> </Domain> <Domain name="input_type" id="159.Input.input_type"> <DataType value="vtkDataSet"/> </Domain> </Property> <Property name="OutputDataSetType" id="159.OutputDataSetType" number_of_elements="1"> <Element index="0" value="0"/> <Domain name="enum" id="159.OutputDataSetType.enum"> <Entry value="8" text="Same as Input"/> <Entry value="0" text="vtkPolyData"/> <Entry value="2" text="vtkStructuredGrid"/> <Entry value="3" text="vtkRectilinearGrid"/> <Entry value="4" text="vtkUnstructuredGrid"/> <Entry value="6" text="vtkImageData"/> </Domain> </Property> <Property name="Script" id="159.Script" number_of_elements="1"> <Element index="0" value="import sys pdi = self.GetUnstructuredGridInput() pdo = self.GetPolyDataOutput() newPts = paraview.vtkPoints() numPts = pdi.GetNumberOfPoints() data=pdi.GetPointData().GetArray("Temp") outData=paraview.vtkDoubleArray() outData.SetName("Output") for i in range(0, numPts): coord = pdi.GetPoint(i) x,y,z = coord[:3] x = x * 2 y = y * 0.5 z = 1 newPts.InsertPoint(i, x,y,z) coorddata=data.GetValue(i) outData.InsertNextValue(coorddata*100) pdo.SetPoints(newPts) pdo.GetPointData().AddArray(outData) pdo.GetPointData().AddArray(data)"/> </Property> </Proxy> | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Topic Name | |||||||||
Type | |||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0006403) user521 2007-02-12 10:31 |
I committed fix to vtkPVXMLElement and vtkSMStringVectorProperty to escape encode and decode '\n', '&', ''', '"', '>', and '<'. This makes the pyfilter's script savable and loadable. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-06-16 13:10 | Zack Galbreath | Category | => (No Category) |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |