Re: [Paraview] location of python plugin macro

2010-06-10 Thread pat marion
Hi Matt, this patch should do it-

--- a/Qt/Python/pqPythonDialog.cxx
+++ b/Qt/Python/pqPythonDialog.cxx
@@ -163,8 +163,8 @@ void pqPythonDialog::runScript(const QStringList files)
 QFile file(files[i]);
 if(file.open(QIODevice::ReadOnly))
   {
-  this-Implementation-Ui.shellWidget-executeScript(
-file.readAll().data());
+  this-runString(QString(__file__ = \%1\).arg(files[i]));
+  this-runString(file.readAll().data());
   }
 else
   {


Due to the extra call to runString(), the paraview python shell will display
a new prompt twice.  I'd like to fix that before committing it to paraview.


Pat

On Wed, Jun 9, 2010 at 10:55 PM, m.c.wilk...@massey.ac.nz wrote:


 Hi Pat,

 Thank you for your quick response.

 Yes setting the __file__ variable would be great.

 Is there a formal way to do a feature request?  From googling, I see
 people have just posted requests to this list.  Is that good enough?
 If so, could we please have this has a feature request?

 If it is worth your time, perhaps you could point me to were I should
 start looking and perhaps I might be able to figure out how to
 implement the feature myself.

 Thank you

 Matt Wilkins

 On Wed, Jun 09, 2010 at 10:46:23PM -0400, pat marion wrote:
  I'm afraid there isn't a way to get the name of the python file that is
  currently executing.  Paraview reads the contents for the file into a
 string
  and passes the string to the interpreter, so python has no association
 between
  the string and the file.  As a feature request, I think it would be
 reasonable
  to have paraview set the __file__ variable to be the name of the file
 before
  executing it.
 
  Pat
 
  On Wed, Jun 9, 2010 at 5:15 PM, m.c.wilk...@massey.ac.nz wrote:
 
 
  Hi,
 
  I would like to find the location of the currently running python
  plugin macro.  This is so I can do an import of a library that lives
  in a directory relative to the directory where all my paraview
 plugins
  live.  Is this possible?
 
  In a normal python programme sys.argv[0] can help me, but ofcourse
  that just points to the paraview binary in this case.  os.getcwd() is
  no use.  The info is known to paraview (for instance it is in
  ~/.config/ParaView/ParaView3.8.0.ini file under the [PythonMacros]
  section - but I really don't want to go trolling through that file).
 
  I have quite a few plugins, and I want to do the correct thing by
  breaking some of the shared functionality out into a module.
 
  Thanks for any help
 
  Matt
 
  ___
  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
 
  Follow this link to subscribe/unsubscribe:
  http://www.paraview.org/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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Programmable Source MultiBlockDataSet

2010-06-10 Thread Jérôme Plumecoq

Hello,

I also would like to make a ProgrammableSource with a 
vtkMultiBlockDataSet as output type (*). It seems that the correction 
indicated below doesn't appear in the version 3.8.0 of ParaView.


do you know in which version this change will be integrate ?

does a patch exist ?

thanks.

Jérôme

(*) in fact, if I put the OutputDataSetType to 13, it takes 0 (the value 
default : vtkPolyData), but it seems to work...




Le 23/04/2010 19:04, Aurélien Marsan a écrit :


2010/4/23 Aurélien Marsan aur.mar...@gmail.com
mailto:aur.mar...@gmail.com:
  thanks !
  And so, could you add Temporal Data Set to this commit ?
  Le 23 avril 2010 16:28, Utkarsh Ayachit
utkarsh.ayac...@kitware.com mailto:utkarsh.ayac...@kitware.com a
  écrit :
 
  I've just committed a change to ParaView to allow setting
output type
  to be a multiblock dataset.
 
  Commit id: c7472789ba86210e190f398a90eebc081a66d40c
 
  Utkarsh
 
  2010/4/23 Aurélien Marsan aur.mar...@gmail.com
mailto:aur.mar...@gmail.com:
   I found a solution to do what I wanted to do. Not really
elegant, but it
   works.
   The best would be to encode the reader in the source
code but I
   don't
   know how to do, and have no time for now.
  
   First, I use the tool Source - Data Object Generator, and
create a
   MultiBlockDataSet.
  
   MB{}
  
  
   Then, I use a Programmable Filter, and set the Output Data
Type Same as
   Input.
   So I can use this script.
  
  
   from Moduleperso import *
   m = MultiBlocFromV3D()   # This is a
personnal reader in
   python, that returns a vtkMultiBlockDataSet
   self.GetOutputDataObject(0).DeepCopy(m)
  
  
   Hope this will help some people who don't want to go in
source code...
  
   Le 23 avril 2010 14:07, Aurélien Marsan
aur.mar...@gmail.com mailto:aur.mar...@gmail.com a écrit :
  
   Maybe I have found a way to avoid the Programmable Source...
  
   But Is it possible to export an object created in the
python shell
   directly into the pipeline of the paraview interface ?
  
   Le 22 avril 2010 15:36, Aurélien Marsan
aur.mar...@gmail.com mailto:aur.mar...@gmail.com a écrit
   :
  
   Hi,
  
   A new thing I don't know how to do with Paraview.
   I have written a personnal reader, that creates
vtkStructuredGrid from
   files written in so called format v3d. So I'm able to
construct a
   MutliBlockDataSet, that is composed of all the Blocks
I'm working
   with.
  
   I would like to use Programmable Source, so we don't
need to write
   the
   file on the disk before to open it with Paraview.
   Does Programmable Source work with MultiBlockDataSet ?
I don't see
   this
   class in the Output Data Set Type that we can choose...
  
   And is it correct if I write in the Script of the
Programmable Filter
   :
  
   from perso import *
   multiblock = MultiBlockDataSetFromV3D(.)
   self.GetOutput().DeepCopy(multiblock)
  
   Thanks for help.
  
   A.MARSAN
  
  
   ___
   Powered by www.kitware.com http://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
  
   Follow this link to subscribe/unsubscribe:
   http://www.paraview.org/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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


attachment: jerome_plumecoq.vcf___
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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Programmable Source MultiBlockDataSet

2010-06-10 Thread Utkarsh Ayachit
Attached is the patch.

It will be included in 3.8.1 release.

Utkarsh



2010/6/10 Jérôme Plumecoq jerome.plume...@c-s.fr:
 Hello,

 I also would like to make a ProgrammableSource with a vtkMultiBlockDataSet
 as output type (*). It seems that the correction indicated below doesn't
 appear in the version 3.8.0 of ParaView.

 do you know in which version this change will be integrate ?

 does a patch exist ?

 thanks.

 Jérôme


patch
Description: Binary data
___
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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] The DISTDIR variable is expanded twice when installing PointSpriteDemo

2010-06-10 Thread Utkarsh Ayachit
Thanks for reporting this. It has been fixed on master and will be
included in 3.8.1 release.

http://paraview.org/Bug/view.php?id=10815

Utkarsh



On Thu, Jun 3, 2010 at 2:53 AM, François Bissey f.r.bis...@massey.ac.nz wrote:
 Hi again,

 I have the following in my log while preparing the gentoo package
 for paraview:
 -- Installing: /media/anthill/portage/sci-
 visualization/paraview-3.8.0/image/usr/lib/paraview-3.8/libPointSprite_Graphics.so
 -- Installing: /media/anthill/portage/sci-
 visualization/paraview-3.8.0/image/media/anthill/portage/sci-
 visualization/paraview-3.8.0/work/ParaView-3.8.0_build/Plugins/PointSprite/PointSpriteDemo
 -- Installing: /media/anthill/portage/sci-
 visualization/paraview-3.8.0/image/usr/lib/paraview-3.8/libPointSprite_Plugin.so

 PointSpriteDemo is the only one with that behaviour out of the stuff I checked
 so far.
 Also, it is an example and I have turned examples off (BUILD_EXAMPLES OFF) but
 this particular one is always on, from Plugins/PointSprite/CMakeList.txt:

 set(PointSpritePlugin_BUILD_EXAMPLES ON CACHE BOOL Build the example.)
 if(PointSpritePlugin_BUILD_EXAMPLES)
    add_subdirectory(Examples)
 endif(PointSpritePlugin_BUILD_EXAMPLES)

 This is not consistent, if I turn off examples at the top level I expect them
 to be all off.

 Francois
 ___
 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

 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Programmable Source MultiBlockDataSet

2010-06-10 Thread Aurélien Marsan
great !
But I never used patches. How do we apply it ?


2010/6/10 Utkarsh Ayachit utkarsh.ayac...@kitware.com

 Attached is the patch.

 It will be included in 3.8.1 release.

 Utkarsh



 2010/6/10 Jérôme Plumecoq jerome.plume...@c-s.fr:
  Hello,
 
  I also would like to make a ProgrammableSource with a
 vtkMultiBlockDataSet
  as output type (*). It seems that the correction indicated below doesn't
  appear in the version 3.8.0 of ParaView.
 
  do you know in which version this change will be integrate ?
 
  does a patch exist ?
 
  thanks.
 
  Jérôme

 ___
 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

 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/mailman/listinfo/paraview




-- 
Aurélien MARSAN
Doctorant Cifre Turbomeca/LMFA
aurelien.mar...@ecl2009.ec-lyon.fr
06.31.98.26.73
___
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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Programmable Source MultiBlockDataSet

2010-06-10 Thread Aurélien Marsan
I found it.
In the source, before compiling. ...

Le 10 juin 2010 18:03, Aurélien Marsan
aurelien.mar...@ecl2009.ec-lyon.fra écrit :

 great !
 But I never used patches. How do we apply it ?


 2010/6/10 Utkarsh Ayachit utkarsh.ayac...@kitware.com

 Attached is the patch.

 It will be included in 3.8.1 release.

 Utkarsh



 2010/6/10 Jérôme Plumecoq jerome.plume...@c-s.fr:
  Hello,
 
  I also would like to make a ProgrammableSource with a
 vtkMultiBlockDataSet
  as output type (*). It seems that the correction indicated below doesn't
  appear in the version 3.8.0 of ParaView.
 
  do you know in which version this change will be integrate ?
 
  does a patch exist ?
 
  thanks.
 
  Jérôme

 ___
 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

 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/mailman/listinfo/paraview




 --
 Aurélien MARSAN
 Doctorant Cifre Turbomeca/LMFA
 aurelien.mar...@ecl2009.ec-lyon.fr
 06.31.98.26.73




-- 
Aurélien MARSAN
Doctorant Cifre Turbomeca/LMFA
aurelien.mar...@ecl2009.ec-lyon.fr
06.31.98.26.73
___
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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Fail to build pqApplicationComponents in ParaView3.8.0 on Windows764bit MSVC2010

2010-06-10 Thread Dr. X

Hi Robert,
I just explicitly did what you suggested: running CMake as 
administrator. It does not help. I was logging in with an administrator 
level account when I was running CMake.
Any other suggestions? It seems pqApplicationComponents project misses a 
couple of .ui files, i.e. pyLinksManager.ui, pqPliginDialog.ui, and 
pqMultiViewFrameMenu.ui. I added them to the project's resource folder. 
That does not have any effect.


Best,
x

On 6/10/2010 10:45 AM, Robert Maynard wrote:
Are you still getting the Qt errors after rebuilding ParaView in a 
clean directory with CMake set to run as administrator?


If so can you please email me the CMakeCache.txt for the build.

On Thu, Jun 10, 2010 at 8:54 AM, Dr. X xun...@renci.org 
mailto:xun...@renci.org wrote:


Hi Rob,
Any luck with pqComponent? Thanks a lot.

Best,
x

On 6/8/2010 3:25 PM, Robert Maynard wrote:

Hi,

I am currently tracking down the problem with why ParaView is not
building correctly for you. But I need some information that is
not in the CMakeCache.txt

Mainly:

* Are you running CMake as an Administrator or Standard User
* What Version of Visual Studio are you using ( Express /
  Premium / Ultimate / Pro )

On Tue, Jun 8, 2010 at 2:15 PM, Dr. X xun...@renci.org
mailto:xun...@renci.org wrote:

Hi Robert,
Here you go. Thanks a lot.

Best,
x


On 6/8/2010 1:22 PM, Robert Maynard wrote:

Would you be able to provide the CMakeCache.txt from the
build folder?

On Tue, Jun 8, 2010 at 11:48 AM, Dr. X xun...@renci.org
mailto:xun...@renci.org wrote:

Hi All,
I have following errors on project
pqApplicationComponents.

Error21error C1083: Cannot open include file:
'ui_pqLinksManager.h': No such file or directory  
 D:\ParaView\Qt\Components\pqLinksManager.h38  
 pqApplicationComponents

Error30error C1083: Cannot open include file:
'ui_pqMultiViewFrameMenu.h': No such file or directory  
 D:\ParaView\Qt\Components\pqMultiViewFrame.h38  
 pqApplicationComponents

Error29error C1083: Cannot open include file:
'ui_pqPluginDialog.h': No such file or directory  
 D:\ParaView\Qt\Components\pqPluginDialog.h39  
 pqApplicationComponents

Error8error C3861: 'mkdir': identifier not found
 
 D:\ParaView\Applications\AdaptiveParaView\ppRawStridedReader2.cxx

   113ppRawStridedReader2

It seems like the Qt .ui files are not added into the
project. Could you please help?
Thanks a lot.

Best,
x
___
Powered by www.kitware.com http://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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview




-- 
Robert Maynard





-- 
Robert Maynard





--
Robert Maynard


___
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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] Fwd: Parallel Projection and zoom

2010-06-10 Thread bastil2...@yahoo.de
Dear all,

I am very happy that 3.8.0 now has the option to save/load view. Very
helpful. However when using parallel projection the parameter to control
zooming is:

* Not shown in the Adjust Camera GUI
* Not saved with the views

The only way I have so far is to query it from Python:


view=GetRenderView()


view.CameraParallelScale

2.7270467698171603

However this is not so straight-forward. I also done't know how to
modify it from within python. I can do
view.CameraParallelScale=1 and the value is changed but the view is not

Regards Bastian

___
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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Fwd: Parallel Projection and zoom

2010-06-10 Thread pat marion
 I can do view.CameraParallelScale=1 and the value is changed but the view
is not

Is it possible you just need to call Render() to update the view?  It works
for me from python, if I enable parallel projection and adjust the scale-

view.CameraParallelProjection = 1
view.CameraParallelScale = 1.0
Render()

Pat

On Thu, Jun 10, 2010 at 2:46 PM, bastil2...@yahoo.de bastil2...@yahoo.dewrote:

  Dear all,

 I am very happy that 3.8.0 now has the option to save/load view. Very
 helpful. However when using parallel projection the parameter to control
 zooming is:

- Not shown in the Adjust Camera GUI
- Not saved with the views

 The only way I have so far is to query it from Python:

   
 view=GetRenderView()

 
 view.CameraParallelScale

 2.7270467698171603

   However this is not so straight-forward. I also done't know how to
 modify it from within python. I can do
 view.CameraParallelScale=1 and the value is changed but the view is not

 Regards Bastian


 ___
 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

 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] The DISTDIR variable is expanded twice when installing PointSpriteDemo

2010-06-10 Thread François Bissey
 Thanks for reporting this. It has been fixed on master and will be
 included in 3.8.1 release.
 
 http://paraview.org/Bug/view.php?id=10815
 
What about the double expansion of DESTDIR? The bug only mention respecting
BUILD_EXAMPLES.

Francois
___
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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] location of python plugin macro

2010-06-10 Thread m . c . wilkins

Hi Pat,

Very cool, thank you very much.

Matt

On Thu, Jun 10, 2010 at 09:31:23AM -0400, pat marion wrote:
 Hi Matt, this patch should do it-
 
 --- a/Qt/Python/pqPythonDialog.cxx
 +++ b/Qt/Python/pqPythonDialog.cxx
 @@ -163,8 +163,8 @@ void pqPythonDialog::runScript(const QStringList files)
  QFile file(files[i]);
  if(file.open(QIODevice::ReadOnly))
{
 -  this-Implementation-Ui.shellWidget-executeScript(
 -file.readAll().data());
 +  this-runString(QString(__file__ = \%1\).arg(files[i]));
 +  this-runString(file.readAll().data());
}
  else
{
 
 
 Due to the extra call to runString(), the paraview python shell will display a
 new prompt twice.  I'd like to fix that before committing it to paraview.
 
 
 Pat
 
 On Wed, Jun 9, 2010 at 10:55 PM, m.c.wilk...@massey.ac.nz wrote:
 
 
 Hi Pat,
 
 Thank you for your quick response.
 
 Yes setting the __file__ variable would be great.
 
 Is there a formal way to do a feature request?  From googling, I see
 people have just posted requests to this list.  Is that good enough?
 If so, could we please have this has a feature request?
 
 If it is worth your time, perhaps you could point me to were I should
 start looking and perhaps I might be able to figure out how to
 implement the feature myself.
 
 Thank you
 
 Matt Wilkins
 
 On Wed, Jun 09, 2010 at 10:46:23PM -0400, pat marion wrote:
  I'm afraid there isn't a way to get the name of the python file that is
  currently executing.  Paraview reads the contents for the file into a
 string
  and passes the string to the interpreter, so python has no association
 between
  the string and the file.  As a feature request, I think it would be
 reasonable
  to have paraview set the __file__ variable to be the name of the file
 before
  executing it.
 
  Pat
 
  On Wed, Jun 9, 2010 at 5:15 PM, m.c.wilk...@massey.ac.nz wrote:
 
 
  Hi,
 
  I would like to find the location of the currently running python
  plugin macro.  This is so I can do an import of a library that lives
  in a directory relative to the directory where all my paraview
 plugins
  live.  Is this possible?
 
  In a normal python programme sys.argv[0] can help me, but ofcourse
  that just points to the paraview binary in this case.  os.getcwd() 
 is
  no use.  The info is known to paraview (for instance it is in
  ~/.config/ParaView/ParaView3.8.0.ini file under the [PythonMacros]
  section - but I really don't want to go trolling through that file).
 
  I have quite a few plugins, and I want to do the correct thing by
  breaking some of the shared functionality out into a module.
 
  Thanks for any help
 
  Matt
 
  ___
  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
 
  Follow this link to subscribe/unsubscribe:
  http://www.paraview.org/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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview