TextureSet 클래스
class substance_painter.textureset.TextureSet(material_id: int) substance_painter.textureset.TextureSet
Substance 3D Painter 텍스처 세트 텍스처 세트는 해상도와 스택 수가 있으며 레이어로 구성할 수도 있고 사용하지 않을 수도 있습니다. 필요한 경우 여러 UV 타일을 보유할 수도 있습니다.
구운 메시 맵 텍스처 세트를 사용합니다. 각 메시 맵에는 정의된 MeshMapUsage가 있습니다.
해당 재질이 레이어가 되어 있지 않다면 텍스처 세트는 사용자에게 투명한 스택 한 개만 가지고 있습니다. 재질이 레이어로 구성된 경우 텍스처 세트에는 여러 스택이 있습니다.
예
import substance_painter.textureset
# Get the Texture Set "TextureSetName":
my_texture_set = substance_painter.textureset.TextureSet.from_name("TextureSetName")
# Show the resolution of the Texture Set:
resolution = my_texture_set.get_resolution()
print("The resolution is {0}x{1}".format(resolution.width, resolution.height))
# Change the resolution of the Texture Set:
my_texture_set.set_resolution(substance_painter.textureset.Resolution(512, 512))
# Show information about layering:
if my_texture_set.is_layered_material():
print("{0} is a layered material".format(my_texture_set.name()))
# Get the stack called "Mask1" from the Texture Set:
mask_stack = my_texture_set.get_stack("Mask1")
# Print "TextureSetName/Mask1":
print(mask_stack)
else:
print("{0} is not a layered material".format(my_texture_set.name()))
# Show information about UV Tiles:
if my_texture_set.has_uv_tiles():
print("{0} has UV Tiles:".format(my_texture_set.name()))
for tile in my_texture_set.all_uv_tiles():
print("Tile {0} {1}".format(tile.u, tile.v))
# List all the stacks of the Texture Set "TextureSetName":
for stack in my_texture_set.all_stacks():
print(stack)
# Query ambiant occlusion Mesh map of the Texture Set "TextureSetName":
usage = substance_painter.textureset.MeshMapUsage.AO
meshMapResource = my_texture_set.get_mesh_map_resource(usage)
if meshMapResource is None :
print("{0} does not have a Mesh map defined for usage {1}"
.format(my_texture_set.name(), usage))
else:
print("{0} uses {1} Mesh map for usage {2}"
.format(my_texture_set.name(), meshMapResource, usage))
# Unset ambiant occlusion Mesh map of the Texture Set "TextureSetName":
my_texture_set.set_mesh_map_resource(usage, None)
매개 변수: material_id(int)
static from_name(텍스처_set_name: str) substance_painter.textureset.TextureSet.from_name
이름에서 텍스처 세트를 가져옵니다.
매개 변수: 텍스처_set_name (str) - 텍스처 집합의 이름입니다.
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ServiceNotFoundError - Substance 3D Painter에서 아직 모든 서비스를 시작하지 않은 경우.
- TypeError -
texture_set_name에 문자열이 없거나 없는 경우 - ValueError -
texture_set_name이(가) 비어 있는 경우 - ValueError - 이름이
texture_set_name인 텍스처 집합이 없는 경우
매개 변수: 텍스처_집합_이름 (str)
property original_name: str substance_painter.textureset.TextureSet.original_name
텍스처 세트를 가져올 때의 원래 이름입니다.
유형: str
Getter: 텍스처 집합의 원래 이름을 가져옵니다.
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ServiceNotFoundError - Substance 3D Painter에서 아직 모든 서비스를 시작하지 않은 경우.
- ValueError - 텍스처 집합이 잘못된 경우.
속성 이름: str substance_painter.textureset.TextureSet.name
텍스처 세트의 이름입니다.
텍스처 세트 이름은 고유해야 합니다.
유형: str
Getter: 텍스처 집합 이름을 가져옵니다.
Setter: 텍스처 집합 이름을 설정합니다.
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ServiceNotFoundError - Substance 3D Painter에서 아직 모든 서비스를 시작하지 않은 경우.
- ValueError - 텍스처 집합이 잘못된 경우.
- ValueError - 텍스처 집합의 이름에 예약된 문자가 포함된 경우.
- ValueError - 텍스처 집합의 이름이 고유하지 않은 경우.
속성 설명: str substance_painter.textureset.TextureSet.description
텍스처 세트에 대한 설명입니다.
유형: str
Getter: 텍스처 집합 설명을 가져옵니다.
Setter: 텍스처 집합 설명을 설정합니다.
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ServiceNotFoundError - Substance 3D Painter에서 아직 모든 서비스를 시작하지 않은 경우.
- ValueError - 텍스처 집합이 잘못된 경우.
is_layered_material() -> bool substance_painter.textureset.TextureSet.is_layered_material
이 텍스처 세트에서 재질 레이어를 사용하는지 확인합니다.
반환값: True(텍스처 집합에서 재질 레이어를 사용하는 경우), False(그렇지 않은 경우).
반환 형식: bool
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ServiceNotFoundError - Substance 3D Painter에서 아직 모든 서비스를 시작하지 않은 경우.
- ValueError - 텍스처 집합이 잘못된 경우.
all_stacks() -> 목록[스택] substance_painter.textureset.TextureSet.all_stacks
이 텍스처 집합에서 모든 스택을 나열합니다.
반환: 이 텍스처 집합의 모든 스택입니다.
반환 형식: 목록[스택]
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ServiceNotFoundError - Substance 3D Painter에서 아직 모든 서비스를 시작하지 않은 경우.
- ValueError - 텍스처 집합이 잘못된 경우.
TextureSet.get_stack().get_stack(stack_name: str = ‘’) -> 스택 substance_painter.textureset.TextureSet.get_stack
이름에서 이 텍스처 세트의 스택을 가져옵니다.
매개 변수:
stack_name (str) - 스택 이름입니다. 텍스처 세트에서 재질 레이어를 사용하지 않는 경우 비워 둡니다.
반환 형식: 스택
반환: 스택입니다.
반환 형식: 스택
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ServiceNotFoundError - Substance 3D Painter에서 아직 모든 서비스를 시작하지 않은 경우.
- ValueError - 텍스처 집합이 잘못된 경우.
매개 변수: stack_name(str)
TextureSet.all_stacks().get_resolution() -> 해상도 substance_painter.textureset.TextureSet.get_resolution
텍스처 세트 해상도를 가져옵니다.
반환값: 이 텍스처의 해상도를 픽셀 단위로 설정합니다.
반환 형식: 해상도
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ServiceNotFoundError - Substance 3D Painter에서 아직 모든 서비스를 시작하지 않은 경우.
- ValueError - 텍스처 집합이 잘못된 경우.
set_resolution(new_resolution: 해상도) substance_painter.textureset.TextureSet.set_resolution
텍스처 세트의 해상도를 설정합니다.
해결 제한 사항: Resolution을(를) 참조하십시오.
매개 변수: 새_해상도(해상도) - 이 텍스처 집합의 새 해상도입니다.
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ServiceNotFoundError - Substance 3D Painter에서 아직 모든 서비스를 시작하지 않은 경우.
- ValueError -
new_resolution이(가) 올바른 해상도가 아닌 경우. - ValueError - 텍스처 집합이 잘못된 경우.
has_uv_tiles() -> bool substance_painter.textureset.TextureSet.has_uv_tiles
텍스처 세트에서 UV 타일 워크플로우를 사용하는지 확인합니다.
반환값: True(텍스처 집합에서 UV 타일 워크플로를 사용하는 경우), 그렇지 않은 경우 False.
반환 형식: bool
발생: 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
all_uv_tiles()uv_tile(u_coord: int, v_coord: int) -> UVTile substance_painter.textureset.TextureSet.uv_tile
(u, v) 좌표에서 [텍스처 세트] UV 타일을 가져옵니다.
매개 변수:
- u_coord (int) - UV 타일의 u 좌표입니다.
- v_coord (int) - UV 타일의 v 좌표입니다.
반환: (u, v) 좌표에 있는 텍스처 집합 UV 타일.
반환 형식: UVTile
발생: 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
all_uv_tiles() -> List[UVTile] substance_painter.textureset.TextureSet.all_uv_tiles
U, V 좌표순으로 정렬된 [텍스처 세트] UV 타일 목록을 가져옵니다.
반환값: U 좌표와 V 좌표로 정렬된 텍스처 집합 UV 타일 목록입니다.
반환 유형: 목록[UVTile]
발생: 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
has_uv_tiles()get_uvtiles_resolution() -> Dict[UVTile, 해상도] substance_painter.textureset.TextureSet.get_uvtiles_resolution
텍스처 집합과 해상도가 다른 모든 UV 타일을 유효 해상도와 연결하여 가져옵니다.
반환: uvtiles 사전 및 관련 해상도입니다.
발생: 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
UVTile.get_resolution()set_uvtiles_resolution(resolution: Dict[UVTile, Resolution]) substance_painter.textureset.TextureSet.set_uvtiles_resolution
지정된 UV 타일의 해상도를 관련 해상도로 설정합니다.
매개 변수:
해결 (Dict*[*UVTile *,* 해결]) - UV 타일 사전 및 관련 해결.
발생: 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
UVTile.set_resolution()reset_uvtiles_resolution(uvtiles: List[UVTile]) substance_painter.textureset.TextureSet.reset_uvtiles_resolution
지정된 UV 타일의 해상도를 상위 텍스처 세트의 해상도로 재설정합니다.
매개 변수: uvtiles (List*[*UVTile *]*) - 다시 설정할 UV 타일 목록입니다.
발생: 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
UVTile.reset_resolution()all_mesh_names() -> 목록[str] substance_painter.textureset.TextureSet.all_mesh_names
텍스처 세트의 메시 목록을 가져옵니다. UV 타일을 사용할 경우 결과는 모든 UV 타일의 메시 이름이 합쳐진 것입니다.
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ServiceNotFoundError - Substance Painter이 아직 모든 서비스를 시작하지 않은 경우.
반환 형식: 목록[문자열]
UVTile.all_mesh_names()get_mesh_map_resource(usage: MeshMapUsage) -> 리소스 ID | 없음 substance_painter.textureset.TextureSet.get_mesh_map_resource
지정된 텍스처 세트 사용에 대한 메시 맵을 쿼리합니다.
매개 변수: 사용량(MeshMapUsage) - 메시 맵 사용이 쿼리됩니다.
반환: 메시 맵 리소스 또는 없음.
반환 형식: 리소스 ID
set_mesh_map_resource(usage: MeshMapUsage, new_mesh_map: ResourceID | 없음) -> 없음 substance_painter.textureset.TextureSet.set_mesh_map_resource
지정된 텍스처 세트 사용에 대한 메시 맵을 교체합니다.
매개 변수:
- 사용량(MeshMapUsage) - 대체할 메시 맵 사용량입니다.
- 새_메시_맵(*리소스 ID *, 선택 사항) - 설정 해제할 새 메시 맵 또는 없음.
상승:
- ResourceNotFoundError -
new_mesh_map리소스를 찾을 수 없거나 IMAGE 형식이 아닌 경우 - ValueError - 리소스가 이미 텍스처 집합의 다른 메시 맵 사용에 사용된 경우.
반환 형식: 없음