Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I would like to apply a substance preset (.sbsprs) using the python API. I can use c4d.CallCommand(1038417) to open the Substance asset manager but it just opens up file explorer to allow me to select and apply a .sbsprs file. I want to be able to run my script with no user input (just a hardcoded filepath to the substance preset file). Is it possible to apply the substance preset using just python?
I am using Cinema 4D R23.110 and Redshift. Thanks!
Hi,
Please use our guidelines and use the forum functionalities to mark your thread as a question. Thanks for tagging your post
while we have a module for substance available in python it is not possible to apply presets with it (without dialog). Even with C++ it's not possible
But Substance asset are BaseList2D so you can change the parameters:
substance = c4d.modules.substance.GetFirstSubstance(doc) if substance is None: raise RuntimeError("Failed to retrieve the first substance (most likely there is no substance).") #change the resolution to 16x16 substance[10000] = 4 substance[10001] = 4 c4d.EventAdd()
Cheers, Manuel
Sorry forgot to say I'm using the Script Manager and Windows 10 Pro 2004.
Thank you for letting me know
Hello @janine-mcmaster,
without further questions or replies, we will consider this topic as solved by Monday, the 30th and flag it accordingly.
Thank you for your understanding, Ferdinand