From 34a723cbdfbbc74fa73e7fa2743741ae868a4cd4 Mon Sep 17 00:00:00 2001 From: Pedro Labonia Date: Sun, 15 May 2022 15:41:50 -0300 Subject: [PATCH 1/2] adding get_lut() on TimelineItem --- pydavinci/wrappers/timelineitem.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pydavinci/wrappers/timelineitem.py b/pydavinci/wrappers/timelineitem.py index 764c7a0..f6005b6 100644 --- a/pydavinci/wrappers/timelineitem.py +++ b/pydavinci/wrappers/timelineitem.py @@ -1,5 +1,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Union + from typing_extensions import Literal + from pydavinci.utils import is_resolve_obj from pydavinci.wrappers.marker import MarkerCollection from pydavinci.wrappers.mediapoolitem import MediaPoolItem @@ -257,7 +259,7 @@ def mediapoolitem(self) -> "MediaPoolItem": def set_lut(self, node_index: int, lut_path: str) -> bool: """ - Sets lut located on ``lut_path`` at ``node_index`` + Sets LUT located on ``lut_path`` at ``node_index`` Args: node_index (int): node index @@ -268,6 +270,18 @@ def set_lut(self, node_index: int, lut_path: str) -> bool: """ return self._obj.SetLUT(node_index, lut_path) + def get_lut(self, node_index: int) -> "str": + """ + Gets LUT at ``node_index`` + + Args: + node_index (int): node index + + Returns: + str: LUT name. Example: ``Sony/SLog3SGamut3.CineToLC-709TypeA.cube`` + """ + return self._obj.GetLUT(node_index) + def set_cdl(self, cdl: Dict[Any, Any]) -> bool: """ Sets CDL From ab339dd41388429b8a29c5f70955d569a1b2d0d5 Mon Sep 17 00:00:00 2001 From: Pedro Labonia Date: Sun, 15 May 2022 15:44:46 -0300 Subject: [PATCH 2/2] fixing docstring --- pydavinci/wrappers/timelineitem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydavinci/wrappers/timelineitem.py b/pydavinci/wrappers/timelineitem.py index f6005b6..a5a2fcd 100644 --- a/pydavinci/wrappers/timelineitem.py +++ b/pydavinci/wrappers/timelineitem.py @@ -278,7 +278,7 @@ def get_lut(self, node_index: int) -> "str": node_index (int): node index Returns: - str: LUT name. Example: ``Sony/SLog3SGamut3.CineToLC-709TypeA.cube`` + str: LUT name. Example: ``'Sony/SLog3SGamut3.CineToLC-709TypeA.cube'`` """ return self._obj.GetLUT(node_index)