I have the following situation illustrated at end of post.
I am successfully looping through the material pins on a mesh node, identifying there type and getting some information. I was surprised I did not need to do anything specific to tell octane to look for external materials nodes connected to a pin. However I cannot seem to get to the texture file information from any node. Can someone please point me in the right direction. Current routine is included below.
--if node type is glossy
if internalMatNode.type == octane.NT_MAT_GLOSSY then
print (" ")
print("Glossy Material")
print ("----------------------------------")
-- get the diffuse pin values
tblDiffuseValues = internalMatNode:getPinValue(octane.P_DIFFUSE)
print ("Diffuse Pin Values For: " ..internalMatNode.name)
for k, v in pairs(tblDiffuseValues) do
print(k, v)
end
-- if pin has an image, get image file name
-- first determine if another node is attatched
local inputNodeA =internalMatNode:getConnectedNode(octane.P_DIFFUSE)
print ("Glossy input a",inputnodeA)
local inputNodeB =internalMatNode:getConnectedNodeIx(pinIx)
print ("Glossy input b",inputnodeB)
local inputNodeC =internalMatNode:getInputNode(octane.P_SPECULAR)
print ("Glossy input c",inputnodeC)
local inputNodeD =internalMatNode:getInputNodeIx(pinIx)
print ("Glossy input d",inputnodeD)
local inputNodeE =internalMatNode:getOwnedItemIx(pinIx)
print ("Glossy input e",inputnodeE)
local inputNodes =internalMatNode:getInputNodes()
for k, v in pairs(inputNodes) do
print(k, v)
end
-- get the specular pin values
tblSpecularValues = internalMatNode:getPinValue(octane.P_SPECULAR)
print ("Specular Pin Values For: " ..internalMatNode.name)
for k, v in pairs( tblSpecularValues) do
print(k, v)
end
-- if pin has an image, get image file name, check if pin has an inputnode
-- get the opacity pin values
tblOpacityValues = internalMatNode:getPinValue(octane.P_OPACITY)
print ("Opacity Pin Values For: " ..internalMatNode.name)
for k, v in pairs(tblOpacityValues) do
print(k, v)
end
-- if pin has an image, get image file name
-- get the Normal pin values
tblNormalValues = internalMatNode:getPinValue(octane.P_NORMAL)
print ("Normal Pin Values For: " ..internalMatNode.name)
for k, v in pairs(tblNormalValues) do
print(k, v)
end
-- if pin has an image, get image file name
-- get the Bump pin values
tblBumpValues = internalMatNode:getPinValue(octane.P_BUMP)
print ("Bump Pin Values For: " ..internalMatNode.name)
for k, v in pairs(tblBumpValues) do
print(k, v)
end
-- if pin has an image, get image file name
end
thx
mark