Re: [Paraview] XML PLUGIN RELATIVE PATH

2018-05-02 Thread Mathieu Westphal
Hi Miguel

When using the Python Programmble Filter, the current directory is the one
you have run ParaView from.
You can use relative directory to this one, if that helps you, but I would
not recommend it.

There is currently no way to have a relative path to the xml plugin
directory in the default values of a xml property.

I would simply recommend to put the content of "MY_PLUGIN.py" in the xml of
your plugin.

Best,

Mathieu Westphal

On Mon, Apr 30, 2018 at 10:16 AM, Miguel Aguirre 
wrote:

> Hi all,
>
> I am working with Plugins for programmable filters that executes external
> Python scripts. So far, so good.
>
> However, I want to avoid to write the entire path of the Python file on
> the XML file, as you can see highlighted in bold on the XML code down
> below.
>
> Both, the XML and the Python file are in the same folder. Moreover, the
> XML file and the Python file have the same name. So, I wonder if there is a
> way to set up a relative path...do you have any ideas to solve that ?
>
> Thanks in advance !
>
> Miguel Angel AGUIRRE
>
>
>
> 
> 
>  class="vtkPythonProgrammableFilter"
> label=" MY_PLUGIN">
>
> 
>  name="OutputDataSetType"
> command="SetOutputDataSetType"
> number_of_elements="1"
> default_values="0"
> panel_visibility="never">
> 
>
>  name="Script"
> command="SetScript"
> number_of_elements="1"
> default_values="*execfile('C:/Users/m.aguirre./.../.../.../ MY_PLUGIN
> .py')*">
> 
> 
>
> 
> 
> 
>
>
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview
>
>
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


[Paraview] XML PLUGIN RELATIVE PATH

2018-04-30 Thread Miguel Aguirre
Hi all,

I am working with Plugins for programmable filters that executes external
Python scripts. So far, so good.

However, I want to avoid to write the entire path of the Python file on the
XML file, as you can see highlighted in bold on the XML code down below.

Both, the XML and the Python file are in the same folder. Moreover, the XML
file and the Python file have the same name. So, I wonder if there is a way
to set up a relative path...do you have any ideas to solve that ?

Thanks in advance !

Miguel Angel AGUIRRE


















___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview