[Paraview] outline source in pvbatch

joseph insley insley at anl.gov
Tue Sep 24 13:44:26 EDT 2013


Ah, right.. I had been looking at the C++ docs.

Thanks again, Utkarsh,

joe

On Sep 24, 2013, at 11:54 AM, Utkarsh Ayachit wrote:

> Joe,
> The property name  is "Bounds", not "SetBounds", you just want to do
> something like the following instead:
> 
> Outline1.Bounds = [0, .75, 0, 0.75, 0, 1]
> 
> On Tue, Sep 24, 2013 at 12:30 PM, joseph insley <insley at anl.gov> wrote:
>> Thanks, Utkarsh,
>> 
>> This did solve the problem with creating the Outline source.  Once created, though, I am subsequently having trouble updating it by calling SetBounds().   Do I need to cast Outline1 as an Outline source,  or qualify it some other way?
>> 
>> Thanks for your help,
>> joe
>> 
>> 
>> $ ./ParaView-4.0.1-Linux-64bit/bin/pvbatch outline_state_01.py
>> Traceback (most recent call last):
>>  File "outline_state_01.py", line 194, in <module>
>>    Outline1.SetBounds(0.0, 0.75, 0.0, 0.75, 0.0, 1.0)
>>  File "ParaView-4.0.1-Linux-64bit/lib/paraview-4.0/site-packages/paraview/servermanager.py", line 414, in __getattr__
>>    return getattr(self.SMProxy, name)
>> AttributeError: SetBounds
>> 
>> 
>> On Sep 24, 2013, at 9:30 AM, Utkarsh Ayachit wrote:
>> 
>>> Here's the correct BUG report : http://paraview.org/Bug/view.php?id=14293
>>> 
>>> Utkarsh
>>> 
>>> On Tue, Sep 24, 2013 at 10:20 AM, Utkarsh Ayachit
>>> <utkarsh.ayachit at kitware.com> wrote:
>>>> Ouch, that's nasty. Incidentally, the Outline filter and Outline
>>>> source have the same name and hence the Python script is creating the
>>>> Outline filter instead of the source. I've reported a bug
>>>> (http://paraview.org/Bug/bug_report.php) . In the mean time, you can
>>>> do the following:
>>>> 
>>>> from paraview import simple
>>>> creator = simple._create_func("Outline", simple.servermanager.sources)
>>>> Outline1 = creator(guiName="Outline1", Bounds=[0.0, 1.0, 0.0, 1.0, 0.0, 1.0])
>>>> 
>>>> Utkarsh
>>>> 
>>>> On Mon, Sep 23, 2013 at 4:48 PM, joseph insley <insley at anl.gov> wrote:
>>>>> Hi,
>>>>> 
>>>>> I'm having trouble using pvbatch with a python state script that contains an Outline source.   The full script is below, but in brief, I started paraview, added an Outline source, using the default settings, and then saved state as a .py file.  When I try to run pvbatch with this state file I get the following error about missing Attribute Bounds.  Am I perhaps missing an extra import, or something?  Any advice on how to solve this would be appreciated.
>>>>> 
>>>>> I ultimately want to animate over a series of time steps, calling Outline.SetBounds() to update the position of the outline object.  Calling SetBounds() in this script yields similar results.  I'm hoping that there is a simple fix that will apply to both errors.
>>>>> 
>>>>> Thanks,
>>>>> joe
>>>>> 
>>>>> $ ParaView-4.0.1-Linux-64bit/bin/pvbatch /sandbox/outline_state_01.py
>>>>> Traceback (most recent call last):
>>>>> File "/sandbox/outline_state_01.py", line 72, in <module>
>>>>>   Outline1 = Outline( guiName="Outline1", Bounds=[0.0, 1.0, 0.0, 1.0, 0.0, 1.0] )
>>>>> File "ParaView-4.0.1-Linux-64bit/lib/paraview-4.0/site-packages/paraview/simple.py", line 1145, in CreateObject
>>>>>   setattr(px, param, params[param])
>>>>> File "ParaView-4.0.1-Linux-64bit/lib/paraview-4.0/site-packages/paraview/servermanager.py", line 251, in __setattr__
>>>>>   "to add this attribute.")
>>>>> AttributeError: Attribute Bounds does not exist.  This class does not allow addition of new attributes to avoid mistakes due to typos. Use add_attribute() if you really want to add this attribute.
>>>>> 
>>>>> -----------------------
>>>>> 
>>>>> 
>>>>> try: paraview.simple
>>>>> except: from paraview.simple import *
>>>>> paraview.simple._DisableFirstRenderCameraReset()
>>>>> 
>>>>> RenderView1 = CreateRenderView()
>>>>> RenderView1.LightSpecularColor = [1.0, 1.0, 1.0]
>>>>> RenderView1.UseOutlineForLODRendering = 0
>>>>> RenderView1.KeyLightAzimuth = 10.0
>>>>> RenderView1.UseTexturedBackground = 0
>>>>> RenderView1.UseLight = 1
>>>>> RenderView1.CameraPosition = [0.5, 0.5, 3.8460652149512318]
>>>>> RenderView1.FillLightKFRatio = 3.0
>>>>> RenderView1.Background2 = [0.0, 0.0, 0.165]
>>>>> RenderView1.FillLightAzimuth = -10.0
>>>>> RenderView1.LODResolution = 0.5
>>>>> RenderView1.BackgroundTexture = []
>>>>> RenderView1.InteractionMode = '3D'
>>>>> RenderView1.StencilCapable = 1
>>>>> RenderView1.LightIntensity = 1.0
>>>>> RenderView1.CameraFocalPoint = [0.5, 0.5, 0.5]
>>>>> RenderView1.ImageReductionFactor = 2
>>>>> RenderView1.CameraViewAngle = 30.0
>>>>> RenderView1.CameraParallelScale = 0.8660254037844386
>>>>> RenderView1.EyeAngle = 2.0
>>>>> RenderView1.HeadLightKHRatio = 3.0
>>>>> RenderView1.StereoRender = 0
>>>>> RenderView1.KeyLightIntensity = 0.75
>>>>> RenderView1.BackLightAzimuth = 110.0
>>>>> RenderView1.OrientationAxesInteractivity = 0
>>>>> RenderView1.UseInteractiveRenderingForSceenshots = 0
>>>>> RenderView1.UseOffscreenRendering = 0
>>>>> RenderView1.Background = [0.31999694819562063, 0.3400015259021897, 0.4299992370489052]
>>>>> RenderView1.UseOffscreenRenderingForScreenshots = 0
>>>>> RenderView1.NonInteractiveRenderDelay = 0.0
>>>>> RenderView1.CenterOfRotation = [0.5, 0.5, 0.5]
>>>>> RenderView1.CameraParallelProjection = 0
>>>>> RenderView1.CompressorConfig = 'vtkSquirtCompressor 0 3'
>>>>> RenderView1.HeadLightWarmth = 0.5
>>>>> RenderView1.MaximumNumberOfPeels = 4
>>>>> RenderView1.LightDiffuseColor = [1.0, 1.0, 1.0]
>>>>> RenderView1.StereoType = 'Red-Blue'
>>>>> RenderView1.DepthPeeling = 1
>>>>> RenderView1.BackLightKBRatio = 3.5
>>>>> RenderView1.StereoCapableWindow = 1
>>>>> RenderView1.CameraViewUp = [0.0, 1.0, 0.0]
>>>>> RenderView1.LightType = 'HeadLight'
>>>>> RenderView1.LightAmbientColor = [1.0, 1.0, 1.0]
>>>>> RenderView1.RemoteRenderThreshold = 20.0
>>>>> RenderView1.CacheKey = 0.0
>>>>> RenderView1.UseCache = 0
>>>>> RenderView1.KeyLightElevation = 50.0
>>>>> RenderView1.CenterAxesVisibility = 0
>>>>> RenderView1.MaintainLuminance = 0
>>>>> RenderView1.StillRenderImageReductionFactor = 1
>>>>> RenderView1.BackLightWarmth = 0.5
>>>>> RenderView1.FillLightElevation = -75.0
>>>>> RenderView1.MultiSamples = 0
>>>>> RenderView1.FillLightWarmth = 0.4
>>>>> RenderView1.AlphaBitPlanes = 1
>>>>> RenderView1.LightSwitch = 0
>>>>> RenderView1.OrientationAxesVisibility = 1
>>>>> RenderView1.CameraClippingRange = [2.3176045628017192, 4.6487561931755]
>>>>> RenderView1.BackLightElevation = 0.0
>>>>> RenderView1.ViewTime = 0.0
>>>>> RenderView1.OrientationAxesOutlineColor = [1.0, 1.0, 1.0]
>>>>> RenderView1.LODThreshold = 5.0
>>>>> RenderView1.CollectGeometryThreshold = 100.0
>>>>> RenderView1.UseGradientBackground = 0
>>>>> RenderView1.KeyLightWarmth = 0.6
>>>>> RenderView1.OrientationAxesLabelColor = [1.0, 1.0, 1.0]
>>>>> 
>>>>> Outline1 = Outline( guiName="Outline1", Bounds=[0.0, 1.0, 0.0, 1.0, 0.0, 1.0] )
>>>>> 
>>>>> DataRepresentation1 = Show()
>>>>> DataRepresentation1.CubeAxesZAxisVisibility = 1
>>>>> DataRepresentation1.SelectionPointLabelColor = [0.5, 0.5, 0.5]
>>>>> DataRepresentation1.SelectionPointFieldDataArrayName = 'vtkOriginalPointIds'
>>>>> DataRepresentation1.SuppressLOD = 0
>>>>> DataRepresentation1.CubeAxesXGridLines = 0
>>>>> DataRepresentation1.BlockVisibility = []
>>>>> DataRepresentation1.CubeAxesYAxisTickVisibility = 1
>>>>> DataRepresentation1.Position = [0.0, 0.0, 0.0]
>>>>> DataRepresentation1.BackfaceRepresentation = 'Follow Frontface'
>>>>> DataRepresentation1.SelectionOpacity = 1.0
>>>>> DataRepresentation1.SelectionPointLabelShadow = 0
>>>>> DataRepresentation1.CubeAxesYGridLines = 0
>>>>> DataRepresentation1.CubeAxesZAxisTickVisibility = 1
>>>>> DataRepresentation1.OrientationMode = 'Direction'
>>>>> DataRepresentation1.ScaleMode = 'No Data Scaling Off'
>>>>> DataRepresentation1.Diffuse = 1.0
>>>>> DataRepresentation1.SelectionUseOutline = 0
>>>>> DataRepresentation1.CubeAxesZTitle = 'Z-Axis'
>>>>> DataRepresentation1.Specular = 0.1
>>>>> DataRepresentation1.SelectionVisibility = 1
>>>>> DataRepresentation1.InterpolateScalarsBeforeMapping = 1
>>>>> DataRepresentation1.CustomRangeActive = [0, 0, 0]
>>>>> DataRepresentation1.Origin = [0.0, 0.0, 0.0]
>>>>> DataRepresentation1.CubeAxesVisibility = 0
>>>>> DataRepresentation1.Scale = [1.0, 1.0, 1.0]
>>>>> DataRepresentation1.SelectionCellLabelJustification = 'Left'
>>>>> DataRepresentation1.DiffuseColor = [1.0, 1.0, 1.0]
>>>>> DataRepresentation1.SelectionCellLabelOpacity = 1.0
>>>>> DataRepresentation1.Source = []
>>>>> DataRepresentation1.Masking = 0
>>>>> DataRepresentation1.Opacity = 1.0
>>>>> DataRepresentation1.LineWidth = 1.0
>>>>> DataRepresentation1.MeshVisibility = 0
>>>>> DataRepresentation1.Visibility = 1
>>>>> DataRepresentation1.SelectionCellLabelFontSize = 18
>>>>> DataRepresentation1.CubeAxesCornerOffset = 0.0
>>>>> DataRepresentation1.SelectionPointLabelJustification = 'Left'
>>>>> DataRepresentation1.OriginalBoundsRangeActive = [0, 0, 0]
>>>>> DataRepresentation1.SelectionPointLabelVisibility = 0
>>>>> DataRepresentation1.SelectOrientationVectors = ''
>>>>> DataRepresentation1.CubeAxesTickLocation = 'Inside'
>>>>> DataRepresentation1.BackfaceDiffuseColor = [1.0, 1.0, 1.0]
>>>>> DataRepresentation1.CubeAxesYLabelFormat = '%-#6.3g'
>>>>> DataRepresentation1.CubeAxesYAxisVisibility = 1
>>>>> DataRepresentation1.SelectionPointLabelFontFamily = 'Arial'
>>>>> DataRepresentation1.CubeAxesUseDefaultYTitle = 1
>>>>> DataRepresentation1.SelectScaleArray = ''
>>>>> DataRepresentation1.CubeAxesYTitle = 'Y-Axis'
>>>>> DataRepresentation1.ColorAttributeType = 'POINT_DATA'
>>>>> DataRepresentation1.AxesOrigin = [0.0, 0.0, 0.0]
>>>>> DataRepresentation1.UserTransform = [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0]
>>>>> DataRepresentation1.SpecularPower = 100.0
>>>>> DataRepresentation1.Texture = []
>>>>> DataRepresentation1.SelectionCellLabelShadow = 0
>>>>> DataRepresentation1.AmbientColor = [1.0, 1.0, 1.0]
>>>>> DataRepresentation1.BlockOpacity = {}
>>>>> DataRepresentation1.MapScalars = 1
>>>>> DataRepresentation1.PointSize = 2.0
>>>>> DataRepresentation1.CubeAxesUseDefaultXTitle = 1
>>>>> DataRepresentation1.SelectionCellLabelFormat = ''
>>>>> DataRepresentation1.Scaling = 0
>>>>> DataRepresentation1.StaticMode = 0
>>>>> DataRepresentation1.SelectionCellLabelColor = [0.0, 1.0, 0.0]
>>>>> DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]
>>>>> DataRepresentation1.CubeAxesXAxisTickVisibility = 1
>>>>> DataRepresentation1.SelectionCellLabelVisibility = 0
>>>>> DataRepresentation1.NonlinearSubdivisionLevel = 1
>>>>> DataRepresentation1.CubeAxesColor = [1.0, 1.0, 1.0]
>>>>> DataRepresentation1.Representation = 'Surface'
>>>>> DataRepresentation1.CustomRange = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]
>>>>> DataRepresentation1.CustomBounds = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]
>>>>> DataRepresentation1.Orientation = [0.0, 0.0, 0.0]
>>>>> DataRepresentation1.CubeAxesXTitle = 'X-Axis'
>>>>> DataRepresentation1.CubeAxesInertia = 1
>>>>> DataRepresentation1.BackfaceOpacity = 1.0
>>>>> DataRepresentation1.SelectionPointLabelFontSize = 18
>>>>> DataRepresentation1.SelectionCellFieldDataArrayName = 'vtkOriginalCellIds'
>>>>> DataRepresentation1.SelectionColor = [1.0, 0.0, 1.0]
>>>>> DataRepresentation1.BlockColor = {}
>>>>> DataRepresentation1.Ambient = 0.0
>>>>> DataRepresentation1.CubeAxesXAxisMinorTickVisibility = 1
>>>>> DataRepresentation1.ScaleFactor = 0.1
>>>>> DataRepresentation1.BackfaceAmbientColor = [1.0, 1.0, 1.0]
>>>>> DataRepresentation1.SelectMaskArray = ''
>>>>> DataRepresentation1.SelectionLineWidth = 2.0
>>>>> DataRepresentation1.CubeAxesZAxisMinorTickVisibility = 1
>>>>> DataRepresentation1.CubeAxesXAxisVisibility = 1
>>>>> DataRepresentation1.CubeAxesXLabelFormat = '%-#6.3g'
>>>>> DataRepresentation1.Interpolation = 'Gouraud'
>>>>> DataRepresentation1.CubeAxesZLabelFormat = '%-#6.3g'
>>>>> DataRepresentation1.SelectionCellLabelFontFamily = 'Arial'
>>>>> DataRepresentation1.SelectionCellLabelItalic = 0
>>>>> DataRepresentation1.CubeAxesYAxisMinorTickVisibility = 1
>>>>> DataRepresentation1.CubeAxesZGridLines = 0
>>>>> DataRepresentation1.SelectionPointLabelFormat = ''
>>>>> DataRepresentation1.SelectionPointLabelOpacity = 1.0
>>>>> DataRepresentation1.UseAxesOrigin = 0
>>>>> DataRepresentation1.CubeAxesFlyMode = 'Closest Triad'
>>>>> DataRepresentation1.Pickable = 1
>>>>> DataRepresentation1.CustomBoundsActive = [0, 0, 0]
>>>>> DataRepresentation1.CubeAxesGridLineLocation = 'All Faces'
>>>>> DataRepresentation1.SelectionRepresentation = 'Wireframe'
>>>>> DataRepresentation1.SelectionPointLabelBold = 0
>>>>> DataRepresentation1.ColorArrayName = ('POINT_DATA', '')
>>>>> DataRepresentation1.SelectionPointLabelItalic = 0
>>>>> DataRepresentation1.AllowSpecularHighlightingWithScalarColoring = 0
>>>>> DataRepresentation1.SpecularColor = [1.0, 1.0, 1.0]
>>>>> DataRepresentation1.CubeAxesUseDefaultZTitle = 1
>>>>> DataRepresentation1.LookupTable = []
>>>>> DataRepresentation1.SelectionPointSize = 5.0
>>>>> DataRepresentation1.SelectionCellLabelBold = 0
>>>>> DataRepresentation1.Orient = 0
>>>>> 
>>>>> #Render()
>>>>> 
>>>>> RenderView1.StillRender()
>>>>> WriteImage("/sandbox/DATA/outline_image_01.png")
>>>>> 
>>>>> _______________________________________________
>>>>> 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
>> 



More information about the ParaView mailing list