Scripts new

From VFXPedia

Revision as of 00:39, 26 October 2009 by Milho (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Contents

Useful Scripts



Bin Scripts

Your Fame & Glory goes here


Comp Scripts

SE_ReRenderMissingFrames
This script is a modification of the 'check for missing frames'-script and works like this: Within the current render-range it checks for missing frames of the selected saver. If there are any missing frames, it sets up the renderrange and re-renders those frames. Goes into Scripts\Comp
SE_LoaderTweaker
LoaderTweaker allows for easy modification of the most-frequently used Loader-options. (Derived from the ChangeLoaderMissingFrame-script) Goes into Scripts\Comp Last revisited: June 18, 2007. Added PixelAspect options.
SE_DeleteOrphanedLoaders
Loaders that are not connected to any tool will be deleted. Goes into Scripts\Comp
SE_PriorityPassthrough
PriorityPassthrough (de)activates user-definable sets of tools. The user has to put PL1, PL2, PL3 or PL4 into the comment-tab of the tool to assign the tool to a 'priority group'. Goes into Scripts\Comp Updated 15/05/07 as there was a little prob with animated tools.
SE_PrioritySetLevel
To easily set the PriorityLevel in selected tools for use with the above PriorityPassthrough . Goes into Scripts\Comp
Renamer_glt
This script renames the selected tools (or all if nothing is selected). Similar to the renamer of Total Commander. Inserting/replacing strings, inserting counter, or tool type abbreviation. See more description and use in the script. Current version: 1.02 Written by Gabor L. Toth. Last revised Saturday, March 31st, 2007
Bf_rename3
This script can be used to replace the default tool rename dialog. It uses the short name of the tool as prefix. This script comes in two versions. Version 1 uses the default AskUser dialog which is not handy cause it does not highlight the textdialog and does not react to enter or escape. Version 2 uses iup as interfaces and does not have this problems. To run this script ensure that the script is saved in the Fusion/Scripts/Comp directory. Select the tool you want to rename. Run the script. You may use the hotkey manager at File-Scripts-Hotkey Manager to apply a shortcut e.g. CRTL-F2 to this script. Updated: CRTL-A for using the current name for all tools in selection & more (see header). Written by Blazej Floch. Last revised ,October 26th, 2009
Rocket_Science_Saver_Clip_Rename
This custom script was written to rename the output files generated by the comp’s savers. The output clips are renamed based on the title of the comp. The file extension is created from a hard coded list of file : extensions and determined based on the TOOLST_Clip_FormatName attribute of the saver. To run this script ensure that the script is saved in the Fusion/Scripts/Comp directory. Select the savers to be affected by the script and run the script from the Scripts menu of Fusion. written by Brian Sinasac for Rocket Science. Last revised Wednesday, January 16th, 2007
Filmkameratene_Change_Path_OpenEXR
This custom script was written to maintain the custom data (channels) created for an OpenEXR format clip loaded into a Fusion loader. Existing scripts that allow the user to re-path loader files destroyed existing clip information (in the creation of a new clip). This script first collects the custom data, creates a new clip and repopulates the custom data. To run this script ensure that the script is saved in the Fusion/Scripts/Comp directory. Select the Loader to be affected by the script and run the script from the Scripts menu of Fusion. Written by Brian Sinasac for Filmkamertene. Last revised Wednesday, January 16th, 2007
DAMNCircles
This custom script was written to create circular paint strokes at a location, frame number and with a radius defined by a text file. The script generates an image that is used to simulate particles colliding with a plane. The initial version of this script expects that the user has manually added the paint tool and selected it. To run this script ensure that the script is saved in the Fusion/Scripts/Comp directory. Select the paint tool to be affected by the script and run the script from the Scripts menu of Fusion. Sample data (CollisionShort.dat) has been included for download so the script can be tested. Written by Brian Sinasac for damnFX. Last revised Wednesday, January 16th, 2007
Category Color Changer - (Source):
The Category Color Changer uses a hard-coded table of RGB color values to color-code every tool in a composite based on its category. This allows you to apply a standard color scheme to both newly created comps and older comps that had little or no color-coding. Initially written by Casey Visco. Last revised Wednesday, December 20th, 2006
Convert_Footage.eyeonscript
This script was made to automate creating of reference clips from firewire drives with film footage. It can be used to search folders recursive for footage in any file format that Fusion can load and convert it to any other file format fusion can write to. Creates comps for sequences and can submit them for render.
Flame Tracker to DFMO
This script converts 2D tracks exported from FFI stabilizer as .ascii file. Writes .dfmo to the same direcrory, make sure it is writable. Can do all .ascii in directory with process all files option. Needs horizontal resolution of tracked image in pixels.
Save New Version and Update Savers
This is a modification of the 'Save New Version' script in Fusion 5 that also updates clip names in savers. Use it if you intend to keep different version renders for comparison or other purposes. It will only update savers matching the composition name, so you have to explicitly enable 'versioning' of your savers.
Your Fame&Glory goes here


Event Scripts

</center>Orphan Saver Check - (Source) </center>
The Orphan Saver Check script is a Script Library that hooks the OnStartRender event and executes before the render dialog is displayed. It examines each saver in the composition and displays a warning if the saver's image input is not connected to any other tools. Save this script in the Fusion:\Scripts folder. It will be executed each time a new composition is created or an existing composition is loaded. Initially written by Isaac Guenard, eyeon Software. Last revised Friday, July 21st, 2006 Note: Using this script or perhaps any scriptlib event script, will cause Deadline v2.6 to fail to load Fusion. (http://software.franticfilms.com/index.aspx?page=deadline ) --Drswoboda
Your Fame&Glory goes here


Job Scripts

Your Fame & Glory goes here


Slave Scripts

Your Fame & Glory goes here


Tool Scripts

Log Manager
This script was designed to help manage the logs generated by the Fusion Render Manager. There are 2 tools available in this script, Split Render Log tool and the Log Analyzer tool. The Split Render Log tool allows the user divide their single large render log into a much more manageable daily log. The Log Analyzer tool allows the user to view information for a specific day and broken down into specific jobs. The data is displayed in a series of tabs as follows: General Information – job title, requester, render status, start, end and render time as well as the list of machines used in the render. Errors – all errors found for the specified job Verbose – all log entries for the specified job. Additionally, the Log Analyzer allows the user to save the file in a printer friendly format. IUP was used to create the user interface. To run this script ensure that the script is saved in the Fusion/Scripts/Utility directory. Run the script from the File->Scripts menu of Fusion.
Update Render Location:
This tool script is meant to be used in conjunction with the "Save New Version" script. It will update a saver's path so that it matches the new comp name. It also takes into account sitations where rendered image sequences are to be put into subfolders of the same name.
Tracker to Transform:
This script connects transform to selected tracer, bakes animation, and allows averaging keyframes or removing jitter. Also allows to change reference frame and scale transform values. Saves last settings to comp.
SE_TextPlusPlus.eyeonscript:
How many times have you wanted to copy the settings from one Shader in Text+ to another for adding further elements? And how many times did you end up copying values back and forth manually? This little script helps you achieving this in just a mouseclick. For now it won't copy animated values, though. It goes into scripts\tool and works on Text+ only.
SE_PointCloudFun.eyeonscript:
This script allows for adding imageplanes at PointCloud points, as well as setting up 4 3DLocators at selectable points of a PointCloud. A huge Timesaver when dealing with 3D-tracked scenes. It goes into scripts\tool and works on PointCloud3D only.
Your Fame&Glory goes here


Utility Scripts

Your Fame & Glory goes here


Third-party Scripts

DFSHToMaxAndBack - http://www.rpmanager.com/temp/DFSHToMaxAndBack02.ms:
This Max script can import and export Fusion DFSH shape files (created by exporting polylines from Fusion). Written by Grant Adam. Last revised 2001.
Your Fame&Glory goes here


Tips and Tricks

How to run Comp or Tool scripts from outside Fusion

The only difference that sets Utility, Comp & Tool scripts apart is that they're automatically given some local variables when they start up. All types are given fusion (& fu), referring to the Fusion object, Comp and Tool scripts also get composition (& comp), referring to the composition that the script was started from, and Tool scripts get tool, referring to the tool that was used to start the script.

You can easily convert any of these into scripts that can be run from outside Fusion (executing them with eyeonScript.exe), by adding the following code to the start:

--[[ For Utility scripts ]]---------
if not fusion then
  fusion = Fusion("localhost")
  fu = fusion
end
 
--[[ Add this for Comp scripts ]]---------
if fusion and not comp then
  composition = fusion:GetCurrentComp()
  comp = composition
end
 
--[[ Add this as well for Tool scripts ]]-----------
if comp and not tool then
  tool = comp.ActiveTool
end

This sets up the default variables from the local copy of Fusion (assuming it is already running), the current comp, and the currently active tool. Be aware that these variables may be nil (e.g. if no comp is open, or if no tool is currently active), and many scripts assume they are valid.

How to construct a group or macro from a script

Unfortunately, there's currently no trivial way to group tools from a script. However, it can be done by assembling a series of nested tables containing the tools to be grouped, with a few extras describing the rest of the group. These nested tables mirror the tables found in .setting files. You can then paste those tables directly into the comp, or save them as a setting file etc.

Take a look at the differences between a tool and a grouped tool to see what has to be done: Copy the tool (from the flow view) & paste it into SciTE to see its table structure. Now group the tool & copy/paste that into a different SciTE window. See how the original tool is now contained within an outer GroupOperator table, with extra tables describing which inputs/outputs are externally available?

You'll need a table containing the tools to be grouped. This can be done manually, by loading a .setting file, or by using the comp:CopySettings() function. Then, create the GroupOperator tables and plug the tools table into that. Here's an example script fragment that assumes you have a single ColorGain1 tool that you want to make a group out of.

-- Create a group table called Group1
gt = { Tools = { Group1 = { __ctor = "GroupOperator" } }
gt.Tools.Group1.ViewInfo = { __ctor = "GroupInfo" }
gt.Tools.Group1.Inputs = {}
gt.Tools.Group1.Outputs = {}
 
-- Add an external input, referencing ColorGain1's Input
gt.Tools.Group1.Inputs.Input1 = { __ctor = "InstanceInput", SourceOp = "ColorGain1", Source = "Input" }
 
-- Add an external output, referencing ColorGain1's Output
gt.Tools.Group1.Outputs.Output1 = { __ctor = "InstanceOutput", SourceOp = "ColorGain1", Source = "Output" }
 
-- get a table of settings for the actual tools to go in our new group
t = comp:CopySettings(ColorGain1)
gt.Tools.Group1.Tools = t.Tools
 
-- paste it back into the comp
comp:Paste(gt)

Creating macros is actually fairly similar, except you'd use __ctor = "MacroOperator" instead of "GroupOperator", and the external inputs/outputs should be named "MainInput1"/"MainOutput1" etc, while exposed controls are just called "Input1" etc. You can also use extra values in those Input tables, such as Name, Default, MinScale and MaxScale. Have a look at an existing macro setting file for examples.