[Paraview] [EXT] Re: Stupid question on Programmable Source
Dennis Conklin
dennis_conklin at goodyear.com
Fri Oct 23 14:27:03 EDT 2015
Utkarsh,
I got it working by making a list of pointers to vtk.vtkFloatArray
Attached is the version which gives me all 97 Element variables.
My other questions are:
1. I really want this as a reader, that everyone can use. Is there some way to have the user enter a filename which is more elegant than having them edit the script? For instance, can the server-side xml plugin stuff be edited slightly to work with a Programmable source, so I could put in a text box for them to type the filename. Even better would be a popup file browser, but I dream!
2. I assume without compiling here that I cannot actually get this as a reader, correct?
Thanks for your interest.
Dennis
-----Original Message-----
From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
Sent: Friday, October 23, 2015 1:35 PM
To: Dennis Conklin <dennis_conklin at goodyear.com>
Cc: Paraview (paraview at paraview.org) <paraview at paraview.org>
Subject: Re: [EXT] Re: [Paraview] Stupid question on Programmable Source
Dennis,
> In my routine if I:
> 1. Do not declare any output (just accept the predefined output, which is set to vtkUnstructuredGrd). Then your print statements work but my program kills Paraview with a segmentation fault
I always change the output type using the Output Type property on the Properties panel for the Programmable source. Then the "output" is indeed the type I expect it to be.
> 2. If I declare an output with:
> output=self.GetUnstructuredGridOutput()
> Then my program succeeds and I get my mesh (just not many cell variables yet as I haven't figured out how to do that 97 times efficiently). If I turn on your print statements it complains that there is no CellData available.
You don't need do this at all, I am sure this working only when the "Output Type" is set properly on the Properties panel. Just use the output variable provided to you in the Programamble Filters environment (similar to inputs, self, etc). In otherwords, if your script, just remove the output = self.... line :).
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ringle_read.txt
URL: <http://public.kitware.com/pipermail/paraview/attachments/20151023/0a7743a3/attachment.txt>
More information about the ParaView
mailing list