Skip to content

Commit

Permalink
audio offset will be evaluated and applied
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapjanvdg committed Jan 10, 2025
1 parent d7f606d commit ed863d3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions hooks/tk-maya/render_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def render(
version,
engine_settings,
sound_path = None,
#sound_offset,
sound_offset = None,
):
"""
Render the media
Expand Down Expand Up @@ -68,7 +68,7 @@ def render(
version,
engine_settings,
sound_path,
#sound_offset,
sound_offset,
)

old_motion_blur = maya.mel.eval('getAttr "hardwareRenderingGlobals.motionBlurEnable";')
Expand Down Expand Up @@ -136,7 +136,7 @@ def get_default_playblastlast_args(
version,
engine_settings,
sound_path,
#sound_offset,
sound_offset,
):
"""
Build the playblast command arguments. This implementation grab the playblast arguments from Maya.
Expand Down
4 changes: 2 additions & 2 deletions python/tk_multi_reviewsubmission2/create_slate.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def run_slate(self, inputFile, outputFile, projectFile, settings):
logo_path = logo_path.replace(os.sep, "/")

sound_path = settings["sound_path"]
#sound_offset = settings["sound_offset"]
sound_offset = settings["sound_offset"]

# ensure output path exists
self.app.ensure_folder_exists(os.path.dirname(os.path.abspath(outputFile)))
Expand Down Expand Up @@ -106,7 +106,7 @@ def run_slate(self, inputFile, outputFile, projectFile, settings):
str(fps),
logo_path,
str(sound_path),
#sound_offset,
str(sound_offset),
],
shell=True,
stdout=subprocess.PIPE,
Expand Down
4 changes: 2 additions & 2 deletions python/tk_multi_reviewsubmission2/review_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def __init__(self, app, parent=None):
if audio_node is None: # Skip if the audio_node is None
continue
self.audio_filename = maya.cmds.getAttr(f"{audio_node}.filename")
#self.audio_offset = maya.cmds.getAttr(f"{audio_node}.offset")
self.audio_offset = maya.cmds.getAttr(f"{audio_node}.offset")


self.use_antialiasing = QtWidgets.QCheckBox("Anti-aliasing", self)
Expand Down Expand Up @@ -302,7 +302,7 @@ def run(progress):
input_settings["description"] = self.validate_description()
input_settings["version"] = self.file_fields.get("version")
input_settings["sound_path"] = self.audio_filename
#input_settings["sound_offset"] = self.audio_offset
input_settings["sound_offset"] = self.audio_offset

if self.current_engine.name == "tk-houdini":
engine_settings["mplay"] = self.validate_mplay()
Expand Down
4 changes: 2 additions & 2 deletions python/tk_multi_reviewsubmission2/slate.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
fps = float(sys.argv[14])
logo_path = sys.argv[15]
sound_path = sys.argv[16]
#sound_offset = int(float(sys.argv[17]))
sound_offset = int(float(sys.argv[17]))

output_node = None

Expand Down Expand Up @@ -110,7 +110,7 @@ def __get_quicktime_settings():
settings["mov64_fps"] = fps
if sound_path is not None and os.path.isfile(sound_path):
settings["mov64_audiofile"] = sound_path
#settings["mov64_audio_offset"] = sound_offset
settings["mov64_audio_offset"] = sound_offset - 1000
settings["mov64_units"] = "Frames"

# setting output colorspace
Expand Down

0 comments on commit ed863d3

Please sign in to comment.