in DaVinci Resolve, how to get frame position of the selected clip, not the play head…
- User
in DaVinci Resolve, how to get frame position of the selected clip, not the play head using a Lua script?
- Assistant
In DaVinci Resolve, if you want to get the frame position of a currently selected clip using a Lua script, it involves accessing the timeline and the selected item. Below is a step-by-step guide on how to achieve this:
-
Access the Resolve API: First, ensure that you can access the DaVinci Resolve Lua scripting API. You typically start with:
resolve = Resolve() projectManager = resolve:GetProjectManager() project = projectManager:GetCurrentProject() timeline = project:GetCurrentTimeline()
-
- User
if this in an expression in Text+ the clip is known, how can I reffer to it, like @this or something?
- Assistant
In DaVinci Resolve's Fusion and the Text+ node, expressions can be used to create dynamic text elements. However, directly referencing a specific clip from the timeline inside a Fusion expression isn't natively supported like you might think of referencing an object in some programming languages with keywords like
@this.Instead, you'll typically work with properties of the nodes within Fusion itself. If you are looking to refer to specific properties or metadata from a clip, here are a few routes you might take:
-
: If the clip contains specific metadata that you want to display or reference, you can try to fetch this information somehow outside of expressions — using scripts in the Fusion page — then relay this to your Text+ node.
-