EyeonTips:Script/Reference/Applications/Fusion/Classes/GLView

From VFXPedia

< EyeonTips:Script
Revision as of 20:37, 30 December 2011 by Tilt (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  • Each ChildFrame (i.e. composition window) has at least a left and a right view, represented by GLView objects. To reach one of these, use something like this:
-- .Left will return the left preview object, the GLView object can be reached via .View
comp:GetPreviewList().Left.View

or this:

comp.CurrentFrame.LeftView
  • The view object - as described above - has methods that deal with general properties of the view, like enabling the sub views or switching between the A & B buffers.
  • Each buffer can in turn contain a viewer, represented by either GLViewer or GLImageViewer objects. Use a view's :GetViewerList() method or .CurrentViewer to reach these objects. They provides further methods specific to a single display buffer like showing guides, enabling LUTs or switching color channels:
-- switch to A buffer and show the red channel
left = comp.CurrentFrame.LeftView
left:SetBuffer(0)
if left.CurrentViewer ~= nil then
   left.CurrentViewer:SetChannel(0)
   left.CurrentViewer:Redraw()
end