# How to automatize texture mapping using state files or python state files in ParaView though.

**URL:** https://discourse.paraview.org/t/how-to-automatize-texture-mapping-using-state-files-or-python-state-files-in-paraview-though/11717
**Category:** ParaView Support
**Created:** [March 27, 2023, 1:07pm UTC](https://discourse.paraview.org/t/how-to-automatize-texture-mapping-using-state-files-or-python-state-files-in-paraview-though/11717 "2023-03-27T13:07:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ericsson-paul](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ericsson-paul/32/11233_2.png) [@Ericsson-paul](https://discourse.paraview.org/u/Ericsson-paul)
#### Post date: [March 27, 2023, 1:07pm UTC](https://discourse.paraview.org/t/how-to-automatize-texture-mapping-using-state-files-or-python-state-files-in-paraview-though/11717/1 "2023-03-27T13:07:06Z")

</div>

I have several vtk files with texture coordinates already written and corresponding texture images, how do I automatize texture mapping using state files or python state files in ParaView though.

---

<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: [March 28, 2023, 9:54am UTC](https://discourse.paraview.org/t/how-to-automatize-texture-mapping-using-state-files-or-python-state-files-in-paraview-though/11717/2 "2023-03-28T09:54:01Z")

</div>

Using the python trace makes it quite easy:

```auto
# a texture
mblogo_64_with_croc = CreateTexture('/path/to/image.png')

# change texture
myDisplay.Texture = mblogo_64_with_croc

```

hth,
