Skip to content

Instantly share code, notes, and snippets.

@bradcordeiro
Last active April 8, 2024 15:10
Show Gist options
  • Save bradcordeiro/b4387106826f00b002d69ddc87c4f53e to your computer and use it in GitHub Desktop.
Save bradcordeiro/b4387106826f00b002d69ddc87c4f53e to your computer and use it in GitHub Desktop.
Lua Language Server Definition File for DaVinci Resolve 18 Lua Scripting API
---@meta
---@alias Base64Data string Property of ThumbnailData type but otherwise undocumented
---@alias FusionComp unknown Return or argument type for some TimelineItem methods but otherwise undocumented
---@alias GalleryStill unknown Return or argument type for GalleryStillAlbum methods but otherwise undocumented
---@alias TimelineExportAAFSubType unknown Probably an enum but undocumented, optional argument for Timeline.Export
---@alias TimelineExportEDLSubType unknown Probably an enum but undocumented, optional argument for Timeline.Export
---@alias TimelineExportSubType TimelineExportAAFSubType | TimelineExportEDLSubType
---@alias TimelineExportType unknown Probably an enum but undocumented, argument for Timeline.Export
---@alias PageName "media" | "cut" | "edit" | "fusion" | "color" | "fairlight" | "deliver"
---@alias TrackType "audio" | "video" | "subtitle"
---@alias StillExportFormat "dpx" | "cin" | "tif" | "jpg" | "png" | "ppm" | "bmp" | "xpm"
---@alias ClipColor "Apricot" | "Beige" | "Blue" | "Brown" | "Chocolate" | "Green" | "Lime" | "Navy" | "Olive" | "Orange" | "Pink" | "Purple" | "Tan" | "Teal" | "Violet" | "Yellow"
---@alias MarkerColor "Blue" | "Cocoa" | "Cream" | "Cyan" | "Fuchsia" | "Green" | "Lavender" | "Lemon" | "Mint" | "Pink" | "Purple" | "Red" | "Rose" | "Sand" | "Sky" | "Yellow"
---@alias FlagColor MarkerColor
---@class DataBaseInfo
---@field DbType "Disk" | "PostgreSQL"
---@field DbName string
---@field IpAddress? string
---@class TakeInfo
---@field startFrame number
---@field endFrame number
---@field mediaPoolItem MediaPoolItem
---@class Marker
---@field color MarkerColor
---@field duration number
---@field note string
---@field name string
---@field customData string
---@alias Markers { [number]: Marker }
---@class CDLMap
---@field NodeIndex string
---@field Slope string
---@field Offset string
---@field Power string
---@field Saturation string
---@class ThumbnailData
---@field width number
---@field height number
---@field format number
---@field data Base64Data
---@enum DynamicZoomEaseSetting
DynamicZoomEaseSetting = {
DYNAMIC_ZOOM_EASE_LINEAR = 0,
DYNAMIC_ZOOM_EASE_IN = 1,
DYNAMIC_ZOOM_EASE_OUT = 2,
DYNAMIC_ZOOM_EASE_IN_AND_OUT = 3,
}
---@enum CompositeModeSetting
CompositeModeSetting = {
COMPOSITE_NORMAL = 0,
COMPOSITE_SUBTRACT = 2,
COMPOSITE_DIFF = 3,
COMPOSITE_MULTIPLY = 4,
COMPOSITE_SCREEN = 5,
COMPOSITE_OVERLAY = 6,
COMPOSITE_HARDLIGHT = 7,
COMPOSITE_SOFTLIGHT = 8,
COMPOSITE_DARKEN = 9,
COMPOSITE_LIGHTEN = 10,
COMPOSITE_COLOR_DODGE = 11,
COMPOSITE_COLOR_BURN = 12,
COMPOSITE_EXCLUSION = 13,
COMPOSITE_HUE = 14,
COMPOSITE_SATURATE = 15,
COMPOSITE_COLORIZE = 16,
COMPOSITE_LUMA_MASK = 17,
COMPOSITE_DIVIDE = 18,
COMPOSITE_LINEAR_DODGE = 19,
COMPOSITE_LINEAR_BURN = 20,
COMPOSITE_LINEAR_LIGHT = 21,
COMPOSITE_VIVID_LIGHT = 22,
COMPOSITE_PIN_LIGHT = 23,
COMPOSITE_HARD_MIX = 24,
COMPOSITE_LIGHTER_COLOR = 25,
COMPOSITE_DARKER_COLOR = 26,
COMPOSITE_FOREGROUND = 27,
COMPOSITE_ALPHA = 28,
COMPOSITE_INVERTED_ALPHA = 29,
COMPOSITE_LUM = 30,
COMPOSITE_INVERTED_LUM = 31,
}
---@enum RetimeProcessSetting
RetimeProcessSetting = {
RETIME_USE_PROJECT = 0,
RETIME_NEAREST = 1,
RETIME_FRAME_BLEND = 2,
RETIME_OPTICAL_FLOW = 3,
}
---@enum MotionEstimationSetting
MotionEstimationSetting = {
MOTION_EST_USE_PROJECT = 0,
MOTION_EST_STANDARD_FASTER = 1,
MOTION_EST_STANDARD_BETTER = 2,
MOTION_EST_ENHANCED_FASTER = 3,
MOTION_EST_ENHANCED_BETTER = 4,
MOTION_EST_SPEED_WRAP = 5,
}
---@enum ScalingSetting
ScalingSetting = {
SCALE_USE_PROJECT = 0,
SCALE_CROP = 1,
SCALE_FIT = 2,
SCALE_FILL = 3,
SCALE_STRETCH = 4,
}
---@enum ResizeFilterSetting
ResizeFilterSetting = {
RESIZE_FILTER_USE_PROJECT = 0,
RESIZE_FILTER_SHARPER = 1,
RESIZE_FILTER_SMOOTHER = 2,
RESIZE_FILTER_BICUBIC = 3,
RESIZE_FILTER_BILINEAR = 4,
RESIZE_FILTER_BESSEL = 5,
RESIZE_FILTER_BOX = 6,
RESIZE_FILTER_CATMULL_ROM = 7,
RESIZE_FILTER_CUBIC = 8,
RESIZE_FILTER_GAUSSIAN = 9,
RESIZE_FILTER_LANCZOS = 10,
RESIZE_FILTER_MITCHELL = 11,
RESIZE_FILTER_NEAREST_NEIGHBOR = 12,
RESIZE_FILTER_QUADRATIC = 13,
RESIZE_FILTER_SINC = 14,
RESIZE_FILTER_LINEAR = 15,
}
---@enum SuperScaleSetting
SuperScaleSetting = {
Auto = 0,
NoScaling = 1,
TwoX = 2,
ThreeX = 3,
FourX = 4,
}
---@class ProjectSetting Properties are undocumented, these were found through trial and error
---@field audioCaptureNumChannels string Probably an integer stored as an integer string, e.g. "2"
---@field audioOutputHasTimecode string Probably a boolean stored as an integer string, e.g. "0"
---@field audioPlayoutNumChannels string
---@field colorAcesGamutCompressType string
---@field colorAcesIDT string
---@field colorAcesNodeLUTProcessingSpace string
---@field colorAcesODT string
---@field colorGalleryStillsLocation string
---@field colorGalleryStillsNamingCustomPattern string
---@field colorGalleryStillsNamingEnabled string Probably a boolean stored as an integer string, e.g. "0"
---@field colorGalleryStillsNamingPattern string
---@field colorGalleryStillsNamingWithStillNumber string
---@field colorKeyframeDynamicsEndProfile string Probably a integer stored as an integer string, e.g. "0"
---@field colorKeyframeDynamicsStartProfile string Probably a boolean stored as an integer string, e.g. "0"
---@field colorLuminanceMixerDefaultZero string Probably a boolean stored as an integer string, e.g. "0"
---@field colorScienceMode string
---@field colorSpaceInput string
---@field colorSpaceInputGamma string
---@field colorSpaceOutput string
---@field colorSpaceOutputGamma string
---@field colorSpaceOutputGamutMapping string
---@field colorSpaceOutputGamutSaturationKnee string Probably a float stored as an integer string, e.g. "0.9"
---@field colorSpaceOutputGamutSaturationMax string Probably a float stored as an integer string, e.g. "1.0"
---@field colorSpaceOutputToneLuminanceMax string Probably an integer stored as an integer string, e.g. "100"
---@field colorSpaceOutputToneMapping string
---@field colorSpaceTimeline string
---@field colorSpaceTimelineGamma string
---@field colorUseBGRPixelOrderForDPX string Probably a boolean stored as an integer string, e.g. "0"
---@field colorUseContrastSCurve string Probably an integer stored as an integer string, e.g. "1"
---@field colorUseLegacyLogGrades string Probably an enum stored as an integer string, e.g. "2"
---@field colorUseLocalVersionsAsDefault string Probably a boolean stored as an integer string, e.g. "1"
---@field colorUseStereoConvergenceForEffects string Probably a boolean stored as an integer string, e.g. "1"
---@field colorVersion10Name string
---@field colorVersion1Name string
---@field colorVersion2Name string
---@field colorVersion3Name string
---@field colorVersion4Name string
---@field colorVersion5Name string
---@field colorVersion6Name string
---@field colorVersion7Name string
---@field colorVersion8Name string
---@field colorVersion9Name string
---@field graphicsWhiteLevel string Probably an integer stored as an integer string, e.g. "100"
---@field hdr10PlusControlsOn string Probably an integer stored as an integer string, e.g. "0"
---@field hdrDolbyControlsOn string Probably a boolean stored as an integer string, e.g. "1"
---@field hdrDolbyMasterDisplay string
---@field hdrDolbyVersion string Probably a float stored as a string, e.g. 4.0
---@field hdrMasteringLuminanceMax string Probably an integer stored as an integer string, e.g. "1000"
---@field hdrMasteringOn string Probably a boolean stored as an integer string, e.g. "1"
---@field imageDeinterlaceQuality string
---@field imageEnableFieldProcessing string Probably a boolean stored as an integer string, e.g. "1"
---@field imageMotionEstimationMode string
---@field imageMotionEstimationRange string
---@field imageResizeMode string
---@field imageResizingGamma string
---@field imageRetimeInterpolation string
---@field inputDRT string
---@field inputDRTSatRolloffLimit string Probably an integer stored as an integer string, e.g. "10000"
---@field inputDRTSatRolloffStart string Probably an integer stored as an integer string, e.g. "100"
---@field isAutoColorManage string Probably a boolean stored as an integer string, e.g. "1"
---@field limitAudioMeterAlignLevel string Probably a boolean stored as an integer string, e.g. "0"
---@field limitAudioMeterDisplayMode string
---@field limitAudioMeterHighLevel string Probably an integer stored as an integer string, e.g. "-5"
---@field limitAudioMeterLoudnessScale string
---@field limitAudioMeterLowLevel string Probably an integer stored as an integer string, e.g. "-10"
---@field limitAudioMeterLUFS string Probably an integer stored as an integer string, e.g. "-23"
---@field limitBroadcastSafeLevels string
---@field limitBroadcastSafeOn string Probably a boolean stored as an integer string, e.g. "0"
---@field limitSubtitleCaptionDurationSec string Probably an integer stored as a string, e.g. "3"
---@field limitSubtitleCPL string Probably an integer stored as a string, e.g. "60"
---@field outputDRT string
---@field outputDRTSatRolloffLimit string Probably an integer stored as a string, e.g. "10000"
---@field outputDRTSatRolloffStart string Probably an integer stored as a string, e.g. "100"
---@field perfAutoRenderCacheAfterTime string Probably an integer stored as a string, e.g. "5"
---@field perfAutoRenderCacheComposite string Probably an enum stored as a string, e.g. "0"
---@field perfAutoRenderCacheEnable string Probably a boolean stored as an integer string, e.g. "1"
---@field perfAutoRenderCacheFuEffect string Probably a boolean stored as an integer string, e.g. "1"
---@field perfAutoRenderCacheTransition string Probably a boolean stored as an integer string, e.g. "0"
---@field perfCacheClipsLocation string
---@field perfOptimisedCodec string
---@field perfOptimisedMediaOn string Probably a boolean stored as an integer string, e.g. "1"
---@field perfOptimizedResolutionRatio string
---@field perfProxyMediaMode string Probably an enum stored as an integer string, e.g. "1"
---@field perfProxyResolutionRatio string
---@field perfRenderCacheCodec string
---@field perfRenderCacheMode string Probably an enum stored as an integer string, e.g. "0"
---@field rcmPresetMode string
---@field separateColorSpaceAndGamma string Probably a boolean stored as an integer string, e.g. "1"
---@field superScale SuperScaleSetting
---@field superScaleNoiseReduction string
---@field superScaleSharpness string
---@field timelineDropFrameTimecode string Probably a boolean stored as an integer string, e.g. "1"
---@field timelineFrameRate number
---@field timelineFrameRateMismatchBehavior string
---@field timelineInputResMismatchBehavior string
---@field timelineInputResMismatchCustomPreset string
---@field timelineInputResMismatchUseCustomPreset string
---@field timelineInterlaceProcessing string
---@field timelineOutputPixelAspectRatio string
---@field timelineOutputResMatchTimelineRes string
---@field timelineOutputResMismatchBehavior string
---@field timelineOutputResMismatchCustomPreset string
---@field timelineOutputResMismatchUseCustomPreset string Probably a boolean stored as an integer string, e.g. "1"
---@field timelineOutputResolutionHeight string Probably an integer stored as an integer string, e.g. "1"
---@field timelineOutputResolutionWidth string Probably an integer stored as an integer string, e.g. "1"
---@field timelinePixelAspectRatio string
---@field timelinePlaybackFrameRate string Probably an integer stored as an integer string, e.g. "1"
---@field timelineResolutionHeight string Probably an integer stored as an integer string, e.g. "1"
---@field timelineResolutionWidth string Probably an integer stored as an integer string, e.g. "1"
---@field timelineSaveThumbsInProject string Probably a boolean stored as an integer string, e.g. "1"
---@field timelineWorkingLuminance string Probably an integer stored as an integer string, e.g. "1"
---@field timelineWorkingLuminanceMode string
---@field useCATransform string Probably a boolean stored as an integer string, e.g. "1"
---@field useColorSpaceAwareGradingTools string
---@field useInverseDRT string Probably a boolean stored as an integer string, e.g. "1"
---@field videoCaptureCodec string
---@field videoCaptureFormat string
---@field videoCaptureIngestHandles string Probably a boolean stored as an integer string, e.g. "1"
---@field videoCaptureLocation string
---@field videoCaptureMode string
---@field videoDataLevels string
---@field videoDataLevelsRetainSubblockAndSuperWhiteData string Probably a boolean stored as an integer string, e.g. "1"
---@field videoDeckAdd32Pulldown string Probably a boolean stored as an integer string, e.g. "1"
---@field videoDeckBitDepth string Probably an integer stored as an integer string, e.g. "1"
---@field videoDeckFormat string
---@field videoDeckNonAutoEditFrames string Probably a boolean stored as an integer string, e.g. "1"
---@field videoDeckOutputSyncSource string
---@field videoDeckPrerollSec string Probably an integer stored as an integer string, e.g. "1"
---@field videoDeckSDIConfiguration string
---@field videoDeckUse444SDI string Probably a boolean stored as an integer string, e.g. "1"
---@field videoDeckUseAudoEdit string Probably a boolean stored as an integer string, e.g. "1"
---@field videoDeckUseStereoSDI string Probably a boolean stored as an integer string, e.g. "1"
---@field videoMonitorBitDepth string Probably a boolean stored as an integer string, e.g. "1"
---@field videoMonitorFormat string
---@field videoMonitorMatrixOverrideFor422SDI string
---@field videoMonitorScaling string
---@field videoMonitorSDIConfiguration string
---@field videoMonitorUse444SDI string Probably a boolean stored as an integer string, e.g. "1"
---@field videoMonitorUseHDROverHDMI string Probably a boolean stored as an integer string, e.g. "1"
---@field videoMonitorUseLevelA string Probably a boolean stored as an integer string, e.g. "1"
---@field videoMonitorUseMatrixOverrideFor422SDI string Probably a boolean stored as an integer string, e.g. "1"
---@field videoMonitorUseStereoSDI string Probably a boolean stored as an integer string, e.g. "1"
---@field videoPlayoutAudioFramesOffset string Probably a boolean stored as an integer string, e.g. "1"
---@field videoPlayoutBatchHeadDuration string Probably an integer stored as an integer string, e.g. "1"
---@field videoPlayoutBatchTailDuration string Probably an integer stored as an integer string, e.g. "1"
---@field videoPlayoutLTCFramesOffset string Probably an integer stored as an integer string, e.g. "1"
---@field videoPlayoutMode string
---@field videoPlayoutShowLTC string Probably a boolean stored as an integer string, e.g. "1"
---@field videoPlayoutShowSourceTimecode string Probably a boolean stored as an integer string, e.g. "1"
---@class RenderSetting
---@field AlphaMode? number 0 - Premultipled, 1 - Straight. Can only be set if "ExportAlpha" is true.
---@field AudioBitDepth? number
---@field AudioCodec? string (example: "aac")
---@field AudioSampleRate? number
---@field ColorSpaceTag? string (example: "Same as Project", "AstroDesign")
---@field CustomName? string
---@field EncodingProfile? string (example: "Main10"). Can only be set for H.264 and H.265.
---@field ExportAlpha? boolean
---@field ExportAudio? boolean
---@field ExportVideo? boolean
---@field FormatHeight? number
---@field FormatWidth? number
---@field FrameRate? number examples: 23.976, 24
---@field GammaTag? string (example: "Same as Project", "ACEScct")
---@field MarkIn? number
---@field MarkOut? number
---@field MultiPassEncode? boolean Can only be set for H.264.
---@field NetworkOptimization? boolean Only supported by QuickTime and MP4 formats.
---@field PixelAspectRatio "16_9" | "4_3" | "square" | "cinemascope" | nil
---@field SelectAllFrames? boolean when set true, the settings MarkIn and MarkOut are ignored)
---@field TargetDir? string
---@field UniqueFilenameStyle? number 0 - Prefix, 1 - Suffix
---@field VideoQuality number | "Least" | "Low" | "Medium" | "High" | "Best" | nil
---@class RenderJob
---@field AudioCodec string
---@field AudioSampleRate number
---@field VideoFormat string
---@field IsExportAudio boolean
---@field ExportAlpha boolean
---@field FormatHeight number
---@field FrameRate string
---@field VideoCodec string
---@field FormatWidth number
---@field MarkOut number
---@field JobId string
---@field MarkIn number
---@field TargetDir string
---@field IsExportVideo boolean
---@field AudioBitDepth number
---@field TimelineName string
---@field OutputFilename string
---@field PixelAspectRatio number
---@field RenderMode string
---@field PresetName string
---@field RenderJobName string
---@class TimelineImportOptions
---@field timelineName string specifies the name of the timeline to be created
---@field importSourceClips boolean specifies whether source clips should be imported, True by default
---@field sourceClipsPath string specifies a filesystem path to search for source clips if the media is inaccessible in their original path and if "importSourceClips" is True
---@field sourceClipsFolders MediaPoolFolder[] List of Media Pool folder objects to search for source clips if the media is not present in current folder and if "importSourceClips" is False
---@field interlaceProcessing boolean specifies whether to enable interlace processing on the imported timeline being created. valid only for AAF import
---@class TimelineAAFImportOptions
---@field autoImportSourceClipsIntoMediaPool boolean specifies if source clips should be imported into media pool, True by default
---@field ignoreFileExtensionsWhenMatching boolean specifies if file extensions should be ignored when matching, False by default
---@field linkToSourceCameraFiles boolean specifies if link to source camera files should be enabled, False by default
---@field useSizingInfo boolean specifies if sizing information should be used, False by default
---@field importMultiChannelAudioTracksAsLinkedGroups boolean specifies if multi-channel audio tracks should be imported as linked groups, False by default
---@field insertAdditionalTracks boolean specifies if additional tracks should be inserted, True by default
---@field insertWithOffset string specifies insert with offset value in timecode format - defaults to "00:00:00:00", applicable if "insertAdditionalTracks" is False
---@field sourceClipsPath string specifies a filesystem path to search for source clips if the media is inaccessible in their original path and if "ignoreFileExtensionsWhenMatching" is True
---@field sourceClipsFolders string list of Media Pool folder objects to search for source clips if the media is not present in current folder
---@class TimelineItemProperties
---@field Pan number Values from -4.0 * width to 4.0 * width
---@field Tilt number Values from -4.0*height to 4.0*height
---@field ZoomX number Values from 0.0 to 100.0
---@field ZoomY number Values from 0.0 to 100.0
---@field ZoomGang boolean
---@field RotationAngle number Values from -360.0 to 360.0
---@field AnchorPointX number Values from -4.0*width to 4.0*width
---@field AnchorPointY number Values from -4.0*height to 4.0*height
---@field Pitch number Values from -1.5 to 1.5
---@field Yaw number Values from -1.5 to 1.5
---@field FlipX boolean value for flipping horizontally
---@field FlipY boolean value for flipping vertically
---@field CropLeft number Values from 0.0 to width
---@field CropRight number Values from 0.0 to width
---@field CropTop number Values from 0.0 to height
---@field CropBottom number Values from 0.0 to height
---@field CropSoftness number Values from -100.0 to 100.0
---@field CropRetain boolean Value for "Retain Image Position" checkbox
---@field DynamicZoomEase DynamicZoomEaseSetting
---@field CompositeMode CompositeModeSetting
---@field Opacity number Value from 0.0 to 100.0
---@field Distortion number Value from -1.0 to 1.0
---@field RetimeProcess RetimeProcessSetting
---@field MotionEstimation MotionEstimationSetting
---@field Scaling ScalingSetting
---@field ResizeFilter ResizeFilterSetting
---@class MediaPoolItemClipInfo
---@field mediaPoolItem MediaPoolItem
---@field startFrame number
---@field endFrame number
---@field mediaType? number 1 - Video only, 2 - Audio only
---@class MediaPoolItemMetadata
---@field ["Aspect Ratio Notes"] string
---@field ["Camera Aperture"] string
---@field ["Camera FPS"] string
---@field ["Camera Serial #"] string
---@field ["Camera TC Type"] string
---@field ["Camera Type"] string
---@field ["Frame Rate"] string
---@field ["Lens Type"] string
---@field ["Mon Color Space"] string
---@field ["ND Filter"] string
---@field ["PAR Notes"] string
---@field ["Shutter Type"] string
---@field ["Video Codec"] string
---@field ["White Point (Kelvin)"] string
---@field ISO string
---@field Shutter string
---@class CompoundClipInfo
---@field startTimecode string
---@field name string
---@class RenderJobStatus Undocumented, shaped by trial-and-error
---@field CompletionPercentage number
---@field JobStatus "Ready" | "Rendering" | "Cancelled" | "Complete" | "Failed"
---@field TimeTakenToRenderInMs? number
---@field EstimatedTimeRemainingInMs? number
---@field Error? string
---@class MediaPoolItemProperties Undocumented, shaped by trial-and-error
---@field ["Alpha mode"]? string
---@field ["Audio Bit Depth"]? string
---@field ["Audio Ch"]? string
---@field ["Audio Codec"]? string
---@field ["Audio Offset"]? string
---@field ["Bit Depth"]? string
---@field ["Camera #"]? string
---@field ["Clip Color"] ClipColor?
---@field ["Clip Name"]? string
---@field ["Data Level"]? string
---@field ["Date Added"]? string
---@field ["Date Created"]? string
---@field ["Date Modified"]? string
---@field ["Drop frame"]? string
---@field ["Enable Deinterlacing"]? string
---@field ["End TC"]? string
---@field ["Field Dominance"]? string
---@field ["File Name"]? string
---@field ["File Path"]? string
---@field ["Good Take"]? string
---@field ["H-FLIP"]? string
---@field ["Input Color Space"]? string
---@field ["Input LUT"]? string
---@field ["Input Sizing Preset"]? string
---@field ["Noise Reduction"]? string
---@field ["Offline Reference"]? string
---@field ["Proxy Media Path"]? string
---@field ["Reel Name"]? string
---@field ["Roll/Card"]? string
---@field ["S3D Sync"]? string
---@field ["Sample Rate"]? string
---@field ["Slate TC"]? string
---@field ["Start KeyKode"]? string
---@field ["Start TC"]? string
---@field ["Super Scale"] number? 0=Auto, 1=no scaling, and 2, 3 and 4 represent the Super Scale multipliers 2x, 3x and 4x
---@field ["Synced Audio"]? string
---@field ["V-FLIP"]? string
---@field ["Video Codec"]? string
---@field Angle? string
---@field Comments? string
---@field Description? string
---@field Duration? string
---@field End? string
---@field Flags FlagColor[]?
---@field Format? string
---@field FPS number
---@field Frames? string
---@field IDT? string
---@field In? string
---@field Keyword? string
---@field Out? string
---@field PAR? string
---@field Proxy? string
---@field Resolution? string
---@field Scene? string
---@field Sharpness? string
---@field Shot? string
---@field Start? string
---@field Take? string
---@field Type? string
---@field Usage? string
---@class MediaPoolItem
local MediaPoolItem = { }
---Returns the clip name.
---@return string
function MediaPoolItem:GetName() end
---Returns the metadata value for the key "metadataType".
---@param metadataType string
---@return string
function MediaPoolItem:GetMetadata(metadataType) end
---If no argument is specified, a dict of all set metadata properties is returned.
---@return table<string, string>
function MediaPoolItem:GetMetadata() end
---Sets the given metadata to metadataValue (string). Returns True if successful.
---@param metadataType string
---@param metadataValue string
---@return boolean
function MediaPoolItem:SetMetadata(metadataType, metadataValue) end
---@param metaData table<string, string>
---@return boolean
function MediaPoolItem:SetMetadata(metaData) end
---Returns the unique ID for the MediaPoolItem.
---@return string
function MediaPoolItem:GetMediaId() end
---Creates a new marker at given frameId position and with given marker information. "customData" is optional and helps to attach user specific data to the marker.
---@param frameId number
---@param color MarkerColor
---@param name string
---@param note string
---@param duration number
---@param customData string
---@return boolean
function MediaPoolItem:AddMarker(frameId, color, name, note, duration, customData) end
---Returns a dict (frameId -> {information}) of all markers and dicts with their information.
---@return Markers
function MediaPoolItem:GetMarkers() end
---Returns marker {information} for the first matching marker with specified customData.
---@param customData string
---@return Markers
function MediaPoolItem:GetMarkerByCustomData(customData) end
---Updates customData (string) for the marker at given frameId position. CustomData is not exposed via UI and is useful for scripting developer to attach any user specific data to markers.
---@param frameId number
---@param customData string
---@return boolean
function MediaPoolItem:UpdateMarkerCustomData(frameId, customData) end
---Returns customData string for the marker at given frameId position.
---@param frameId number
function MediaPoolItem:GetMarkerCustomData(frameId) end
---Delete all markers of the specified color from the media pool item. "All" as argument deletes all color markers.
---@param color MarkerColor | "All"
---@return boolean
function MediaPoolItem:DeleteMarkersByColor(color) end
---Delete marker at frame number from the media pool item.
---@param frameNum number
---@return boolean
function MediaPoolItem:DeleteMarkerAtFrame(frameNum) end
---Delete first matching marker with specified customData.
---@param customData string
---@return boolean
function MediaPoolItem:DeleteMarkerByCustomData(customData) end
---Adds a flag with given color.
---@param color FlagColor
---@return boolean
function MediaPoolItem:AddFlag(color) end
---Returns a list of flag colors assigned to the item.
---@return FlagColor[]
function MediaPoolItem:GetFlagList() end
---Clears the flag of the given color if one exists. An "All" argument is supported and clears all flags.
---@param color FlagColor | "All"
---@return boolean
function MediaPoolItem:ClearFlags(color) end
---Returns the item color as a string.
---@return ClipColor
function MediaPoolItem:GetClipColor() end
---Sets the item color based on the colorName.
---@param colorName ClipColor
---@return boolean
function MediaPoolItem:SetClipColor(colorName) end
---Clears the item color.
---@return boolean
function MediaPoolItem:ClearClipColor() end
---Returns the property value for the key "propertyName". If no argument is specified, a dict of all clip properties is returned.
---@return MediaPoolItemProperties
function MediaPoolItem:GetClipProperty() end
---@param property string
---@return string | number
function MediaPoolItem:GetClipProperty(property) end
---Sets the given property to propertyValue (string). Check the section below for more information.
---@param propertyName string
---@param propertyValue string
---@return boolean
function MediaPoolItem:SetClipProperty(propertyName, propertyValue) end
---Links proxy media located at path specified by arg "proxyMediaFilePath" with the current clip. "proxyMediaFilePath" should be absolute clip path.
---@param proxyMediaFilePath string
---@return boolean
function MediaPoolItem:LinkProxyMedia(proxyMediaFilePath) end
---Unlinks any proxy media associated with clip.
---@return boolean
function MediaPoolItem:UnlinkProxyMedia() end
---Replaces the underlying asset and metadata of MediaPoolItem with the specified absolute clip path.
---@param filePath string
---@return boolean
function MediaPoolItem:ReplaceClip(filePath) end
---Returns a unique ID for the media pool item. Added in DaVinci Resolve 18
---@return string
function MediaPoolItem:GetUniqueId() end
---@class TimelineItem
local TimelineItem = { }
---Returns the item name.
---@return string
function TimelineItem:GetName() end
---Returns the item duration.
---@return number
function TimelineItem:GetDuration() end
---Returns the end frame position on the timeline.
---@return number
function TimelineItem:GetEnd() end
---Returns number of Fusion compositions associated with the timeline item.
---@return number
function TimelineItem:GetFusionCompCount() end
---Returns the Fusion composition object based on given index. 1 <= compIndex <= timelineItem:GetFusionCompCount()
---@param compIndex number
---@return FusionComp
function TimelineItem:GetFusionCompByIndex(compIndex) end
---Returns a list of Fusion composition names associated with the timeline item.
---@return string[]
function TimelineItem:GetFusionCompNameList() end
---Returns the Fusion composition object based on given name.
---@param compName string
---@return FusionComp
function TimelineItem:GetFusionCompByName(compName) end
---Returns the maximum extension by frame for clip from left side.
---@return number
function TimelineItem:GetLeftOffset() end
---Returns the maximum extension by frame for clip from right side.
---@return number
function TimelineItem:GetRightOffset() end
---Returns the start frame position on the timeline.
---@return number
function TimelineItem:GetStart() end
---Sets the value of property "propertyKey" to value "propertyValue"
---@param propertyKey string
---@param propertyValue string | number | boolean
---@return boolean
function TimelineItem:SetProperty(propertyKey, propertyValue) end
---returns the value of the specified key if no key is specified, the method returns aTimelineItem:dictionary(python) or table(lua) for all supported keys
---@return TimelineItemProperties
function TimelineItem:GetProperty() end
---@param propertyKey string
---@return string | number
function TimelineItem:GetProperty(propertyKey) end
---Creates a new marker at given frameId position and with given marker information. "customData" is optional and helps to attach user specific data to the marker.
---@param frameId number
---@param color MarkerColor
---@param name string
---@param note string
---@param duration number
---@param customData string
---@return boolean
function TimelineItem:AddMarker(frameId, color, name, note, duration, customData) end
---Returns a dict (frameId -> {information}) of all markers and dicts with their information.
---@return Markers
function TimelineItem:GetMarkers() end
---Returns marker {information} for the first matching marker with specified customData.
---@param customData string
---@return Markers
function TimelineItem:GetMarkerByCustomData(customData) end
---Updates customData (string) for the marker at given frameId position. CustomData is not exposed via UI and is useful for scripting developer to attach any user specific data to markers.
---@param frameId number
---@param customData string
---@return boolean
function TimelineItem:UpdateMarkerCustomData(frameId, customData) end
---Returns customData string for the marker at given frameId position.
---@param frameId number
---@return string
function TimelineItem:GetMarkerCustomData(frameId) end
---Delete all markers of the specified color from the timeline item. "All" as argument deletes all color markers.
---@param color MarkerColor | "All"
---@return boolean
function TimelineItem:DeleteMarkersByColor(color) end
---Delete marker at frame number from the timeline item.
---@param frameNum number
---@return boolean
function TimelineItem:DeleteMarkerAtFrame(frameNum) end
---Delete first matching marker with specified customData.
---@param customData string
---@return boolean
function TimelineItem:DeleteMarkerByCustomData(customData) end
---Adds a flag with given color (string).
---@param color FlagColor
---@return boolean
function TimelineItem:AddFlag(color) end
---Returns a list of flag colors assigned to the item.
---@return FlagColor[]
function TimelineItem:GetFlagList() end
---Clear flags of the specified color. An "All" argument is supported to clear all flags.
---@param color FlagColor | "All"
---@return boolean
function TimelineItem:ClearFlags(color) end
---Returns the item color as a string.
---@return ClipColor
function TimelineItem:GetClipColor() end
---Sets the item color based on the colorName (string).
---@param colorName ClipColor
---@return boolean
function TimelineItem:SetClipColor(colorName) end
---Clears the item color.
---@return boolean
function TimelineItem:ClearClipColor() end
---Adds a new Fusion composition associated with the timeline item.
---@return FusionComp
function TimelineItem:AddFusionComp() end
---Imports a Fusion composition from given file path by creating and adding a new composition for the item.
---@param path string
---@return FusionComp
function TimelineItem:ImportFusionComp(path) end
---Exports the Fusion composition based on given index to the path provided.
---@param path string
---@param compIndex number
---@return boolean
function TimelineItem:ExportFusionComp(path, compIndex) end
---Deletes the named Fusion composition.
---@param compName string
---@return boolean
function TimelineItem:DeleteFusionCompByName(compName) end
---Loads the named Fusion composition as the active composition.
---@param compName string
---@return FusionComp
function TimelineItem:LoadFusionCompByName(compName) end
---Renames the Fusion composition identified by oldName.
---@param oldName string
---@param newName string
---@return boolean
function TimelineItem:RenameFusionCompByName(oldName, newName) end
---Adds a new color version for a video clipbased on versionType (0 - local, 1 - remote).
---@param versionName string
---@param versionType number 0 - local, 1 - remote
---@return boolean
function TimelineItem:AddVersion(versionName, versionType) end
---Returns the current version of the video clip. The returned value will have the keys versionName and versionType (0 - local, 1 - remote).
---@return { versionName: string, versionType: number }
function TimelineItem:GetCurrentVersion() end
---Deletes a color version by name and versionType (0 - local, 1 - remote).
---@param versionName string
---@param versionType number 0 - local, 1 - remote
---@return boolean
function TimelineItem:DeleteVersionByName(versionName, versionType) end
---Loads a named color version as the active version. versionType: 0 - local, 1 - remote.
---@param versionName string
---@param versionType number 0 - local, 1 - remote
---@return boolean
function TimelineItem:LoadVersionByName(versionName, versionType) end
---Renames the color version identified by oldName and versionType (0 - local, 1 - remote).
---@param oldName string
---@param newName string
---@param versionType number 0 - local, 1 - remote
---@return boolean
function TimelineItem:RenameVersionByName(oldName, newName, versionType) end
---Returns a list of all color versions for the given versionType (0 - local, 1 - remote).
---@param versionType number 0 - local, 1 - remote
---@return string[]
function TimelineItem:GetVersionNameList(versionType) end
---Returns the media pool item corresponding to the timeline item if one exists.
---@return MediaPoolItem | ""
function TimelineItem:GetMediaPoolItem() end
---Returns a dict (offset -> value) of keyframe offsets and respective convergence values.
---@return { [number]: number }
function TimelineItem:GetStereoConvergenceValues() end
---For the LEFT eye -> returns a dict (offset -> dict) of keyframe offsets and respective floating window params. Value at particular offset includes the left, right, top and bottom floating window values.
---@return { [number]: number }
function TimelineItem:GetStereoLeftFloatingWindowParams() end
---For the RIGHT eye -> returns a dict (offset -> dict) of keyframe offsets and respective floating window params. Value at particular offset includes the left, right, top and bottom floating window values.
---@return { [number]: number }
function TimelineItem:GetStereoRightFloatingWindowParams() end
---Returns the number of nodes in the current graph for the timeline item
---@return number
function TimelineItem:GetNumNodes() end
---Sets LUT on the node mapping the node index provided, 1 <= nodeIndex <= total number of nodes.
---The lutPath can be an absolute path, or a relative path (based off custom LUT paths or the master LUT path).
---The operation is successful for valid lut paths that Resolve has already discovered (see Project.RefreshLUTList).
---@param nodeIndex number
---@param lutPath string
---@return boolean
function TimelineItem:SetLUT(nodeIndex, lutPath) end
---Gets relative LUT path based on the node index provided, 1 <= nodeIndex <= total number of nodes.
---@param nodeIndex number
---@return string
function TimelineItem:GetLUT(nodeIndex) end
---Keys of map are: "NodeIndex", "Slope", "Offset", "Power", "Saturation", where 1 <= NodeIndex <= total number of nodes.
---Example python code - SetCDL({"NodeIndex" : "1", "Slope" : "0.5 0.4 0.2", "Offset" : "0.4 0.3 0.2", "Power" : "0.6 0.7 0.8", "Saturation" : "0.65"})
---@param CDLmap CDLMap
---@return boolean
function TimelineItem:SetCDL(CDLmap) end
---Adds mediaPoolItem as a new take. Initializes a take selector for the timeline item if needed. By default, the full clip extents is added. startFrame (int) and endFrame (int) are optional arguments used to specify the extents.
---@param mediaPoolItem MediaPoolItem
---@param startFrame? number
---@param endFrame? number
---@return boolean
function TimelineItem:AddTake(mediaPoolItem, startFrame, endFrame) end
---Returns the index of the currently selected take, or 0 if the clip is not a take selector.
---@return number
function TimelineItem:GetSelectedTakeIndex() end
---Returns the number of takes in take selector, or 0 if the clip is not a take selector.
---@return number
function TimelineItem:GetTakesCount() end
---Returns a dict (keys "startFrame", "endFrame" and "mediaPoolItem") with take info for specified index.
---@param idx number
---@return TakeInfo
function TimelineItem:GetTakeByIndex(idx) end
---Deletes a take by index, 1 <= idx <= number of takes.
---@param idx number
---@return boolean
function TimelineItem:DeleteTakeByIndex(idx) end
---Selects a take by index, 1 <= idx <= number of takes.
---@param idx number
---@return boolean
function TimelineItem:SelectTakeByIndex(idx) end
---Finalizes take selection.
---@return boolean
function TimelineItem:FinalizeTake() end
---Copies the current grade to all the items in tgtTimelineItems list. Returns True on success and False if any error occurred.
---@param tgtTimelineItems TimelineItem[]
---@return boolean
function TimelineItem:CopyGrades(tgtTimelineItems) end
---Updates sidecar file for BRAW clips or RMD file for R3D clips. Added in Resolve 18
---@return boolean
function TimelineItem:UpdateSidecar() end
---Returns a unique ID for the timeline item. Added in Resolve 18
---@return string
function TimelineItem:GetUniqueId() end
---@class Timeline
local Timeline = { }
---Returns the timeline name.
---@return string
function Timeline:GetName() end
---Sets the timeline name if timelineName (string) is unique. Returns True if successful.
---@param timelineName string
---@return boolean
function Timeline:SetName(timelineName) end
---Returns the frame number at the start of timeline.
---@return number
function Timeline:GetStartFrame() end
---Returns the frame number at the end of timeline.
---@return number
function Timeline:GetEndFrame() end
---Set the start timecode of the timeline to the string "timecode". Returns true when the change is successful, false otherwise.
---@param timecode string
---@return boolean
function Timeline:SetStartTimecode(timecode) end
---Returns the start timecode for the timeline.
---@return string
function Timeline:GetStartTimecode() end
---Returns the number of tracks for the given track type ("audio", "video" or "subtitle").
---@param trackType TrackType
---@return number
function Timeline:GetTrackCount(trackType) end
---Returns a list of timeline items on that track (based on trackType and index). 1 <= index <= GetTrackCount(trackType).
---@param trackType TrackType
---@param index number
---@return TimelineItem[]
function Timeline:GetItemListInTrack(trackType, index) end
---Creates a new marker at given frameId position and with given marker information. "customData" is optional and helps to attach user specific data to the marker.
---@param frameId number
---@param color MarkerColor
---@param name string
---@param note string
---@param duration number
---@param customData string
---@return boolean
function Timeline:AddMarker(frameId, color, name, note, duration, customData) end
---Returns a dict (frameId -> {information}) of all markers and dicts with their information.
---@return Markers
function Timeline:GetMarkers() end
---Returns marker {information} for the first matching marker with specified customData.
---@param customData string
---@return Markers
function Timeline:GetMarkerByCustomData(customData) end
---Updates customData (string) for the marker at given frameId position. CustomData is not exposed via UI and is useful for scripting developer to attach any user specific data to markers.
---@param frameId number
---@param customData string
---@return boolean
function Timeline:UpdateMarkerCustomData(frameId, customData) end
---Returns customData string for the marker at given frameId position.
---@param frameId number
---@return string
function Timeline:GetMarkerCustomData(frameId) end
---Deletes all timeline markers of the specified color. An "All" argument is supported and deletes all timeline markers.
---@param color MarkerColor
---@return boolean
function Timeline:DeleteMarkersByColor(color) end
---Deletes the timeline marker at the given frame number.
---@param frameNum number
---@return boolean
function Timeline:DeleteMarkerAtFrame(frameNum) end
---Delete first matching marker with specified customData.
---@param customData string
---@return boolean
function Timeline:DeleteMarkerByCustomData(customData) end
---Loads a still from given file path (string) and applies grade to Timeline Items with gradeMode (int): 0 - "No keyframes", 1 - "Source Timecode aligned", 2 - "Start Frames aligned".
---@param path string
---@param gradeMode number
---@vararg TimelineItem 0 | 1 | 2
---@return boolean
function Timeline:ApplyGradeFromDRX(path, gradeMode, ...) end
---@param path string
---@param gradeMode number 0 | 1 | 2
---@param items TimelineItem[]
---@return boolean
function Timeline:ApplyGradeFromDRX(path, gradeMode, items) end
---Returns a string timecode representation for the current playhead position, while on Cut, Edit, Color and Deliver pages.
---@return string
function Timeline:GetCurrentTimecode() end
---Sets current playhead position from input timecode for Cut, Edit, Color, Fairlight and Deliver pages.
---@param timecode string
---@return boolean
function Timeline:SetCurrentTimecode(timecode) end
---Returns the current video timeline item.
---@return TimelineItem
function Timeline:GetCurrentVideoItem() end
---Returns a dict (keys "width", "height", "format" and "data") with data containing raw thumbnail image data (RGB 8-bit image data encoded in base64 format) for current media in the Color Page. An example of how to retrieve and interpret thumbnails is provided in 6_get_current_media_thumbnail.py in the Examples folder.
---@return ThumbnailData
function Timeline:GetCurrentClipThumbnailImage() end
---Returns the track name for track indicated by trackType ("audio", "video" or "subtitle") and index. 1 <= trackIndex <= GetTrackCount(trackType).
---@param trackType TrackType
---@param trackIndex number
---@return string
function Timeline:GetTrackName(trackType, trackIndex) end
---Sets the track name (string) for track indicated by trackType ("audio", "video" or "subtitle") and index. 1 <= trackIndex <= GetTrackCount(trackType).
---@param trackType TrackType
---@param trackIndex number
---@param name string
---@return boolean
function Timeline:SetTrackName(trackType, trackIndex, name) end
---Duplicates the timeline and returns the created timeline, with the (optional) timelineName, on success.
---@param timelineName string
---@return Timeline
function Timeline:DuplicateTimeline(timelineName) end
---Creates a compound clip of input timeline items with an optional clipInfo map: {"startTimecode" : "00:00:00:00", "name" : "Compound Clip 1"}. It returns the created timeline item.
---@param timelineItems TimelineItem[]
---@param clipInfo CompoundClipInfo
---@return TimelineItem
function Timeline:CreateCompoundClip(timelineItems, clipInfo) end
---Creates a Fusion clip of input timeline items. It returns the created timeline item.
---@param timelineItems TimelineItem[]
---@return TimelineItem
function Timeline:CreateFusionClip(timelineItems) end
---Imports timeline items from an AAF file and optional importOptions dict into the timeline, with support for the keys:
---@param filePath string
---@param importOptions TimelineAAFImportOptions
---@return boolean
function Timeline:ImportIntoTimeline(filePath, importOptions) end
---Exports timeline to "file" as per input type & subtype format.
---@param file string
---@param type TimelineExportType
---@param subtype? TimelineExportSubType
---@return boolean
function Timeline:Export(file, type, subtype) end
---Returns value of timeline setting (indicated by settingName : string). Check the section below for more information.
---@param settingName string
---@return string
function Timeline:GetSetting(settingName) end
---Sets timeline setting (indicated by settingName : string) to the value (settingvalue : string). Check the section below for more information.
---@param settingName string
---@param settingValue string
---@return boolean
function Timeline:SetSetting(settingName, settingValue) end
---Inserts a generator (indicated by generatorName : string) into the timeline.
---@param generatorName string
---@return TimelineItem
function Timeline:InsertGeneratorIntoTimeline(generatorName) end
---Inserts a Fusion generator (indicated by generatorName : string) into the timeline.
---@param generatorName string
---@return TimelineItem
function Timeline:InsertFusionGeneratorIntoTimeline(generatorName) end
---Inserts a Fusion composition into the timeline.
---@return TimelineItem
function Timeline:InsertFusionCompositionIntoTimeline() end
---Inserts an OFX generator (indicated by generatorName : string) into the timeline.
---@param generatorName string
---@return TimelineItem
function Timeline:InsertOFXGeneratorIntoTimeline(generatorName) end
---Inserts a title (indicated by titleName : string) into the timeline.
---@param titleName string
---@return TimelineItem
function Timeline:InsertTitleIntoTimeline(titleName) end
---Inserts a Fusion title (indicated by titleName : string) into the timeline.
---@param titleName string
---@return TimelineItem
function Timeline:InsertFusionTitleIntoTimeline(titleName) end
---Grabs still from the current video clip. Returns a GalleryStill object.
---@return GalleryStill
function Timeline:GrabStill() end
---Grabs stills from all the clips of the timeline at "stillFrameSource" (1 - First frame, 2 - Middle frame). Returns the list of GalleryStill objects.
---@param stillFrameSource number 1 | 2
---@return GalleryStill
function Timeline:GrabAllStills(stillFrameSource) end
---Returns a unique ID for the timeline. Added in Resolve 18
---@return string
function Timeline:GetUniqueId() end
---@class MediaStorage
local MediaStorage = { }
---Returns list of folder paths corresponding to mounted volumes displayed in Resolve’s Media Storage.
---@return string[]
function MediaStorage:GetMountedVolumeList() end
---Returns list of absolute folder paths in the given absolute folder path.
---@param folderPath string
---@return string[]
function MediaStorage:GetSubFolderList(folderPath) end
---Returns list of media and file listings in the given absolute folder path. Note that media listings may be logically consolidated entries.
---@param folderPath string
---@return string[]
function MediaStorage:GetFileList(folderPath) end
---Expands and displays given file/folder path in Resolve’s Media Storage.
---@param path string
---@return boolean
function MediaStorage:RevealInStorage(path) end
---Adds specified file/folder paths from Media Storage into current Media Pool folder. Input is one or more file/folder paths. Returns a list of the MediaPoolItems created.
---@param ... string
---@return MediaPoolItem[]
function MediaStorage:AddItemListToMediaPool(...) end
---@param items string[]
---@return MediaPoolItem[]
function MediaStorage:AddItemListToMediaPool(items) end
---Adds specified media files as mattes for the specified MediaPoolItem.
---@param mediaPoolItem MediaPoolItem
---@param paths string[]
---@param stereoEye "left" | "right" | nil An optional argument for specifying which eye to add the matte to for stereo clips ("left" or "right")
---@return boolean # Returns True if successful.
function MediaStorage:AddClipMattesToMediaPool(mediaPoolItem, paths, stereoEye) end
---Adds specified media files as timeline mattes in current media pool folder. Returns a list of created MediaPoolItems.
---@param paths string[]
---@return MediaPoolItem[]
function MediaStorage:AddTimelineMattesToMediaPool(paths) end
---@class MediaPoolFolder
local MediaPoolFolder = { }
---Returns a list of clips (items) within the folder.
---@return MediaPoolItem[]
function MediaPoolFolder:GetClipList() end
---Returns the media folder name.
---@return string
function MediaPoolFolder:GetName() end
---Returns a list of subfolders in the folder.
---@return MediaPoolFolder[]
function MediaPoolFolder:GetSubFolderList() end
---Returns true if folder is stale in collaboration mode, false otherwise
---@return boolean
function MediaPoolFolder:GetIsFolderStale() end
---Returns a unique ID for the media pool folder. Added in Resolve 18
---@return string
function MediaPoolFolder:GetUniqueId() end
---@class MediaPool
local MediaPool = { }
---Returns root Folder of Media Pool
---@return MediaPoolFolder
function MediaPool:GetRootFolder() end
---Adds new subfolder under specified Folder object with the given name.
---@param folder MediaPoolFolder
---@param name string
---@return MediaPoolFolder
function MediaPool:AddSubFolder(folder, name) end
---Updates the folders in collaboration mode
---@return boolean
function MediaPool:RefreshFolders() end
---Adds new timeline with given name.
---@param name string
---@return Timeline
function MediaPool:CreateEmptyTimeline(name) end
---Appends specified MediaPoolItem objects in the current timeline. Returns the list of appended timelineItems.
---@param ... MediaPoolItem
---@return TimelineItem
function MediaPool:AppendToTimeline(...) end
---@param clips MediaPoolItem[]
---@return TimelineItem[]
function MediaPool:AppendToTimeline(clips) end
---@param clipInfos MediaPoolItemClipInfo[]
---@return TimelineItem[]
function MediaPool:AppendToTimeline(clipInfos) end
---Creates new timeline with specified name, and appends the specified MediaPoolItem objects.
---@param name string
---@param ... MediaPoolItem
---@return Timeline
function MediaPool:CreateTimelineFromClips(name, ...) end
---@param name string
---@param clips MediaPoolItem[]
---@return Timeline
function MediaPool:CreateTimelineFromClips(name, clips) end
---@param name string
---@param clipInfo MediaPoolItemClipInfo[]
---@return Timeline
---Creates new timeline with specified name, appending the list of clipInfos specified as a dict of "mediaPoolItem", "startFrame" (int), "endFrame" (int).
function MediaPool:CreateTimelineFromClips(name, clipInfo) end
---Creates timeline based on parameters within given file and optional importOptions dict
---@param filePath string
---@param importOptions TimelineImportOptions
---@return Timeline
function MediaPool:ImportTimelineFromFile(filePath, importOptions) end
---Deletes specified timelines in the media pool.
---@param timelines Timeline[]
---@return boolean
function MediaPool:DeleteTimelines(timelines) end
---Returns currently selected Folder.
---@return MediaPoolFolder
function MediaPool:GetCurrentFolder() end
---Sets current folder by given Folder.
---@param folder MediaPoolFolder
---@return boolean
function MediaPool:SetCurrentFolder(folder) end
---Deletes specified clips or timeline mattes in the media pool
---@param clips MediaPoolItem[]
---@return boolean
function MediaPool:DeleteClips(clips) end
---Deletes specified subfolders in the media pool
---@param subfolders MediaPoolFolder[]
---@return boolean
function MediaPool:DeleteFolders(subfolders) end
---Moves specified clips to target folder.
---@param clips MediaPoolItem[]
---@param targetFolder MediaPoolFolder
---@return boolean
function MediaPool:MoveClips(clips, targetFolder) end
---Moves specified folders to target folder.
---@param folders MediaPoolFolder[]
---@param targetFolder MediaPoolFolder
---@return boolean
function MediaPool:MoveFolders(folders, targetFolder) end
---Get mattes for specified MediaPoolItem, as a list of paths to the matte files.
---@param mediaPoolItem MediaPoolItem
---@return string[]
function MediaPool:GetClipMatteList(mediaPoolItem) end
---Get mattes in specified Folder, as list of MediaPoolItems.
---@param folder MediaPoolFolder
---@return MediaPoolItem[]
function MediaPool:GetTimelineMatteList(folder) end
---Delete mattes based on their file paths, for specified MediaPoolItem. Returns True on success.
---@param mediaPoolItem MediaPoolItem
---@param paths string[]
---@return boolean
function MediaPool:DeleteClipMattes(mediaPoolItem, paths) end
---Update the folder location of specified media pool clips with the specified folder path.
---@param mediaPoolItem MediaPoolItem[]
---@param folderPath string
---@return boolean
function MediaPool:RelinkClips(mediaPoolItem, folderPath) end
---Unlink specified media pool clips.
---@param mediaPoolItems MediaPoolItem[]
---@return boolean
function MediaPool:UnlinkClips(mediaPoolItems) end
---Imports specified file/folder paths into current Media Pool folder. Input is an array of file/folder paths. Returns a list of the MediaPoolItems created.
---@param items string[]
---@return MediaPoolItem[]
function MediaPool:ImportMedia(items) end
---@param clipInfo MediaPoolItemClipInfo[]
---@return MediaPoolItem[]
function MediaPool:ImportMedia(clipInfo) end
---Exports metadata of specified clips to "fileName" in CSV format. If no clips are specified, all clips from media pool will be used.
---@param fileName string
---@param clips MediaPoolItem[]
---@return boolean
function MediaPool:ExportMetadata(fileName, clips) end
---Returns a unique ID for the media pool. Added in Resolve 18
---@return string
function MediaPool:GetUniqueId() end
---@class Project
local Project = { }
---Returns the Media Pool object.
---@return MediaPool
function Project:GetMediaPool() end
---Returns the number of timelines currently present in the project.
---@return number
function Project:GetTimelineCount() end
---Returns timeline at the given index, 1 <= idx <= project:GetTimelineCount()
---@param idx number
---@return Timeline
function Project:GetTimelineByIndex(idx) end
---Returns the currently loaded timeline.
---@return Timeline
function Project:GetCurrentTimeline() end
---Sets given timeline as current timeline for the project. Returns True if successful.
---@param timeline Timeline
---@return boolean
function Project:SetCurrentTimeline(timeline) end
---Returns the Gallery object.
---@return Gallery
function Project:GetGallery() end
---Returns project name.
---@return string
function Project:GetName() end
---Sets project name if given projectname (string) is unique.
---@param projectName string
---@return boolean
function Project:SetName(projectName) end
---Returns a list of presets and their information.
---@return { Name: string, Width: number, Height: number }[]
function Project:GetPresetList() end
---Sets preset by given presetName (string) into project.
---@param presetName string
---@return boolean
function Project:SetPreset(presetName) end
---Adds a render job based on current render settings to the render queue. Returns a unique job id (string) for the new render job.
---@return string
function Project:AddRenderJob() end
---Deletes render job for input job id (string).
---@param jobId string
---@return boolean
function Project:DeleteRenderJob(jobId) end
---Deletes all render jobs in the queue.
---@return boolean
function Project:DeleteAllRenderJobs() end
---Returns a list of render jobs and their information.
---@return (RenderJob | nil)[]
function Project:GetRenderJobList() end
---Returns a list of render presets and their information.
---@return string[]
function Project:GetRenderPresetList() end
---Starts rendering jobs indicated by the input job ids.
---@param ... string
---@return boolean
function Project:StartRendering(...) end
---@param jobIds string[]
---@param isInteractiveMode? boolean
---@return boolean
function Project:StartRendering(jobIds, isInteractiveMode) end
---@param isInteractiveMode? boolean
---@return boolean
function Project:StartRendering(isInteractiveMode) end
---Stops any current render processes.
---@return nil
function Project:StopRendering() end
---Returns True if rendering is in progress.
---@return boolean
function Project:IsRenderingInProgress() end
---Sets a preset as current preset for rendering if presetName (string) exists.
---@param presetName string
---@return boolean
function Project:LoadRenderPreset(presetName) end
---Creates new render preset by given name if presetName(string) is unique.
---@param presetName string
---@return boolean
function Project:SaveAsNewRenderPreset(presetName) end
---Sets given settings for rendering. Settings is a dict, with support for the keys:
---@param settings RenderSetting
---@return boolean
function Project:SetRenderSettings(settings) end
---Returns a dict with job status and completion percentage of the job by given jobId (string).
---@param jobId string
---@return RenderJobStatus
function Project:GetRenderJobStatus(jobId) end
---Returns value of project setting (indicated by settingName, string). Check the section below for more information.
---@return ProjectSetting
function Project:GetSetting() end
---@param settingName "superScale"
---@return SuperScaleSetting
function Project:GetSetting(settingName) end
---@param settingName "timelineFrameRate"
---@return number
function Project:GetSetting(settingName) end
---@param settingName string
---@return string
function Project:GetSetting(settingName) end
---Sets the project setting (indicated by settingName, string) to the value (settingValue, string). Check the section below for more information.
---@param settingName "superScale"
---@param settingValue SuperScaleSetting
---@return boolean
function Project:SetSetting(settingName, settingValue) end
---@param settingName "timelineFrameRate"
---@param settingValue number
---@return boolean
function Project:SetSetting(settingName, settingValue) end
---@param settingName string
---@param settingValue string
---@return boolean
function Project:SetSetting(settingName, settingValue) end
---Returns a dict (format -> file extension) of available render formats.
---@return { [string]: string }
function Project:GetRenderFormats() end
---Returns a dict (codec description -> codec name) of available codecs for given render format (string).
---@return { [string]: string }
function Project:GetRenderCodecs(renderFormat) end
---Returns a dict with currently selected format "format" and render codec "codec".
---@return { codec: string, format: string }
function Project:GetCurrentRenderFormatAndCodec() end
---Sets given render format (string) and render codec (string) as options for rendering.
---@param format string
---@param codec string
---@return boolean
function Project:SetCurrentRenderFormatAndCodec(format, codec) end
---Returns the render mode: 0 - Individual clips, 1 - Single clip.
---@return number
function Project:GetCurrentRenderMode() end
---Sets the render mode.
---@param renderMode number Specify renderMode = 0 for Individual clips, 1 for Single clip.
---@return boolean
function Project:SetCurrentRenderMode(renderMode) end
---Returns list of resolutions applicable for the given render format (string) and render codec (string). Returns full list of resolutions if no argument is provided. Each element in the list is a dictionary with 2 keys "Width" and "Height".
---@param format string
---@param codec string
---@return { Width: number, Height: number }[]
function Project:GetRenderResolutions(format, codec) end
---Refreshes LUT List
---@return boolean
function Project:RefreshLUTList() end
---Returns a unique ID for the project item. Added in Resolve 18
---@return string
function Project:GetUniqueId() end
---@class ProjectManager
local ProjectManager = { }
---Archives project to provided file path with the configuration as provided by the optional arguments
---@param projectName string
---@param filePath string
---@param isArchiveSrcMedia? boolean
---@param isArchiveRenderCache? boolean
---@param isArchiveProxyMedia? boolean
---@return boolean
function ProjectManager:ArchiveProject(projectName, filePath, isArchiveSrcMedia, isArchiveRenderCache, isArchiveProxyMedia) end
---Creates and returns a project if projectName (string) is unique, and None if it is not.
---@param projectName string
---@return Project
function ProjectManager:CreateProject(projectName) end
---Delete project in the current folder if not currently loaded
---@param projectName string
---@return boolean
function ProjectManager:DeleteProject(projectName) end
---Loads and returns the project with name = projectName (string) if there is a match found, and None if there is no matching Project.
---@param projectName string
---@return Project?
function ProjectManager:LoadProject(projectName) end
---Returns the currently loaded Resolve project.
---@return Project
function ProjectManager:GetCurrentProject() end
---Saves the currently loaded project with its own name. Returns True if successful.
---@return boolean
function ProjectManager:SaveProject() end
---Closes the specified project without saving.
---@param project Project
---@return boolean
function ProjectManager:CloseProject(project) end
---Creates a folder if folderName (string) is unique.
---@param folderName string
---@return boolean
function ProjectManager:CreateFolder(folderName) end
---Deletes the specified folder if it exists. Returns True in case of success.
---@param folderName string
---@return boolean
function ProjectManager:DeleteFolder(folderName) end
---Returns a list of project names in current folder.
---@return string[]
function ProjectManager:GetProjectListInCurrentFolder() end
---Returns a list of folder names in current folder.
---@return string[]
function ProjectManager:GetFolderListInCurrentFolder() end
---Opens root folder in database.
---@return boolean
function ProjectManager:GotoRootFolder() end
---Opens parent folder of current folder in database if current folder has parent.
---@return boolean
function ProjectManager:GotoParentFolder() end
---Returns the current folder name.
---@return string
function ProjectManager:GetCurrentFolder() end
---Opens folder under given name.
---@param folderName string
---@return boolean
function ProjectManager:OpenFolder(folderName) end
---Imports a project from the file path provided with given project name, if any. Returns True if successful.
---@param filePath string
---@param name? string
---@return boolean
function ProjectManager:ImportProject(filePath, name) end
---Exports project to provided file path, including stills and LUTs if withStillsAndLUTs is True (enabled by default). Returns True in case of success.
---@param projectName string
---@param filePath string
---@param withStillsAndLUTs boolean
---@return boolean
function ProjectManager:ExportProject(projectName, filePath, withStillsAndLUTs) end
---Restores a project from the file path provided with given project name, if any. Returns True if successful.
---@param filePath string
---@param name? string
---@return boolean
function ProjectManager:RestoreProject(filePath, name) end
---Returns a dictionary (with keys "DbType", "DbName" and optional "IpAddress") corresponding to the current database connection
---@return DataBaseInfo
function ProjectManager:GetCurrentDatabase() end
---Returns a list of dictionary items (with keys "DbType", "DbName" and optional "IpAddress") corresponding to all the databases added to Resolve
---@return DataBaseInfo[]
function ProjectManager:GetDatabaseList() end
---Switches current database connection to the database specified by the keys below, and closes any open project.
---@param dbInfo DataBaseInfo
---@return boolean
function ProjectManager:SetCurrentDatabase(dbInfo) end
---@class Gallery
local Gallery = { }
---Returns the name of the GalleryStillAlbum object "galleryStillAlbum".
---@param galleryStillAlbum GalleryStillAlbum
---@return string
function Gallery:GetAlbumName(galleryStillAlbum) end
---Sets the name of the GalleryStillAlbum object "galleryStillAlbum" to "albumName".
---@param galleryStillAlbum GalleryStillAlbum
---@param albumName string
---@return boolean
function Gallery:SetAlbumName(galleryStillAlbum, albumName) end
---Returns current album as a GalleryStillAlbum object.
---@return GalleryStillAlbum
function Gallery:GetCurrentStillAlbum() end
---Sets current album to GalleryStillAlbum object "galleryStillAlbum".
---@param galleryStillAlbum GalleryStillAlbum
---@return boolean
function Gallery:SetCurrentStillAlbum(galleryStillAlbum) end
---Returns the gallery albums as a list of GalleryStillAlbum objects.
---@return GalleryStillAlbum[]
function Gallery:GetGalleryStillAlbums() end
---@class GalleryStillAlbum
local GalleryStillAlbum = { }
---Returns the list of GalleryStill objects in the album.
---@return GalleryStill[]
function GalleryStillAlbum:GetStills() end
---Returns the label of the galleryStill.
---@param galleryStill GalleryStill
---@return string
function GalleryStillAlbum:GetLabel(galleryStill) end
---Sets the new "label" to GalleryStill object "galleryStill".
---@param galleryStill GalleryStill
---@param label string
---@return boolean
function GalleryStillAlbum:SetLabel(galleryStill, label) end
---Exports list of GalleryStill objects "[galleryStill]" to directory "folderPath", with filename prefix "filePrefix", using file format "format" (supported formats: dpx, cin, tif, jpg, png, ppm, bmp, xpm).
---@param galleryStills GalleryStill[]
---@param path string
---@param filePrefix string
---@param format StillExportFormat
---@return boolean
function GalleryStillAlbum:ExportStills(galleryStills, path, filePrefix, format) end
---Deletes specified list of GalleryStill objects "[galleryStill]".
---@param galleryStills GalleryStill[]
---@return boolean
function GalleryStillAlbum:DeleteStills(galleryStills) end
---@class DaVinciResolve
---@field EXPORT_AAF TimelineExportType
---@field EXPORT_DOLBY_VISION_VER_2_9 TimelineExportType
---@field EXPORT_DOLBY_VISION_VER_4_0 TimelineExportType
---@field EXPORT_DRT TimelineExportType
---@field EXPORT_EDL TimelineExportType
---@field EXPORT_FCP_7_XML TimelineExportType
---@field EXPORT_FCPXML_1_3 TimelineExportType
---@field EXPORT_FCPXML_1_4 TimelineExportType
---@field EXPORT_FCPXML_1_5 TimelineExportType
---@field EXPORT_FCPXML_1_6 TimelineExportType
---@field EXPORT_FCPXML_1_7 TimelineExportType
---@field EXPORT_FCPXML_1_8 TimelineExportType
---@field EXPORT_FCPXML_1_9 TimelineExportType
---@field EXPORT_FCPXML_1_10 TimelineExportType
---@field EXPORT_HDR_10_PROFILE_A TimelineExportType
---@field EXPORT_HDR_10_PROFILE_B TimelineExportType
---@field EXPORT_TEXT_CSV TimelineExportType
---@field EXPORT_TEXT_TAB TimelineExportType
---@field EXPORT_AAF_EXISTING TimelineExportAAFSubType
---@field EXPORT_AAF_NEW TimelineExportAAFSubType
---@field EXPORT_CDL TimelineExportEDLSubType
---@field EXPORT_MISSING_CLIPS TimelineExportEDLSubType
---@field EXPORT_NONE TimelineExportEDLSubType
---@field EXPORT_SDL TimelineExportEDLSubType
local DaVinciResolve = { }
---Returns the Fusion object. Starting point for Fusion scripts. Returns Fusion
---@return unknown
function DaVinciResolve:Fusion() end
---Returns the media storage object to query and act on media locations. Returns MediaStorage
---@return MediaStorage
function DaVinciResolve:GetMediaStorage() end
---Returns the project manager object for currently open database. Returns ProjectManager
---@return ProjectManager
function DaVinciResolve:GetProjectManager() end
---Switches to indicated page in DaVinci Resolve. Input can be one of ("media", "cut", "edit", "fusion", "color", "fairlight", "deliver").
---@param pageName PageName
---@return boolean
function DaVinciResolve:OpenPage(pageName) end
---Returns the page currently displayed in the main window. Returned value can be one of ("media", "cut", "edit", "fusion", "color", "fairlight", "deliver", None).
---@return PageName
function DaVinciResolve:GetCurrentPage() end
---Returns product name.
---@return string
function DaVinciResolve:GetProductName() end
---Returns list of product version fields in [major, minor, patch, build, suffix] format.
---@return string[]
function DaVinciResolve:GetVersion() end
---Returns product version in "major.minor.patch[suffix].build" format.
---@return string
function DaVinciResolve:GetVersionString() end
---Loads UI layout from saved preset named "presetName".
---@param presetName string
---@return boolean
function DaVinciResolve:LoadLayoutPreset(presetName) end
---Overwrites preset named "presetName" with current UI layout.
---@param presetName string
---@return boolean
function DaVinciResolve:UpdateLayoutPreset(presetName) end
---Exports preset named "presetName" to path "presetFilePath".
---@param presetName string
---@param presetFilePath string
---@return boolean
function DaVinciResolve:ExportLayoutPreset(presetName, presetFilePath) end
---Deletes preset named "presetName".
---@param presetName string
---@return boolean
function DaVinciResolve:DeleteLayoutPreset(presetName) end
---Saves current UI layout as a preset named "presetName".
---@param presetName string
---@return boolean
function DaVinciResolve:SaveLayoutPreset(presetName) end
---Imports preset from path "presetFilePath". The optional argument "presetName" specifies how the preset shall be named. If not specified, the preset is named based on the filename.
---@param presetFilePath string
---@param presetName string
---@return boolean
function DaVinciResolve:ImportLayoutPreset(presetFilePath, presetName) end
---@return nil
function DaVinciResolve:Quit() end
---@return DaVinciResolve
function Resolve() end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment