From 5e92f045ff73d982cff4ca16ddbb36ede56bc07f Mon Sep 17 00:00:00 2001 From: Joseph Yu Date: Fri, 10 May 2019 14:55:17 +0100 Subject: [PATCH 1/2] Ignore tk-metadata --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index f24cd99..e065fe3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# ---- ignore special files written during config setup +tk-metadata + +# compiled python files *.py[co] # Packages From 3b13f900c9bb8da7a1abcb4238fce529a809ef1e Mon Sep 17 00:00:00 2001 From: Joseph Yu Date: Wed, 29 Apr 2020 18:07:40 +0100 Subject: [PATCH 2/2] Added nuke burn ins, slate and resize options --- hooks/tk-nuke/render_media.py | 19 +++++++++++++++++++ info.yml | 15 +++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/hooks/tk-nuke/render_media.py b/hooks/tk-nuke/render_media.py index 2b1f856..759a0ca 100644 --- a/hooks/tk-nuke/render_media.py +++ b/hooks/tk-nuke/render_media.py @@ -141,9 +141,28 @@ def render( burn.node("slate_info")["message"].setValue(slate_str) + # Disable slate expression if not using it + if not self.__app.get_setting("add_slate"): + chooser_knob = burn.node("slate_or_burnin_chooser")["which"] + chooser_knob.setExpression("") + chooser_knob.clearAnimated() + chooser_knob.setValue(1) + + # Disable burn in texts if not using it + if not self.__app.get_setting("add_burn_ins"): + for node_name in [ + "top_left_text", + "top_right_text", + "bottom_left_text", + "framecounter", + ]: + burn.node(node_name)["disable"].setValue(True) + # create a scale node scale = self.__create_scale_node(width, height) scale.setInput(0, burn) + if not self.__app.get_setting("resize_movie"): + scale["disable"].setValue(True) # Create the output node output_node = self.__create_output_node(output_path) diff --git a/info.yml b/info.yml index 5b485e0..638aad0 100644 --- a/info.yml +++ b/info.yml @@ -48,6 +48,21 @@ configuration: as a temporary location for processing before the file is uploaded to Shotgun. + add_burn_ins: + type: bool + default_value: true + description: Add burn ins when rendering the movie file. + + add_slate: + type: bool + default_value: true + description: Add slate when rendering the movie file. + + resize_movie: + type: bool + default_value: true + description: Reformat rendered movie using given/default width, height. + movie_width: type: int default_value: 1920