Eyeon:Script/Reference/Applications/Fusion/Classes/Fusion/GetCurrentComp
From VFXPedia
< Eyeon:Script | Reference | Applications | Fusion | Classes | Fusion
Contents |
Fusion : GetCurrentComp
Arguments
GetCurrentComp()
Returns
This function does not return a value
Remarks
The GetCurrentComp() function returns the handle to the composition in Fusion that has the focus. This function is useful for scripts that are meant to be run during a normal interactive session.
This function requires no arguments.
If there are no compositions open, then GetCurrentComp() will return nil.
Requirements
- eyeonScript 5.0
- Fusion 5.0
Examples
fusion = Fusion("localhost") cur_comp = fusion:GetCurrentComp() if not cur_comp then print("There are no compositions open.") else -- get the attributes for the composition attrs = cur_comp:GetAttrs() -- get the path to the current composition comp_path = attrs.COMPS_FileName -- add *.tmp to the end of the composition's path comp_path_tmp = comp_path .. ".tmp" -- save a temporary version of the composition cur_comp:Save(comp_path) end
Tips for GetCurrentComp (edit)
EyeonTips:Script/Reference/Applications/Fusion/Classes/Fusion/GetCurrentComp