Graph.apply_grade_from_drx#

Graph.apply_grade_from_drx(path: str, grade_mode: int = 0, apply_to_all_layers: bool = False, keyframe_mode: KeyframeMode | int | None = None) → bool[source]#

Loads a still from given file path and applies grade to graph.

Applying a grade replaces the graph: after a successful call this Graph object no longer refers to a valid graph. Call get_node_graph() again to keep working with the new one.

Parameters:
  • path (str) – File path to the DRX file

  • grade_mode (int, optional) – 0=”No keyframes”, 1=”Source Timecode aligned”, 2=”Start Frames aligned”. Defaults to 0.

  • apply_to_all_layers (bool, optional) – Apply the grade to all node-stack layers instead of only the active layer. Needs DR 21.1.1+; only sent when True. Defaults to False.

  • keyframe_mode (KeyframeMode | int, optional) – What to apply: all, color only or sizing only. Needs DR 21.1.2+; DaVinci Resolve applies everything when omitted. Defaults to None.

Returns:

True if successful, False otherwise

Return type:

bool

Raises:

APIVersionError – If Resolve version < 19.1.0, or an argument is used on a version that predates it

Version:

Added in DaVinci Resolve 19.1.0. apply_to_all_layers added in 21.1.1, keyframe_mode added in 21.1.2.