# TextureMaptoSphere Scripting

**URL:** https://discourse.paraview.org/t/texturemaptosphere-scripting/2991
**Category:** ParaView Support
**Tags:** python
**Created:** [November 15, 2019, 7:20pm UTC](https://discourse.paraview.org/t/texturemaptosphere-scripting/2991 "2019-11-15T19:20:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Pat](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/8491ac/32.png) [@Pat](https://discourse.paraview.org/u/Pat)
#### Post date: [November 15, 2019, 7:20pm UTC](https://discourse.paraview.org/t/texturemaptosphere-scripting/2991/1 "2019-11-15T19:20:08Z")

</div>

Hello, how would I go about setting the texturemaptosphere texture image via python script, from what I understand I would have to manually create the proxy that accomplishes this since the trace command wont spit out a texture map.

I am not sure how to pass the image into Paraviews texture map function.

I loaded the image via

texture = servermanager.rendering.ImageTexture()  
texture.FileName = “C:\path\texturemap.jpg”

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 18, 2019, 9:44am UTC](https://discourse.paraview.org/t/texturemaptosphere-scripting/2991/2 "2019-11-18T09:44:17Z")

</div>

```
texture = servermanager.rendering.ImageTexture()
texture.FileName = "C:\path\texturemap.jpg"
r=GetDisplayProperties()
r.Texture = texture
Render()
```
