Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - nikita_shpakov

Pages: [1]
Hi everyone! I'm a newbie at substance designer scripting, and the lack of examples drives me crazy :(
For example, I have a graph which converts resources from PBR to our custom Blinn Phong (convert multiple inputs to one diffuse), and I want to run this graph on hundreds of resources. I've created some script that will collect all the data, substitute it, and save results in corresponding folders, but I have a huge problem figuring out how to substitute the graph's values. I tried setting values inside my graph (by setting values of SDProperties from SDPropertyCategory.Output of each Input) (InsideToPhong.png/py). I tried setting values outside of my graph (by setting values of SDProperties from SDPropertyCategory.Input of ToPhong node) (OutsideOfToPhong.png/py), but I always get the same error:
Code: [Select]
[ERR][3]Traceback (most recent call last):
[ERR][4]  File "D:/SubstanceScripts/", line 106, in <module>
[ERR][7]  File "D:/SubstanceScripts/", line 92, in run
[ERR][9]computeToPbr(decalpathes[0], sbsCompGraph)
[ERR][10]  File "D:/SubstanceScripts/", line 46, in computeToPbr
[ERR][12]setTextureById(sbsCompGraph, 'BaseColor', baseColorTex)
[ERR][13]  File "D:/SubstanceScripts/", line 32, in setTextureById
[ERR][15]tex.setPropertyValue(prop, sdvaluetexture)
[ERR][16]  File "C:/Program Files/Allegorithmic/Substance Designer/resources/python\sd\api\", line 157, in setPropertyValue
[ERR][18]raise APIException(SDApiError(_res))

How to achieve the desired behavior? I do believe that there also has to be a much more elegant way of handling this. Any help would be appreciated!

Pages: [1]