AntoninG
AntoninG

Reputation: 3

In Paraview (python), ExportView on an empty scene exports a .vtp with two objects

I am a bit confused by the ExportView command in python paraview. It creates two objects in the .vtp file that are not in the data I want to plot: a cone and a kind of symbol. I would like to remove these objects.

For example, I create an empty view:

from paraview.simple import *

renderView2 = FindViewOrCreate('RenderView2', viewtype='RenderView')

When I take a Screenshot (with SaveScreenshot(SomePath, renderView2)), I get as expected an empty image. But when I try to export in a .vtp (with ExportView('test.vtp',view=renderView2)), I get two objects: a cone and a symbol, as shown in the image. Two objects showing up in the .vtp file

What am I missing? How to remove these objects? Thanks a lot!

Upvotes: 0

Views: 165

Answers (1)

Nico Vuaille
Nico Vuaille

Reputation: 2498

In vtp this is particulary buggy but those objects are the Orientation Axis :)

You can fix it by hiding the axis before exporting:

renderView2.OrientationAxesVisibility = 0

related issue : https://gitlab.kitware.com/paraview/paraview/-/issues/19301

Upvotes: 1

Related Questions