View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009423ParaViewBugpublic2009-08-14 17:372014-08-29 10:59
ReporterAlan Scott 
Assigned ToUtkarsh Ayachit 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.2 
Summary0009423: Python Trace generator doesn't do screenshots.
Description* ParaView trunk, XP, local server.
* Tools/ Python Shell/ Trace/ Start trace
* Sources/ Cone. Apply.
* File/ Save Screenshot. Save this somewhere.
* Tools/ Python Shell/ Trace/ Stop trace
* Tools/ Python Shell/ Trace/ Show trace
<<Bug>> - there is no save screenshot. I tested this by saving the trace, and then executing it, and it did not save a file.

<<Note - I didn't check animations, but I bet the same problem exists>>


Since this is such basic functionality, it must be fixed for 3.6.2.
TagsPythonTrace
Project
Topic Namerefactor_python_tracing_2
Type
Attached Files

 Relationships
has duplicate 0009701closed python trace error - save screenshot doesn't work 

  Notes
(0017278)
Pat Marion (reporter)
2009-09-01 11:30

Saving a screenshot from the gui takes advantage of the Qt based view manager class. The gui lets you capture all the views together. The current pvpython api only allows you to save a single render view. The gui lets you specify a size [x, y], but from python you must resize the render window to get the desired aspect ratio and then you can pass a magnification argument to save screenshot.

I could set it up so that trace only captures the save screenshot event if the user has chosen "Save only selected view" in the gui (and the selected view is a 3D render view).

What do you think, Alan?

(0017288)
Alan Scott (manager)
2009-09-01 16:34

I think that it would be OK short term, and possibly long term, to only "save only selected view". Then, the user can change the selected view, and do another "save only selected view". Thus, a user could write out each and every view serially.

I think that limiting output to only 3D render is unacceptably restrictive. Users are using XY Plot View more and more, as well as 2D View.
(0017291)
Berk Geveci (administrator)
2009-09-01 20:58

I think that this should wait until 3.8 when we have proper multi-view/chart-view management in the server manager. Any solution we come up with now is going to be a hack and will be thrown away in 3.8. There is enough documentation here and there that explain how you can capture a 3D window from Python. For capturing the chart windows, the users will have to wait until 3.8.
(0019935)
Utkarsh Ayachit (administrator)
2010-03-17 10:30

Pat has committed a basic version to capture screenshots in trace. Deferring the extended screenshot tracing to 4.0.
(0029506)
Alan Scott (manager)
2012-10-24 17:20

Making sure this does not expire.
(0032999)
Utkarsh Ayachit (administrator)
2014-07-09 21:34

Developer note:

Current version generates the following trace:

===========================================================================
#### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()

# create a new 'Cone'
cone0 = Cone()

# get active view
renderView0 = GetActiveViewOrCreate('RenderView')
# uncomment following to set a specific view size
# renderView0.ViewSize = [1387, 796]

# show data in view
cone0Display = Show(cone0, renderView0)
# trace defaults for the display properties.
cone0Display.ColorArrayName = [None, '']

# reset view to fit data
renderView0.ResetCamera()

# current camera placement for renderView0
renderView0.CameraPosition = [0.0, 0.0, 3.2036135254332487]
renderView0.CameraParallelScale = 0.8291561935301535

# save screenshot
SaveScreenshot('/tmp/sample.png', magnification=1, quality=100, view=renderView0)


WriteAnimation('/tmp/movie.png', Magnification=1, FrameRate=15.0, Compression=True)
(0033059)
Utkarsh Ayachit (administrator)
2014-07-22 08:32

---------------------------------------------
Topics merged into master:
        0014874_fix_scalar_opacity_unit_distance
        14834_fix_representation_update
        dashboard-warnings-20140721
        refactor_python_tracing_2
(0033117)
Alan Scott (manager)
2014-07-28 20:05

Tested master, Linux, remote server.

 Issue History
Date Modified Username Field Change
2009-08-14 17:37 Alan Scott New Issue
2009-08-17 15:42 Utkarsh Ayachit Status backlog => tabled
2009-08-17 15:42 Utkarsh Ayachit Assigned To => Pat Marion
2009-08-17 15:42 Utkarsh Ayachit Priority normal => urgent
2009-09-01 11:30 Pat Marion Note Added: 0017278
2009-09-01 11:30 Pat Marion Assigned To Pat Marion => Alan Scott
2009-09-01 11:30 Pat Marion Status tabled => @20@
2009-09-01 16:34 Alan Scott Note Added: 0017288
2009-09-01 16:34 Alan Scott Assigned To Alan Scott => Pat Marion
2009-09-01 16:34 Alan Scott Status @20@ => tabled
2009-09-01 20:58 Berk Geveci Note Added: 0017291
2009-09-01 20:58 Berk Geveci Target Version 3.6.2 => 3.8
2010-01-19 14:05 Alan Scott Relationship added has duplicate 0009701
2010-02-01 14:28 Utkarsh Ayachit Priority urgent => immediate
2010-03-17 10:30 Utkarsh Ayachit Note Added: 0019935
2010-03-17 10:30 Utkarsh Ayachit Priority immediate => normal
2010-03-17 10:30 Utkarsh Ayachit Target Version 3.8 => 4.0
2012-10-24 17:20 Alan Scott Note Added: 0029506
2012-10-24 17:20 Alan Scott Status expired => backlog
2012-10-24 17:20 Alan Scott Resolution open => reopened
2014-07-04 21:48 Utkarsh Ayachit Assigned To Pat Marion => Utkarsh Ayachit
2014-07-04 21:48 Utkarsh Ayachit Tag Attached: PythonTrace
2014-07-09 21:34 Utkarsh Ayachit Note Added: 0032999
2014-07-18 21:00 Utkarsh Ayachit Topic Name => refactor_python_tracing_2
2014-07-18 21:00 Utkarsh Ayachit Status backlog => gatekeeper review
2014-07-18 21:00 Utkarsh Ayachit Fixed in Version => git-next
2014-07-18 21:00 Utkarsh Ayachit Resolution reopened => fixed
2014-07-22 08:32 Utkarsh Ayachit Fixed in Version git-next => git-master
2014-07-22 08:32 Utkarsh Ayachit Status gatekeeper review => customer review
2014-07-22 08:32 Utkarsh Ayachit Note Added: 0033059
2014-07-28 20:05 Alan Scott Note Added: 0033117
2014-07-28 20:05 Alan Scott Status customer review => closed
2014-08-29 10:59 Utkarsh Ayachit Fixed in Version git-master => 4.2


Copyright © 2000 - 2018 MantisBT Team