------------------------------------------------------ -- Finds all savers in the comp allows you to enable / -- disable them with checkboxes, Revision: 1.0 -- -- place in Fusion:/Scripts/Comp/AT -- -- Written by Matthew Irwin (mirwin[REMOVE-ME]@anatomicaltravel.com) -- Create: Sep 20, 2007 -- Copyright (c) 2007 Anatomical Travelogue LLC -- (http://www.anatomicaltravel.com/research) -- The authors hereby grant permission to use, copy, and distribute this -- software and its documentation for any purpose, provided that existing -- copyright notices are retained in all copies and that this notice is -- included verbatim in any distributions. Additionally, the authors grant -- permission to modify this software and its documentation for any -- purpose, provided that such modifications are not distributed without -- the explicit consent of the authors and that existing copyright notices -- are retained in all copies. -- IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR -- DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING -- OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES -- THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF -- SUCH DAMAGE. -- THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, -- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND -- DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, -- UPDATES, ENHANCEMENTS, OR MODIFICATIONS. ------------------------------------------------------ toollist = composition:GetToolList(false) CheckboxList = {} for i, tool in toollist do tool_a = tool:GetAttrs() if tool_a.TOOLS_RegID == "Saver" then if tool_a.TOOLB_PassThrough == true then curEnabled=0 else curEnabled=1 end if tool_a.TOOLST_Clip_Name[1]=="" then CheckboxList[i]={tool_a.TOOLS_Name, "Checkbox", Name = tool_a.TOOLS_Name, Default = curEnabled} else local seq = eyeon.parseFilename(tool_a.TOOLST_Clip_Name[1]) CheckboxList[i]={tool_a.TOOLS_Name, "Checkbox", Name = tool_a.TOOLS_Name.." ("..seq.FullName..")", Default = curEnabled} end end end x = composition:AskUser("Enabled savers", CheckboxList ) for i, tool in toollist do tool_a = tool:GetAttrs() if tool_a.TOOLS_RegID == "Saver" then curName=tool_a.TOOLS_Name if x[curName] == 1 then tool:SetAttrs({TOOLB_PassThrough = false}) else tool:SetAttrs({TOOLB_PassThrough = true}) end end end