[Paraview-developers] Rendering in Paraview using python

sumeet kumar sumeet.kumar507 at gmail.com
Fri Apr 14 11:55:29 EDT 2017


Yeah, it works perfectly with paraview-gui. But, does not work when I am
using pvpython or batch option. I have to manually load using  LoadPlugin()
python command .

On Fri, Apr 14, 2017 at 8:15 AM, Andy Bauer <andy.bauer at kitware.com> wrote:

> There are quite a few plugins with ParaView and it's probably a bad idea
> to automatically load them all. Some of them change the GUI, others require
> MPI, etc.
>
> In your plugin.cmake file you can set your plugin to be automatically
> loaded by adding in the AUTOLOAD option. See http://www.paraview.org/Wiki/
> Plugin_HowTo#Adding_plugins_to_ParaView_source.
>
> On Fri, Apr 14, 2017 at 11:08 AM, sumeet kumar <sumeet.kumar507 at gmail.com>
> wrote:
>
>> Hi Andy,
>>
>> LoadPlugin() helps in pvpython. But why does
>> *from  paraview.simple import * *does not work???
>>
>> Why I need to externally load my plugin even I build with paraview
>> source. Also, I don't think, Its a good design to set PV_PLUGIN_PATH  or
>> PV_PLUGIN_CONFIG_FILE even when the plugin is build with source. The file
>> "plugin.cmake" should take care all of this.
>>
>> Thanks
>> Sumeet
>>
>> On Fri, Apr 14, 2017 at 7:01 AM, Andy Bauer <andy.bauer at kitware.com>
>> wrote:
>>
>>> Hi,
>>>
>>> My guess is that the reader plugin is automatically loaded in the GUI
>>> but not when you run pvpython directly. Look at the LoadPlugin() or
>>> LoadDistributedPlugin() command in pvpython.
>>>
>>> Are you setting PV_PLUGIN_PATH or PV_PLUGIN_CONFIG_FILE? Another guess
>>> may be that you're using PV_PLUGIN_PATH and/or PV_PLUGIN_CONFIG_FILE to
>>> load the plugin automatically through the GUI and that isn't being utilized
>>> when running with pvpython. See http://www.paraview.org/Wiki/P
>>> lugin_HowTo for information on that.
>>>
>>> Best,
>>> Andy
>>>
>>> On Thu, Apr 13, 2017 at 11:34 PM, sumeet kumar <
>>> sumeet.kumar507 at gmail.com> wrote:
>>>
>>>> Hey,
>>>>
>>>> I have a reader plugin integrated with paraview that works perfectly
>>>> fine. I could use the same plugin to trace an "equivalent python code" for
>>>> any visualization example.  The generated python code can be run again on
>>>> paraview gui.
>>>> BUT, when i try to follow the same python command in python externally
>>>> like pvpython. I get the following error.
>>>>
>>>> >>> from paraview.simple import *
>>>> updating active connection None
>>>> paraview version 5.2.0-RC1
>>>> updating active connection Connection (builtin:) [1]
>>>> updating active connection Connection (builtin:) [1]
>>>> >>> beam_Axial_Loadh5feioutput = pvESSI(FileName="/home/sumeet/Desktop
>>>> /Beam_Axial_Load.h5.feioutput")
>>>> Traceback (most recent call last):
>>>>   File "<stdin>", line 1, in <module>
>>>> NameError: name 'pvESSI' is not defined
>>>>
>>>> My plugin name is pvESSI. the same line works on paraview GUI mode in
>>>> python shell. I tried to look on the Internet and build the plugin inside
>>>> the paraview source itself, but the problem remains.
>>>>
>>>> Others have suggested here on link http://www.paraview.org/piperm
>>>> ail/paraview/2013-October/029428.html, but I dont understand where to
>>>> make changes to fix this problem.
>>>>
>>>>
>>>> Any help would be highly appreciated.
>>>>
>>>> Best Regards
>>>> Sumeet
>>>> --
>>>>
>>>> Sumeet Kumar Sinha
>>>> Graduate Student
>>>> Phone: (+1)  <%28%2B91%29%209910516219>5306018271 <(530)%20601-8271>
>>>> Website : http://www.sumeetksinha.com/
>>>>
>>>
>>>
>>
>>
>> --
>>
>> Sumeet Kumar Sinha
>> Graduate Student
>> Phone: (+1)  <%28%2B91%29%209910516219>5306018271 <(530)%20601-8271>
>> Website : http://www.sumeetksinha.com/
>>
>
>


-- 

Sumeet Kumar Sinha
Graduate Student
Phone: (+1)  <%28%2B91%29%209910516219>5306018271
Website : http://www.sumeetksinha.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170414/5717c21d/attachment-0001.html>


More information about the Paraview-developers mailing list