Skip to content

Instantly share code, notes, and snippets.

@todashuta
Created October 2, 2023 13:51
Show Gist options
  • Save todashuta/0c2ca54028d3b2df3c21cf4e5c157726 to your computer and use it in GitHub Desktop.
Save todashuta/0c2ca54028d3b2df3c21cf4e5c157726 to your computer and use it in GitHub Desktop.
画像テクスチャノードの範囲外の処理方法をまとめて変える
import bpy
for m in bpy.data.materials:
if not m.use_nodes:
continue
#print(m)
nodes = m.node_tree.nodes
#print(nodes)
img_nodes = [n for n in nodes if n.type == "TEX_IMAGE"]
#print(nodes[:])
for n in img_nodes:
#print(n.type, n.name, n.image, n.extension)
n.extension = "EXTEND" # REPEAT EXTEND CLIP MIRROR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment