Created
July 7, 2020 06:34
-
-
Save oktomus/2d8fc8dfe0bbbbda12143f65a4f4ff02 to your computer and use it in GitHub Desktop.
Substance Designer Scripting utils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sd | |
def print_selected_nodes_properties(): | |
"""Show all inputs and outputs of a node.""" | |
context = sd.getContext() | |
app = context.getSDApplication() | |
packageMgr = app.getPackageMgr() | |
uiMgr = app.getQtForPythonUIMgr() | |
node = uiMgr.getCurrentGraphSelection()[0] | |
print("Inputs...") | |
for nodeInput in node.getProperties(SDPropertyCategory.Input): | |
print(nodeInput.getId()) | |
print("Outputs...") | |
for nodeOutput in node.getProperties(SDPropertyCategory.Output): | |
print(nodeOutput.getId()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment