This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
nks cut reference videos #23
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
0e61a2d
feat(nks): colecting timecodes with otio
89e5e72
feat(nks): adding media/clip duration to collect frame ranges
cf01f44
feat(nks): collect review identify if mediaSource needs to be trimed
128719a
feat(nks): improving calculation of fps
eff28c1
Merge branch 'develop' into bugfix/ffmpeg_path_burnin_fix
f394b67
Merge branch 'feature/ffmpeg-devide-long-videos' into feature/PYPE-65…
aa3bfa6
Merge branch 'feature/nuke_studio_publish_review_cut_ffmpeg' into fea…
7884097
Merge branch 'develop' into feature/PYPE-654-nks-cut-reference-videos
bda292a
feat(global): review workflow accepting nks host
b149388
feat(nks): adding plugin for cutting video parts
55b3b41
feat(nks): adjusting collect review for cutting
18f6acc
clean(nks): old way of representation data
ac9a20c
fix(nks): improving data
31a7c44
fix(nks): duration method was wrong
b503870
fix(global): original repre tags are included to preset tags
06fbbd6
Merge branch 'develop' into feature/PYPE-654-nks-cut-reference-videos
jakubjezek001 eba14f8
clean(nks): Hound recomendations
jakubjezek001 fdbb6a3
fix(nks): duplicity in hierarchy tag and not matching names clips
jakubjezek001 7ac7600
Merge branch 'bugfix/129-nks_coupe_small_fixes' into feature/PYPE-654…
jakubjezek001 d4899b6
feat(nks): adding empty black frames at handle start if missing
jakubjezek001 a270c55
fix(nks): collect timecodes not used
jakubjezek001 7d689cf
feat(nks): reediting shorter or longer clips with empty frames
jakubjezek001 8f3f3a4
feat(nks): PR comments
jakubjezek001 4342db7
feat(nks): adding comment making more clear the process
jakubjezek001 0d7ed78
feat(nks): resolving PR comment
jakubjezek001 eb28198
Merge branch 'develop' into feature/PYPE-654-nks-cut-reference-videos
jakubjezek001 77d3611
feat(nks): processing PR comments - better readability
jakubjezek001 aa0ae99
fix(nks): plugin should be in extract order.. previous was for testing
jakubjezek001 cb12a83
feat(nks): only copy codec if source should be shortened
jakubjezek001 1581536
fix(global): integrate didn't understand new Anatomy
jakubjezek001 f1dd4fc
fix(global): integrate swap order of padding request from anatomy
jakubjezek001 59c5f36
fix(nks): frame start was not correctly calculated
jakubjezek001 cb42c78
fix(nks): cutting videos added to own folder `cuts`
jakubjezek001 5bfafb2
fix(nks): don't add copy codec if -filter_complex added into cmd
jakubjezek001 0c5b7b7
Merge branch 'develop' into feature/PYPE-654-nks-cut-reference-videos
jakubjezek001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import pyblish.api | ||
import opentimelineio.opentime as otio_ot | ||
|
||
|
||
class CollectClipTimecodes(pyblish.api.InstancePlugin): | ||
"""Collect time with OpenTimelineIO: | ||
source_h(In,Out)[timecode, sec] | ||
timeline(In,Out)[timecode, sec] | ||
""" | ||
|
||
order = pyblish.api.CollectorOrder + 0.101 | ||
label = "Collect Timecodes" | ||
hosts = ["nukestudio"] | ||
|
||
def process(self, instance): | ||
|
||
data = dict() | ||
self.log.debug("__ instance.data: {}".format(instance.data)) | ||
# Timeline data. | ||
handle_start = instance.data["handleStart"] | ||
handle_end = instance.data["handleEnd"] | ||
|
||
source_in_h = instance.data("sourceInH", | ||
instance.data("sourceIn") - handle_start) | ||
source_out_h = instance.data("sourceOutH", | ||
instance.data("sourceOut") + handle_end) | ||
|
||
timeline_in = instance.data["clipIn"] | ||
timeline_out = instance.data["clipOut"] | ||
|
||
# set frame start with tag or take it from timeline | ||
frame_start = instance.data.get("startingFrame") | ||
|
||
if not frame_start: | ||
frame_start = timeline_in | ||
|
||
source = instance.data.get("source") | ||
|
||
otio_data = dict() | ||
self.log.debug("__ source: `{}`".format(source)) | ||
|
||
rate_fps = instance.context.data["fps"] | ||
|
||
otio_in_h_ratio = otio_ot.RationalTime( | ||
value=(source.timecodeStart() + ( | ||
source_in_h + (source_out_h - source_in_h))), | ||
rate=rate_fps) | ||
|
||
otio_out_h_ratio = otio_ot.RationalTime( | ||
value=(source.timecodeStart() + source_in_h), | ||
rate=rate_fps) | ||
|
||
otio_timeline_in_ratio = otio_ot.RationalTime( | ||
value=int( | ||
instance.data.get("timelineTimecodeStart", 0)) + timeline_in, | ||
rate=rate_fps) | ||
|
||
otio_timeline_out_ratio = otio_ot.RationalTime( | ||
value=int( | ||
instance.data.get("timelineTimecodeStart", 0)) + timeline_out, | ||
rate=rate_fps) | ||
|
||
otio_data.update({ | ||
|
||
"otioClipInHTimecode": otio_ot.to_timecode(otio_in_h_ratio), | ||
|
||
"otioClipOutHTimecode": otio_ot.to_timecode(otio_out_h_ratio), | ||
|
||
"otioClipInHSec": otio_ot.to_seconds(otio_in_h_ratio), | ||
|
||
"otioClipOutHSec": otio_ot.to_seconds(otio_out_h_ratio), | ||
|
||
"otioTimelineInTimecode": otio_ot.to_timecode( | ||
otio_timeline_in_ratio), | ||
|
||
"otioTimelineOutTimecode": otio_ot.to_timecode( | ||
otio_timeline_out_ratio), | ||
|
||
"otioTimelineInSec": otio_ot.to_seconds(otio_timeline_in_ratio), | ||
|
||
"otioTimelineOutSec": otio_ot.to_seconds(otio_timeline_out_ratio) | ||
}) | ||
|
||
data.update({ | ||
"otioData": otio_data, | ||
"sourceTimecodeIn": otio_ot.to_timecode(otio_in_h_ratio), | ||
"sourceTimecodeOut": otio_ot.to_timecode(otio_out_h_ratio) | ||
}) | ||
instance.data.update(data) | ||
self.log.debug("data: {}".format(instance.data)) |
21 changes: 21 additions & 0 deletions
21
pype/plugins/nukestudio/publish/collect_clip_resolution.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import pyblish.api | ||
|
||
|
||
class CollectClipResolution(pyblish.api.InstancePlugin): | ||
"""Collect clip geometry resolution""" | ||
|
||
order = pyblish.api.CollectorOrder + 0.101 | ||
label = "Collect Clip Resoluton" | ||
hosts = ["nukestudio"] | ||
|
||
def process(self, instance): | ||
sequence = instance.context.data['activeSequence'] | ||
resolution_width = int(sequence.format().width()) | ||
resolution_height = int(sequence.format().height()) | ||
pixel_aspect = sequence.format().pixelAspect() | ||
|
||
instance.data.update({ | ||
"resolutionWidth": resolution_width, | ||
"resolutionHeight": resolution_height, | ||
"pixelAspect": pixel_aspect | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'ExtractReview.process' is too complex (40)
too many blank lines (2)