Skip to content

Instantly share code, notes, and snippets.

@tokejepsen
Created April 24, 2018 10:21
Show Gist options
  • Save tokejepsen/9ebce0d2612375a59159352720bd9220 to your computer and use it in GitHub Desktop.
Save tokejepsen/9ebce0d2612375a59159352720bd9220 to your computer and use it in GitHub Desktop.
Use TX files
import pymel.core as pc
import os
for node in pc.ls(type="file"):
path = node.fileTextureName.get()
tx_path = os.path.splitext(path)[0] + ".tx"
if os.path.exists(tx_path):
node.fileTextureName.set(tx_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment