You have it right, you should be able to switch render targets with the drop down.

Jason
octane.GT_STANDARD = 1
.findItemsByName
works correctly. The logic in your script doesn't look correct. I've annotated what I think is botched in case of selecting the graph rt3 in Bepe's example:Code: Select all
-- See if we are working with a graph, if so then pull the first render target from it.
local currSelection = octane.project.getSelection()[1]
local foundTarget
if currSelection:getProperties().isGraph then
-- THOMAS: here, foundTarget is the string "rt3"
foundTarget = currSelection:findNodes(octane.NT_RENDERTARGET, true)[1]:getProperties().name
print(foundTarget)
else
foundTarget = nil
end
-- THOMAS snip, ...
function getSceneCopy(renderTarget)
print("getSceneCopy", renderTarget)
-- get the selected render target
local selectedRt
if renderTarget then
-- THOMAS: here we search for the name "rt3" in the root graph there recursive searching will return 2 items
-- the graph named "rt3" and the render target named "rt3". It all depends on how lucky you are? Do you feel lucky Today?
selectedRt = octane.nodegraph.getRootGraph():findItemsByName(renderTarget, true)[1]
else
selectedRt = octane.project.getSelection()[1]
end
Code: Select all
-- See if we are working with a graph, if so then pull the first render target from it.
local currSelection = octane.project.getSelection()[1]
local foundTarget
if currSelection:getProperties().isGraph then
-- THOMAS: don't take just the name but the actual node. When in doubt always take the node and run. Names are ambiguous.
foundTarget = currSelection:findNodes(octane.NT_RENDERTARGET, true)[1]
else
foundTarget = nil
end
function getSceneCopy(renderTarget)
-- get the selected render target
local selectedRt
if renderTarget then
-- THOMAS: just pull the rt from the graph as before
selectedRt = renderTarget
else
selectedRt = octane.project.getSelection()[1]
end
getSceneCopy
expects nil or a string. Sorry about that targetDropDownCallback
a lot simpler.I use the pano camera all the time, granted not as useful with turntable animations at FOV 360 degrees but can be quite nice at FOV 180 degrees.stratified wrote:There's no reason why it wouldn't work with a panoramic camera besides the fact that it might look funky.