[Closed] State Sets Composite View
I’m working on a script that creates reflection and shadow states for each object in a scene then composite’s them in composite view so that I can then save the renders as a PSD file.
I’ve gotten though all the sates creation and material assignments. I’m getting stuck with composite view. I can’t find anything in the documentation other than masterState.CreateCompositingView true.
By using MacroRecorder I was able to build this:
for i = 1 to rootScene.StateSetsAnchor[#14].layername.count do (
layerName = (findString rootScene.StateSetsAnchor[#14].layername[i] "AO" )
if layerName != undefined then (
print i
print rootScene.StateSetsAnchor[#14].layername[i]
rootScene.StateSetsAnchor[#14].blendMode[i] = 5
rootScene.StateSetsAnchor[#14].opacity[i] = 75
)
else
(
)
)
So this will look for any of my AO or ambient occlusion layers and set them to multiply and the opacity to 75. The problems is that rootScene.StateSetsAnchor[#14] is only [#14] in my current scene. In other scenes its been [#0] or [#114]. So how can I access this in any scene?
This seems to work. Anybody have any other ideas?
found = false
count=1
while found == false do
(
if rootScene.StateSetsAnchor[count].value as string == "Compositor Output:Composite" then
(
found = true
)
else
(
count = count+1
)
)
stateSets.ShowMainFrame()