Skip to main content
replaced http://blender.stackexchange.com/ with https://blender.stackexchange.com/
Source Link

The following sets the face texture of face 0 for the active object:

import bpy

obj = bpy.context.object
img = bpy.data.images.load("//example.png")
obj.data.uv_textures.active.data[0].image = img

# To make renderable:
mat = bpy.data.materials.new("Example")
mat.use_face_texture = True
obj.data.materials.append(mat)

For cycles see: Different image textures for one material (Cycles)Different image textures for one material (Cycles).

The following sets the face texture of face 0 for the active object:

import bpy

obj = bpy.context.object
img = bpy.data.images.load("//example.png")
obj.data.uv_textures.active.data[0].image = img

# To make renderable:
mat = bpy.data.materials.new("Example")
mat.use_face_texture = True
obj.data.materials.append(mat)

For cycles see: Different image textures for one material (Cycles).

The following sets the face texture of face 0 for the active object:

import bpy

obj = bpy.context.object
img = bpy.data.images.load("//example.png")
obj.data.uv_textures.active.data[0].image = img

# To make renderable:
mat = bpy.data.materials.new("Example")
mat.use_face_texture = True
obj.data.materials.append(mat)

For cycles see: Different image textures for one material (Cycles).

opps, wrong variable name
Source Link
Aldrik
  • 9.8k
  • 23
  • 56

The following sets the face texture of face 0 for the active object:

import bpy

obj = bpy.context.object
img = bpy.data.images.load("//example.png")
obj.data.uv_textures.active.data[0].image = img

# To make renderable:
mat = bpy.data.materials.new("Example")
mat.use_face_texture = True
obj.data.materials.append(materialmat)

For cycles see: Different image textures for one material (Cycles).

The following sets the face texture of face 0 for the active object:

import bpy

obj = bpy.context.object
img = bpy.data.images.load("//example.png")
obj.data.uv_textures.active.data[0].image = img

# To make renderable:
mat = bpy.data.materials.new("Example")
mat.use_face_texture = True
obj.data.materials.append(material)

For cycles see: Different image textures for one material (Cycles).

The following sets the face texture of face 0 for the active object:

import bpy

obj = bpy.context.object
img = bpy.data.images.load("//example.png")
obj.data.uv_textures.active.data[0].image = img

# To make renderable:
mat = bpy.data.materials.new("Example")
mat.use_face_texture = True
obj.data.materials.append(mat)

For cycles see: Different image textures for one material (Cycles).

added 1 characters in body
Source Link
Aldrik
  • 9.8k
  • 23
  • 56

The following sets the face texture of face 0 offor the active object:

import bpy

obj = bpy.context.object
img = bpy.data.images.load("//example.png")
obj.data.uv_textures.active.data[0].image = img

# To make renderable:
mat = bpy.data.materials.new("Example")
mat.use_face_texture = True
obj.data.materials.append(material)

For cycles see: Different image textures for one material (Cycles).

The following sets the face texture of face 0 of the active object:

import bpy

obj = bpy.context.object
img = bpy.data.images.load("//example.png")
obj.data.uv_textures.active.data[0].image = img

# To make renderable:
mat = bpy.data.materials.new("Example")
mat.use_face_texture = True
obj.data.materials.append(material)

For cycles see: Different image textures for one material (Cycles).

The following sets the face texture of face 0 for the active object:

import bpy

obj = bpy.context.object
img = bpy.data.images.load("//example.png")
obj.data.uv_textures.active.data[0].image = img

# To make renderable:
mat = bpy.data.materials.new("Example")
mat.use_face_texture = True
obj.data.materials.append(material)

For cycles see: Different image textures for one material (Cycles).

Source Link
Aldrik
  • 9.8k
  • 23
  • 56
Loading