As the title suggests, my question here is pretty straight forward. And I have a screenshot attached to show you what I'm getting after.
I'm dealing with materials that are created on the fly and mapped into Octane Materials via the Unity Standard shader. In doing so, the nodes seem to get set up as shown in my screenshot. A Geometry and a series of Node Graphs get fed, as input, into a Material Mapper node. All of that makes sense. But, I need to be able to get to the Node Graph inputs for the Material Mapper so I can tweak values on them. Nothing I have tried appears to work for me. Below is a code snippet that got me 'closest'. Any suggestions you might have are greatly appreciated. Thank you in advance.
- Code: Select all
-- I have tried this.
nodes = octane.nodegraph.findNodes(octane.project.getSceneGraph(), octane.NT_MAT_MAP, true);
for i,entry in ipairs(nodes) do
print(entry)
for s=1,entry.pinCount do
print(octane.node.getPinValueIx(entry,s))
end
end
-- I have also tried this
nodes = octane.nodegraph.findNodes(octane.project.getSceneGraph(), octane.NT_MAT_MAP, true);
for i,entry in ipairs(nodes) do
print(entry)
for n,name in pairs(entry.pinNames) do -- have tried with ipairs and pairs
print(octane.node.getPinValue(entry,name))
end
end
The error I get back is as follows "[string "test.lua"]:15: Cannot get connected attribute via pin.". I feel like this should be a pretty trivial task, but the whole thing has given me quite a headache. Please let me know if there is any more information I can provide to help in resolving this!
Unity version 2019.2.5f1
Octane version 2019.1 (6000100)
renderer version 1.2.0.1376