simple.texture Module¶
- paraview.simple.texture.CreateTexture(filename=None, trivial_producer_key=None, proxyname=None)[source]¶
Creates and returns a new ImageTexture proxy. The texture is not attached to anything by default but it can be applied to things, for example the view, like so:
GetActiveView().UseTexturedBackground = 1 GetActiveView().BackgroundTexture = CreateTexture(“foo.png”)
- Parameters:
filename (str) – The name of the image file to load as a texture. It can be None, in which case the texture is read from a trivial producer identified by the trivial_producer_key
trivial_producer_key (str) – Identifier of the texture image source on the server. This is mainly used by scene importers when filename is None.
proxyname (str) – The name for the texture when it is registered in ParaView.
- Returns:
The newly created texture.
- Return type:
Image texture proxy.
- paraview.simple.texture.FindTextureOrCreate(registrationName, filename=None, trivial_producer_key=None)[source]¶
Finds or creates a new ImageTexture proxy.
- Parameters:
registrationName (str) – The name for the texture when it is registered in ParaView.
filename (str) – Path to the texture image source file. Optional, if not provided, the trivial_producer_key should be provided to tell which image source to use for the texture.
trivial_producer_key (str) – Identifier of the texture image source on the server. This is mainly used by scene importers when filename is None.