{"id":55,"date":"2009-05-13T23:17:11","date_gmt":"2009-05-13T21:17:11","guid":{"rendered":"http:\/\/www.svenneve.com\/?p=55"},"modified":"2009-06-09T17:40:28","modified_gmt":"2009-06-09T15:40:28","slug":"fusion-toggle_passthrough","status":"publish","type":"post","link":"http:\/\/www.svenneve.com\/?p=55","title":{"rendered":"Fusion : Toggle_Passthrough.eyeonscript"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignleft size-full wp-image-57\" title=\"eyeonfusion120\" src=\"http:\/\/www.svenneve.com\/wp-content\/2009\/05\/eyeonfusion120.jpg\" alt=\"eyeonfusion120\" width=\"80\" height=\"80\" \/>Created a small script today to alleviate a small niggle i have, namely on a missing feature while working on a comp that became a bit sluggish because of the extensive use of optical flow based nodes, the ability to do quick multiple passthrough toggling by using a sort of pre selected set of nodes.<\/p>\n<p>Before, in order to work with the comp and have it render refreshes fast enough to not be uncomfortable, i often found myself selecting all heavy task nodes (by digging through my comp flow by hand) and then toggle their passthrough state.<\/p>\n<p>Now this isn&#8217;t a disaster, but switching between viewing the final product and the editting version takes time and breaks my working flow.<\/p>\n<p>Here&#8217;s a small script that scans your comp flow for any nodes that have a line in their comments that contain the following string:<\/p>\n<p>[!]<\/p>\n<p>When you run the script it will toggle their passthrough state, the script becomes really handy when you attach it to a shortcut (you can do this with the Hotkey Manager.)<\/p>\n<p>I haven&#8217;t fully tested it with animated comments yet, but it should work as it simply creates a large string comprised of all the text data it finds on an animation spline that is attached to the comments tab and then runs it through the standard Lua find function.<\/p>\n<p>Offcourse you can quite easily change the comment string by simply editing the script, just change the string in line 24.<\/p>\n<h3><a href=\"http:\/\/www.svenneve.com\/wp-content\/2009\/05\/toggle_passthrough.eyeonscript\">download : Toggle_Passthrough<br \/>\n<\/a><span style=\"color: #232323;\">.<\/span><a href=\"http:\/\/www.svenneve.com\/wp-content\/2009\/05\/toggle_passthrough.eyeonscript\"><\/a><\/h3>\n<pre lang=\"lua\">-- Toggle_Passthrough v1.0\r\n-- by S.Neve - House of Secrets 13-05-2009\r\n-- for latest version, check http:\/\/www.svennneve.com\r\n\r\nlocal toollist = composition:GetToolList()\r\n\r\nfor i, tool in toollist do\r\n\t-- Finds all comments for tool.  Checks to see if it\u2019s animated.\r\n\tmessage = \"\"\r\n\tif tool.Comments then\r\n\t\tif tool.Comments[TIME_UNDEFINED]==\"\" then\r\n\t\telse\r\n\t\t\tif tool.Comments:GetConnectedOutput() then\r\n\t\t\t\tx=tool.Comments:GetKeyFrames()\r\n\t\t\t\tfor k, keyframe in x do\r\n\t\t\t\t\tmessage = message .. tool.Comments[keyframe]\r\n\t\t\t\tend\r\n\t\t\telse\r\n\t\t\t\tmessage = tool.Comments[TIME_UNDEFINED]\r\n\t\t\tend\r\n\t\tend\r\n\tend \r\n\r\n\tif string.find(message, \"[!]\") then\r\n\t\ttool:SetAttrs({TOOLB_PassThrough = not tool:GetAttrs().TOOLB_PassThrough})\r\n\t\tprint (\"toggled passthrough on \" .. tool:GetAttrs().TOOLS_Name .. \"\\n\")\r\n\tend\r\nend<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Created a small script today to alleviate a small niggle i have, namely on a missing feature while working on a comp that became a bit sluggish because of the extensive use of optical flow based nodes, the ability to do quick multiple passthrough toggling by using a sort of pre selected set of nodes.&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,18],"tags":[15,12,17,14,13,16],"_links":{"self":[{"href":"http:\/\/www.svenneve.com\/index.php?rest_route=\/wp\/v2\/posts\/55"}],"collection":[{"href":"http:\/\/www.svenneve.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.svenneve.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.svenneve.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.svenneve.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":43,"href":"http:\/\/www.svenneve.com\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":218,"href":"http:\/\/www.svenneve.com\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions\/218"}],"wp:attachment":[{"href":"http:\/\/www.svenneve.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.svenneve.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.svenneve.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}