Hello,
 
I am using python scripts to import data into a ParaView (5.4.1) session. In order to keep the texture images in a saved state, I am registering them:
 
pathToTextureImage='path\\imagefile'
Display = Show(testvtp, renderView1)
Display.SetRepresentationType('Surface')
texProxy = servermanager.CreateProxy('textures','ImageTexture')
texProxy.GetProperty('FileName').SetElement(0, pathToTextureImage)
texProxy.UpdateVTKObjects()
servermanager.Register(texProxy, registrationName='ImageName')
 
Now, when I call this script multiple times (e.g. because I made changes to the vtp defining the texture plane), I will have multiple instances of my image in the pull-down menu for the texture. Is there a way to avoid this, either by checking if the resitrationName already exists or by deleting the multiple texture image from the list afterwards?
 
I have found this https://public.kitware.com/pipermail/paraview/2007-October/006126.html , but I cannot figure out how to use the code correctly in my case.
 
Also, is it possible to show only the images associated with the respective object in the pull-down menu? When I have many profiles with images loaded, the menu gets quite crowded and there is a risk of choosing an image not belonging to the current profile. 
 
Any suggestions on how to solve this are very much apprechiated. Thanks in advance!
Cheers,
Venke
 
 
 
 
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to