Copy link to clipboard
Copied
Hi,
For example :
Hello @Bjorn_AltaVR,
Thanks for the question.
All the Atomic Nodes can be created from the way you mentionned upthere. You'll find the entire list under
Help > Scripting Documentation > Modules definition > sbs::compositing
For instance nodes, this will require to locate and open the package file, find the desired graph, create a node and close the package:
import sd
# from sd.api import sdproperty
app = sd.getContext().getSDApplication()
# Get managers
ui_mgr = app.getQtF
Copy link to clipboard
Copied
Hello @Bjorn_AltaVR,
Thanks for the question.
All the Atomic Nodes can be created from the way you mentionned upthere. You'll find the entire list under
Help > Scripting Documentation > Modules definition > sbs::compositing
For instance nodes, this will require to locate and open the package file, find the desired graph, create a node and close the package:
import sd
# from sd.api import sdproperty
app = sd.getContext().getSDApplication()
# Get managers
ui_mgr = app.getQtForPythonUIMgr()
pkg_mgr = app.getPackageMgr()
# Get current graph
graph = ui_mgr.getCurrentGraph()
# Load target package
my_package = pkg_mgr.loadUserPackage("D:/OneDrive - Adobe/test_files/sbsar/test/tst-islands.sbsar")
print(my_package.getFilePath())
# Find target graph resource in target package
for item in my_package.getChildrenResources(isRecursive=True😞
if item.getIdentifier() == "test_islands":
tgt_resource = item
# Create nodes
my_levels_node = graph.newNode("sbs::compositing::levels")
my_instance_node = graph.newInstanceNode(tgt_resource)
# Close target package
pkg_mgr.unloadUserPackage(my_package)
Same thing goes for .SBSAR
Best regards,
Copy link to clipboard
Copied
Perfect, thank you very much.
One more question, do you know how to expose parameters like this through Python ? Thank you