Graph#

class pybmd.graph.Graph(graph)[source]

Bases: object

docstring for Graph.

Methods

__init__(graph)

apply_arri_cdl_lut()

Applies ARRI CDL and LUT.

apply_grade_from_drx(path[, grade_mode])

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

get_lut(node_index)

Gets relative LUT path based on the node index provided

get_node_cache_mode(node_index)

Gets the cache mode type on the node.

get_node_label(node_index)

Returns the label of the node at nodeIndex.

get_num_nodes()

Returns the number of nodes in the graph

get_tools_in_node(node_index)

Returns toolsList (list of strings) of the tools used in the node indicated by given nodeIndex (int).

reset_all_grades()

Resets all grades in the graph.

set_lut(node_index, lut_path)

Sets LUT on the node mapping the node index provided :param node_index: 1 <= nodeIndex <= self.GetNumNodes().

set_node_cache_mode(node_index, cache_value)

Sets the cache mode type on the node.

set_node_enabled(node_index, is_enable)

Sets the node at the given nodeIndex (int) to isEnabled (bool).

get_num_nodes() int[source]

Returns the number of nodes in the graph

Returns:

number of nodes in the graph

Return type:

int

set_lut(node_index: int, lut_path: str) bool[source]

Sets LUT on the node mapping the node index provided :param node_index: 1 <= nodeIndex <= self.GetNumNodes(). :type node_index: int :param lut_path: The lutPath can be an absolute path, or a relative path (based off custom LUT paths or the master LUT path). :type lut_path: str

Returns:

The operation is successful for valid lut paths that Resolve has already discovered (see Project.RefreshLUTList).

Return type:

bool

Parameters:
  • node_index (int)

  • lut_path (str)

get_lut(node_index: str) str[source]

Gets relative LUT path based on the node index provided

Parameters:

node_index (str) – 1 <= nodeIndex <= total number of nodes.

Returns:

relative LUT path

Return type:

str

get_node_label(node_index: int) str[source]

Returns the label of the node at nodeIndex.

Parameters:

node_index (int) – 1 <= nodeIndex <= total number of nodes.

Returns:

the label of the node at nodeIndex.

Return type:

str

get_tools_in_node(node_index: int) List[str][source]

Returns toolsList (list of strings) of the tools used in the node indicated by given nodeIndex (int).

Parameters:

node_index (int) – 1 <= nodeIndex <= total number of nodes.

Returns:

toolsList (list of strings) of the tools used in the node indicated by given nodeIndex (int).

Return type:

List[str]

set_node_enabled(node_index: int, is_enable: bool) bool[source]

Sets the node at the given nodeIndex (int) to isEnabled (bool).

Parameters:
  • node_index (int) – 1 <= nodeIndex <= self.GetNumNodes().

  • is_enable (bool) – node is enabled or not

Returns:

Return True if the operation is successful.

Return type:

bool

set_node_cache_mode(node_index: int, cache_value: int) bool[source]

Sets the cache mode type on the node.

Parameters:
  • node_index (int) – 1 <= nodeIndex <= total number of nodes

  • cache_value (int) – Cache mode value to set

  • values (cache_value is an enumerated integer with one of the following) –

    • resolve.CACHE_AUTO_ENABLED = -1

    • resolve.CACHE_DISABLED = 0

    • resolve.CACHE_ENABLED = 1

Returns:

True if successful, False otherwise

Return type:

bool

get_node_cache_mode(node_index: int) int[source]

Gets the cache mode type on the node.

Parameters:

node_index (int) – 1 <= nodeIndex <= total number of nodes

Returns:

Cache mode value of the node.cache_value is an enumerated integer with one of the following values:
  • resolve.CACHE_AUTO_ENABLED = -1

  • resolve.CACHE_DISABLED = 0

  • resolve.CACHE_ENABLED = 1

Return type:

int

apply_grade_from_drx(path: str, grade_mode: int = 0) bool[source]

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

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.

Returns:

True if successful, False otherwise

Return type:

bool

apply_arri_cdl_lut() bool[source]

Applies ARRI CDL and LUT.

Returns:

True if successful, False otherwise

Return type:

bool

reset_all_grades() bool[source]

Resets all grades in the graph.

Returns:

True if all grades were reset successfully, False otherwise

Return type:

bool