Using a Skybox from Python script

I am not able to re-load a simple Python script with a Skybox background (ParaView 5.13). The following code always gives error, while it works fine loading the texture interactively

renderView1 = GetRenderView()

disk1 = Disk(registrationName='Disk1')
disk1.InnerRadius = 15.0
disk1.OuterRadius = 3000.0
disk1.CircumferentialResolution = 128

Show()

fname1 = "/local/apps/VTK/VTKBuild/ExternalData/Testing/Data/spiaggia_di_mondello_1k.hdr"
tex0 = CreateTexture(filename=fname1)

renderView1.BackgroundTexture = tex0
renderView1.UseColorPaletteForBackground = 0

renderView1.BackgroundColorMode = 'Skybox'
renderView1.ResetCamera()

vtkOpenGLTexture.cxx:195 ERR| vtkOpenGLTexture (0x5e467e8c2eb0): No scalar values found for texture input!

For me, the code works in 5.12 and not in 5.13.

Hi @jfavre

I confirm the saving a python state file and then reloading it, either using pvpython or load state, causes the issue you are seeing.

I do not see anything wrong in the python code itself, it should work, so more investigation is needed as to why.

Could you open an issue ?

Indeed, this look like a regression.

@jaswantp

This is a regression likely due to https://gitlab.kitware.com/paraview/paraview/-/commit/cca54429f9ee4323836568f6061d6a1605363f6b. That commit was done as part of adding “Import GLTF” to ParaView.

For completeness: https://gitlab.kitware.com/paraview/paraview/-/issues/22742