Copy link to clipboard
Copied
I am trying to use the API to automate processing of a directory containing some images. I need to set the category under the "basic parameters" section. How can this be accomplished?
Hi,
Here is how you can achieve that :
import substance_sampler as ssa
def main():
asset = ssa.get_selected_asset()
image_to_material_layer = asset.get_layers()[2]
category_parameter = [l for l in image_to_material_layer.parameters if l.identifier == "category"][0]
category_parameter.value = 0 # 0 for Ceramic => it is the index in the list of categories
if __name__ == '__main__':
main()
If you are searching for other methods, you can consult the Python API documentation. He
...Copy link to clipboard
Copied
Hi,
Here is how you can achieve that :
import substance_sampler as ssa
def main():
asset = ssa.get_selected_asset()
image_to_material_layer = asset.get_layers()[2]
category_parameter = [l for l in image_to_material_layer.parameters if l.identifier == "category"][0]
category_parameter.value = 0 # 0 for Ceramic => it is the index in the list of categories
if __name__ == '__main__':
main()
If you are searching for other methods, you can consult the Python API documentation. Here is how to access it:
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more