Question
Different resolution for different maps via Python API
I am trying to export different resolution for different map instead of texture set resolution but I am unable to figure out what should be actual settings for export via python. ( The below code only consider the first resolution override for each texture set )
Here is my sample code :
from substance_painter import export
export_config = {
"exportShaderParams": False,
"exportPath": "",
"exportUSD": False,
"defaultExportPreset": "custom_export",
"exportPresets": [
{
"name": "custom_export",
"maps": [
{
"channels": [
{
"destChannel": "L",
"srcChannel": "L",
"srcMapName": "roughness",
"srcMapType": "documentMap",
"srcPath": ""
}
],
"fileName": "$textureset_4K_roughness(.$udim)",
"parameters": {
"bitDepth": "8",
"dithering": False,
"fileFormat": "png",
"sizeLog2": [
12,
12
]
}
},
{
"channels": [
{
"destChannel": "R",
"srcChannel": "R",
"srcMapName": "basecolor",
"srcMapType": "documentMap",
"srcPath": ""
},
{
"destChannel": "G",
"srcChannel": "G",
"srcMapName": "basecolor",
"srcMapType": "documentMap",
"srcPath": ""
},
{
"destChannel": "B",
"srcChannel": "B",
"srcMapName": "basecolor",
"srcMapType": "documentMap",
"srcPath": ""
}
],
"fileName": "$textureset_1K_diffuse_color(.$udim)",
"parameters": {
"bitDepth": "8",
"dithering": False,
"fileFormat": "png",
"sizeLog2": [
11,
11
]
}
},
]
}
],
"exportList": [
{
"rootPath": "texture_set1",
},
],
"exportParameters": [
{
"parameters": {
"paddingAlgorithm": "infinite",
}
}
]
}
result = export.export_project_textures( export_config )
print( result )