내보내기 모듈
이 모듈은 다양한 포맷으로 프로젝트에서 에셋(텍스처 및 메시)을 내보내는 기능을 표시합니다. 스크립팅에 해당하는 “텍스처 내보내기” 및 “메시 내보내기” 창입니다.
내보내기 텍스처의 경우 내보내기 구성은 JSON 파일으로 정의되지만 기존 내보내기 사전 설정을 사용할 수도 있습니다.
class substance_painter.export.ExportStatus(value) substance_painter.export.ExportStatus
내보내기 프로세스의 상태 코드입니다.
구성원:
SuccessCancelledWarningError내보내기 텍스처
substance_painter.export.list_project_users(json_config: dict) -> Dict[Tuple[str, str], List[str]] substance_painter.export.list_project_textures
지정된 JSON 구성에 따라 내보낼 텍스처 목록을 가져옵니다.
매개 변수:
json_config(dict) - 사용할 내보내기 구성을 나타내는 JSON 개체입니다. JSON 구성을 참조하세요.
반환:
스택별로 그룹화되어 내보낼 텍스처 파일 목록입니다(텍스처 세트 이름, 스택 이름).
반환 유형: Dict[튜플[ str, str], 목록[ str]]
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ValueError -
json_config의 형식이 잘못되었거나 현재 프로젝트의 컨텍스트에서 잘못된 경우. 사람이 읽을 수 있는 메시지가 들어 있습니다.
export_project_textures().class substance_painter.export.TextureExportResult(status: ExportStatus, message: str, 텍스처: Dict[Tuple[str, str], List[str]]) substance_painter.export.TextureExportResult
텍스처 내보내기 프로세스의 결과
매개 변수:
- 상태(ExportStatus) - 상태 코드.
- 메시지(str) - 사람이 읽을 수 있는 상태 메시지입니다.
- 텍스처 (Dict [ 튜플 [ str**, str*] ,* 목록*[ str ]]*) - 디스크에 작성된 텍스처 파일의 목록으로, 스택별로 그룹화됩니다(텍스처 집합 이름, 스택 이름).
substance_painter.export.export_project_users(json_config: dict) -> TextureExportResult substance_painter.export.export_project_textures
지정된 JSON 구성에 따라 문서 텍스처를 내보냅니다. 반환 값에는 디스크에 기록된 텍스처 파일 목록이 포함되어 있습니다.
반환 값의 상태는 오류일 수 없으며, 내보내기가 실패하는 모든 오류는 대신 예외를 발생시킵니다. 그러나 내보내기가 실패하면 연결된 이벤트 ExportTextureEnded에 실제로 상태가 Error로 표시됩니다. 사용자가 내보내기를 취소하면 함수 반환 값은 취소됨 상태가 되며 내보내기가 취소되기 전에 디스크에 기록된 텍스처 파일 목록이 포함됩니다.
매개 변수:
json_config (dict) -
사용할 내보내기 구성을 나타내는 JSON 개체입니다. JSON 구성을 참조하세요.
반환: 내보내기 프로세스의 결과.
반환 형식: TextureExportResult
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ValueError -
json_config의 형식이 잘못되었거나 현재 프로젝트의 컨텍스트에서 잘못된 경우. 문제를 자세히 설명하는 사람이 읽을 수 있는 메시지가 포함되어 있습니다.
예:
import substance_painter.export
# Open a project we want to export from (see substance_painter.project
# for details). This step is not necessary if there is already a project
# opened in Substance 3D Painter.
import substance_painter.project
substance_painter.project.open("C:/projects/MeetMat.spp")
# Choose an export preset to use (see substance_painter.resource). This
# step is not mandatory as you can alternatively describe the export
# preset entirely in JSON (see the full example at the bottom of the
# page).
# Note: in this example the preset file format and bit depth are
# overridden below for '03_Base', but otherwise follow the export preset
# configuration.
import substance_painter.resource
export_preset = substance_painter.resource.ResourceID(
context="starter_assets", name="Arnold (AiStandard)")
# Set the details of the export (a comprehensive example of all the
# configuration options is presented at the bottom of the page):
export_config = {
"exportShaderParams": False,
"exportPath": "C:/export",
"defaultExportPreset" : export_preset.url(),
"exportList": [
{
"rootPath": "01_Head"
},
{
"rootPath": "02_Body"
},
{
"rootPath": "03_Base"
}],
"exportParameters": [
# No filters: those parameters apply to all exported maps
{
"parameters": {
"dithering": True,
"paddingAlgorithm": "infinite"
}
},
# Force file format and bitDepth for all maps in '03_Base'
{
"filter": {"dataPaths": ["03_Base"]},
"parameters": {
"fileFormat" : "png",
"bitDepth" : "8"
}
},
# Force 2K size for all maps in '01_Head'
{
"filter": {"dataPaths": ["01_Head"]},
"parameters": {
"sizeLog2": 11
}
}]
}
# Display the list of textures that should be exported, according to the
# configuration:
export_list = substance_painter.export.list_project_textures(export_config)
for k,v in export_list.items():
print("Stack {0}:".format(k))
for to_export in v:
print(to_export)
# Actual export operation:
export_result = substance_painter.export.export_project_textures(export_config)
# In case of error, display a human readable message:
if export_result.status != substance_painter.export.ExportStatus.Success:
print(export_result.message)
# Display the details of what was exported:
for k,v in export_result.textures.items():
print("Stack {0}:".format(k))
for exported in v:
print(exported)
substance_painter.export.get_default_export_path() -> str substance_painter.export.get_default_export_path
텍스처 내보내기에 사용되는 응용 프로그램 기본 내보내기 경로를 가져옵니다. 이 경로는 프로젝트에 종속되지 않으며 새 프로젝트를 만들 때 사용되는 기본값입니다.
반환: 응용 프로그램의 기본 내보내기 경로입니다.
반환 형식: str
class substance_painter.export.PredefinedExportPreset(name: str, url: str) substance_painter.export.PredefinedExportPreset
내보내기 사전 설정(출력 템플릿)은 내보내기 프로세스의 동작을 제어합니다. 미리 정의된 사전 설정에는 프로젝트에 따라 내보내지는 맵의 동적 목록이 있으며 사용자 정의 데이터(예: glTF)를 생성하는 사전/사후 프로세스가 있을 수 있습니다. 이 유형의 내보내기 사전 설정은 응용 프로그램에 포함되어 있으며 편집할 수 없습니다.
예:
import substance_painter.export
import substance_painter.project
import substance_painter.textureset
# A project needs to be opened to introspect the output maps of a predefined export preset
substance_painter.project.open("C:/projects/MeetMat.spp")
# Retrieve all predefined export presets
predefined_presets = substance_painter.export.list_predefined_export_presets()
# Retrieve data of the first preset
predefined_preset = predefined_presets[0]
print("Name: " + predefined_preset.name + ", url: " + predefined_preset.url)
stack = substance_painter.textureset.get_active_stack()
print(predefined_preset.list_output_maps(stack))
매개 변수:
- 이름 (str) - 사전 설정의 이름입니다.
- url (str) - 사전 설정의 URL입니다.
list_output_maps(스택: 스택) -> list substance_painter.export.PredefinedExportPreset.list_output_maps
지정된 스택에서 사용 가능한 채널을 기반으로 출력 맵 목록을 가져옵니다. 출력 맵의 형식이 JSON 구성의 maps 목록과 같습니다.
매개 변수: 스택(substance_painter.textureset.Stack) - 출력 맵을 가져올 스택입니다.
반환:
지정된 스택에서 사용할 수 있는 채널의 출력 맵 목록입니다. 출력 맵의 형식이 JSON 구성의 maps 목록과 같습니다. JSON 구성을 참조하세요.
반환 형식: dict
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ValueError - 지정된 스택이 잘못된 경우.
substance_painter.texturesetsubstance_painter.export.list_predefined_export_presets() -> List[PredefinedExportPreset] substance_painter.export.list_predefined_export_presets
미리 정의된 내보내기 사전 설정(출력 템플릿) 목록을 가져옵니다.
반환: 미리 정의된 내보내기 사전 설정 목록입니다.
반환 형식: 목록[PredefinedExportPreset]
PredefinedExportPreset의 예class substance_painter.export.ResourceExportPreset(resource_id: ResourceID) substance_painter.export.ResourceExportPreset
내보내기 사전 설정(출력 템플릿)은 내보내기 프로세스의 동작을 제어합니다. 셸프 내보내기 사전 설정은 Export substance_painter.resource.Type을(를) 사용하는 리소스입니다. UI를 통해 사용자에 의해 수정될 수 있습니다.
예:
import substance_painter.export
import substance_painter.project
substance_painter.project.open("C:/projects/MeetMat.spp")
# Retrieve all resource export presets
resource_presets = substance_painter.export.list_resource_export_presets()
# Retrieve PBR Metalllic Roughness export preset
preset = ""
match = "PBR Metallic Roughness"
for resource_preset in resource_presets :
if resource_preset.resource_id.name == "PBR Metallic Roughness":
print("Name: {}, url: {}".format(
resource_preset.resource_id.name,
resource_preset.resource_id.url()))
preset = resource_preset
break
maps = preset.list_output_maps()
# Add new output map 2D View
maps.append({
'channels': [{
'destChannel': 'R',
'srcChannel': 'R',
'srcMapName': 'View_2D',
'srcMapType': 'virtualMap',
'srcPath': ''
}, {
'destChannel': 'G',
'srcChannel': 'G',
'srcMapName': 'View_2D',
'srcMapType': 'virtualMap',
'srcPath': ''
}, {
'destChannel': 'B',
'srcChannel': 'B',
'srcMapName': 'View_2D',
'srcMapType': 'virtualMap',
'srcPath': ''
}, {
'destChannel': 'A',
'srcChannel': 'A',
'srcMapName': 'View_2D',
'srcMapType': 'virtualMap',
'srcPath': ''
}],
'fileName':
'$mesh_$textureSet_2D_View',
'parameters': {
'bitDepth': '8',
'dithering': False,
'fileFormat': 'png'
}
})
# Create a new preset
newPresetName = "PBR Metallic Roughness 2D View"
newPreset = {
"name": newPresetName,
"maps": maps
}
# Use the preset in the export configuration
export_config = {
"exportShaderParams": False,
"exportPath": "C:/export",
"defaultExportPreset" : newPresetName,
"exportPresets": [newPreset],
"exportList": [
{
"rootPath": "01_Head"
},
{
"rootPath": "02_Body"
},
{
"rootPath": "03_Base"
}],
"exportParameters": [
{
"parameters": {
"dithering": True,
"paddingAlgorithm": "infinite"
}
}]
}
substance_painter.export.export_project_textures(export_config)
매개 변수: 리소스_id(리소스 ID) - 내보내기 사전 설정의 리소스 ID입니다.
substance_painter.resource, 내보내기 사전 설정 만들기.list_output_maps() -> list substance_painter.export.ResourceExportPreset.list_output_maps
지정된 사전 설정에 대한 출력 맵 목록을 가져옵니다. 출력 맵의 형식이 JSON 구성의 maps 목록과 같습니다.
반환:
지정된 사전 설정에 대한 출력 맵 목록입니다. 출력 맵의 형식이 JSON 구성의 maps 목록과 같습니다. JSON 구성을 참조하세요.
반환 형식: dict
발생: ValueError - 지정된 사전 설정이 잘못된 경우.
substance_painter.export.list_resource_export_presets() -> List[ResourceExportPreset] substance_painter.export.list_resource_export_presets
내보내기 사전 설정(출력 템플릿) 목록을 가져옵니다. 이 목록에는 셸프에서 사용할 수 있는 모든 내보내기 사전 설정(기본적으로 제공되는 사전 설정 및 있는 경우 사용자 정의 사전 설정)이 포함되어 있습니다.
반환: 내보내기 사전 설정의 목록입니다.
반환 유형: 목록[ResourceExportPreset]
ResourceExportPreset의 예전체 json_config dict 가능성
{
// Path to the root folder where texture files will be exported.
"exportPath": "C:/export",
// Whether to export shader instances to a JSON file.
"exportShaderParams": true,
// (optional) Export preset to be used when no export preset is provided in
// "exportList.exportPreset".
// The value can be the name of a preset defined in the "exportPresets" part
// of the configuration JSON:
"defaultExportPreset": "preset1",
// Alternatively the value can be a URL to an existing preset file (see
// substance_painter.resource) listed in the export dialog:
// "defaultExportPreset" : substance_painter.resource.ResourceID(
// context="starter_assets",
// name="PBR Metallic Roughness").url(),
// (optional) List of export presets definitions.
"exportPresets": [
{
// Defines the name of the export preset. This name can be referenced in
// "defaultExportPreset" and/or "exportList.exportPreset".
"name": "preset1",
// List of maps making up this export preset.
"maps": [
{
// Filename of the texture file written to disk; may contain wildcards
// resolved at export time.
// (e.g. "$project_$mesh_$textureSet_$udim_$sceneMaterial_BaseColor")
//
// $colorSpace: Current color space.
// $mesh: Filename of the imported mesh.
// $project: Project name.
// $sceneMaterial: Current material name, as found in the imported
// mesh.
// $textureSet: Current Texture Set.
// $udim: Current UV Tile (e.g. 1001).
// $uvTileName: Current UV Tile name.
"fileName": "$textureSet_color",
// List of source/destination defining which channels will make up the
// texture file.
"channels": [
{
// Channel to write to.
// L (Luminance), R (Red), G (Green), B (Blue), A (Alpha)
//
// In addition to alpha channel, either R+G+B must be specified, or
// either L only.
"destChannel": "R",
// Channel to read from.
// L, R, G, B, A
//
// When the source map is color, L will generate a mix of R+G+B.
"srcChannel": "R",
// The type of map to read from:
// documentMap: Maps present in the document (e.g. "baseColor").
// meshMap: Baked mesh maps (e.g. "normal").
// virtualMap: Generated map (e.g. "f0").
// defaultMap: Constant color (e.g. "black").
"srcMapType": "documentMap",
// Name of the map of type scrMapType.
//
// For type documentMap:
// basecolor, height, specular, opacity, emissive, displacement,
// glossiness, roughness, anisotropylevel, anisotropyangle,
// transmissive, scattering, reflection, ior, metallic, normal,
// ambientOcclusion, diffuse, specularlevel, blendingmask, user0,
// user1, user2, user3, user4, user5, user6, user7.
//
// For type meshMap:
// ambient_occlusion, id, curvature, normal_base,
// world_space_normals, position, thickness.
//
// For type virtualMap:
// Normal_OpenGL, Normal_DirectX, AO_Mixed, Diffuse, Specular,
// Glossiness, Unity4Diff, Unity4Gloss, reflection, 1/ior,
// Glossiness2, f0, View_2D.
//
// For type defaultMap:
// black, white.
"srcMapName": "baseColor"
}
],
// (optional) Export parameters to be used for this export preset map.
//
// When "parameters" is not provided, the existing parameters are used.
// When "parameters" is provided, it overrides the existing parameters.
//
// Each individual parameter is optional and, when defined, overrides
// previously defined parameters. See in exportList.parameters how the
// rules are applied.
//
// It is important to understand that even though this section is
// optional, if after evaluating all the rules some parameters remain
// undefined, the configuration is invalid.
"parameters": {
// (optional) File format (and file extension) of the generated
// texture file.
"fileFormat": "png",
// (optional) Bit depth.
//
// The bit depth must be supported by the file format.
"bitDepth": "16",
// (optional) Whether to use dithering.
"dithering": False,
// (optional) Size of the texture file in log2.
// (i.e. 10 means 2^10 = 1024)
//
// When "sizeLog2" is not provided, the texture size from the project
// is used.
//
// It can either be a single integer, or an array of two integers.
//
// If it's a single integer, it represents the biggest of width and
// height, and will maintain the aspect ratio.
// (i.e. 10 means a 2048x4086 map will be exported as 512x1024)
//
// If it's an array of two integers, the original aspect ratio will be
// ignored.
// (i.e. [10, 12] means a 2048x4086 map will be exported as 1024x4096)
"sizeLog2": 10,
// (optional) Padding algorithm used to fill holes in rendered
// texture.
//
// The possible values are:
// passthrough, color, transparent, diffusion, infinite.
"paddingAlgorithm": "diffusion",
// (optional) When padding algorithm needs it, distance in pixels used
// by the padding algorithm.
//
// Dilation distance is needed for transparent, color and diffusion
// padding algorithms.
"dilationDistance": 16
}
}
]
}
],
// List of subparts of the document to export.
"exportList": [
{
// Root path of the document structure this subpart applies to.
//
// For Texture Sets without stacks, this is a Texture Set name.
// (e.g. "O1_Head")
// For Texture Sets with stacks, this is Texture Set name + stack name
// separated by /
"rootPath": "02_Body/Mask",
// (optional) In the selected rootPath, which maps to export.
//
// When "filter" is not provided, export everything.
"filter": {
// Which maps to export, as an array of map names.
//
// The map names are to be used as defined in
// exportPresets.maps.fileName, including wildcards.
// (e.g. ["$textureSet_color", "$textureSet_normal"])
"outputMaps": [
"$textureSet_color"
],
// Which UV Tiles to export, as an array of tile coordinates.
// A tile coordinate is a 2 dimensional array of U and V coordinates.
// (e.g. [[1, 1], [1, 2]] to export tiles U=1, V=1 and U=1, V=2)
"uvTiles": [
[
1,
1
]
]
},
// (optional) Export preset to use. If undefined, fall back to
// "defaultExportPreset" value.
// The value can be the name of a preset defined in "exportPresets":
"exportPreset": "preset1"
// Alternatively the value can be a URL to an existing preset file (see
// substance_painter.resource) listed in the export dialog:
// "defaultExportPreset" : substance_painter.resource.ResourceID(
// context="starter_assets",
// name="PBR Metallic Roughness").url(),
}
],
// List of rules used to override export parameters of texture files.
//
// For each exported texture file, the export process will go through this
// list, in the order they are provided, to override export parameters.
// Available export parameters are:
// fileFormat, bitDepth, dithering, sizeLog2, paddingAlgorithm and
// dilationDistance.
// (see exportPresets.map.parameters)
//
// For each possible export parameter of each texture file:
// First, the parameter is initialized with the value provided by the
// exportPreset.maps.parameters, if any.
// Then, the export process iterates the rules of exportParameters and tries
// to match the texture file with the filter.
// If the filter matches, the parameter is overridden by this rule, else it
// stays untouched.
//
// At the end of the process, every parameter of every texture file must be
// defined for the export process to be able to continue.
// To achieve this, a good practice may be to define a default value for all
// the parameters:
// - For each preset map
// - With a global exportParameters rule using a filter that always matches
"exportParameters": [
{
// (optional) Select which texture files match the current rule.
// (i.e. for which texture files this rule will override parameters)
//
// When "filter" is not provided, select everything.
//
// Examples:
// Filter that matches all:
// "filter" : {}
//
// Filter that matches some Texture Sets:
// "filter" : {"dataPaths": ["01_Head", "02_Body"]}
//
// Filter that matches some outputMaps:
// "filter" : {"outputMaps": ["$textureSet_color"]}
//
// Filter that matches nothing:
// "filter" : {"dataPaths": []}
//
// Use of a combined filter to match a Texture Set for some
// outputMaps:
// "filter" : {"dataPaths": ["01_Head"],
// "outputMaps" : ["$textureSet_color"]}
"filter": {
// List of rootPaths to match.
//
// This can be a mix of:
// - Texture Set names only, even for Texture Sets with stacks
// - Stack names, when stacks are used
"dataPaths": [
"01_Head",
"02_Body/Mask"
],
// List of map names to match.
//
// The map names are to be used as defined in "exportPresets.maps.fileName",
// including wildcards.
"outputMaps": [
"$textureSet_color"
],
// List of UV Tiles to match, as an array of tile coordinates.
// A tile coordinate is a 2 dimensional array of U and V coordinates.
// (e.g. [[1, 1], [1, 2]] to export tiles U=1, V=1 and U=1, V=2)
"uvTiles": [
[
1,
1
]
]
},
// (optional) Parameters to apply to the matched texture files as per the
// current rule.
//
// When "parameters" is not provided, the existing parameters are used.
// When "parameters" is provided, it overrides the existing parameters.
//
// Each individual parameter is optional and, when defined, overrides
// previously defined parameters (coming from the selected preset).
//
// It is important to understand that even though this section is
// optional, if after evaluating all the rules some parameters remain
// undefined, the configuration is invalid.
//
// In this example, we're setting a different texture size for the color
// map of both 01_Head and 02_Body/Mask, leaving settings on maps and
// other data paths, and leaving the other parameters untouched.
"parameters": {
"sizeLog2": 11
}
}
]
}
이벤트
Python API 또는 UI를 통해 시작된 텍스처 내보내기는 다음 이벤트를 트리거할 수 있습니다. 자세한 내용은 substance_painter.event을(를) 참조하십시오.
class substance_painter.event.ExportTexturesAboutToStart(텍스처: Dict[Tuple[str, str], List[str]])
이벤트가 텍스처 내보내기 직전에 트리거되었습니다.
매개 변수:
텍스처 (Dict [ 튜플 [ str**, str*] ,* 목록*[ str ]]*) - 디스크에 쓸 텍스처 파일의 목록으로, 스택별로 그룹화됩니다(텍스처 집합 이름, 스택 이름).
class substance_painter.event.ExportTexturesEnded(status: ExportStatus, message: str, 텍스처: Dict[Tuple[str, str], List[str]])
텍스처 내보내기가 완료된 후 이벤트가 트리거됩니다.
매개 변수:
- 상태(ExportStatus) - 상태 코드.
- 메시지(str) - 사람이 읽을 수 있는 상태 메시지입니다.
- 텍스처 (Dict [ 튜플 [ str**, str*] ,* 목록*[ str ]]*) - 디스크에 작성된 텍스처 파일의 목록으로, 스택별로 그룹화됩니다(텍스처 집합 이름, 스택 이름).
메시 내보내기
substance_painter.export.scene_is_triangulated() -> bool substance_painter.export.scene_is_triangulated
장면에 삼각형(면이 3개뿐인 다각형)만 있는지 확인합니다.
반환: 현재 장면에 삼각형만 있으면 True이고, 그렇지 않으면 False입니다.
반환 형식: bool
발생: 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
substance_painter.export.scene_has_tessellation() -> bool substance_painter.export.scene_has_tessellation
장면에 변위/테셀레이션이 활성화되어 있는지 확인합니다.
반환: 현재 장면에 변위/테셀레이션이 있으면 True이고, 그렇지 않으면 False입니다.
반환 형식: bool
발생: 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
class substance_painter.export.MeshExportOption(value) substance_painter.export.MeshExportOption
메시 내보내기에 사용할 수 있는 옵션입니다.
구성원:
BaseMeshTriangulatedMeshTessellationNormalsBaseMeshTessellationRecomputeNormalsclass substance_painter.export.MeshExportResult(status: ExportStatus, message: str) substance_painter.export.MeshExportResult
메시 내보내기 프로세스의 결과
매개 변수:
- 상태(ExportStatus) - 상태 코드.
- 메시지(str) - 사람이 읽을 수 있는 상태 메시지입니다.
substance_painter.export.export_mesh(file_path: str, option: MeshExportOption) -> MeshExportResult substance_painter.export.export_mesh
현재 메시를 지정된 파일 경로로 내보냅니다.
매개 변수:
- 파일_경로(문자열) - 메시를 내보낼 전체 파일 경로입니다. 파일 형식은 확장명에서 추론됩니다. 지원되는 확장:
.usd,.obj,.fbx,.dae,.ply,.gltf. - 옵션(MeshExportOption) - 사용할 내보내기 옵션입니다.
반환: 내보내기 프로세스의 결과.
반환 형식: MeshExportResult
상승:
- 프로젝트 오류 - 프로젝트가 열려 있지 않은 경우.
- ValueError -
file_path또는option이(가) 현재 프로젝트의 컨텍스트에서 잘못된 경우. 문제를 자세히 설명하는 사람이 읽을 수 있는 메시지가 포함되어 있습니다.
예:
import substance_painter.export
# Open a project we want to export from (see substance_painter.project
# for details). This step is not necessary if there is already a project
# opened in Substance 3D Painter.
import substance_painter.project
substance_painter.project.open("C:/projects/MeetMat.spp")
# Choose an export option to use
export_option = substance_painter.export.MeshExportOption.BaseMesh
if not substance_painter.export.scene_is_triangulated():
export_option = substance_painter.export.MeshExportOption.TriangulatedMesh
if substance_painter.export.scene_has_tessellation():
export_option = substance_painter.export.MeshExportOption.TessellationNormalsBaseMesh
# Actual export mesh operation:
filename = "C:/projects/MeetMat.obj"
export_result = substance_painter.export.export_mesh(filename, export_option)
# In case of error, display a human readable message:
if export_result.status != substance_painter.export.ExportStatus.Success:
print(export_result.message)
substance_painter.project, 문서 내보내기.