-
Notifications
You must be signed in to change notification settings - Fork 314
[WIP] Example in-RV otio reader plugin #395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #395 +/- ##
=======================================
Coverage 87.05% 87.05%
=======================================
Files 63 63
Lines 5569 5569
=======================================
Hits 4848 4848
Misses 721 721Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #395 +/- ##
==========================================
- Coverage 87.15% 87.05% -0.11%
==========================================
Files 67 63 -4
Lines 6734 5569 -1165
==========================================
- Hits 5869 4848 -1021
+ Misses 865 721 -144
Continue to review full report at Codecov.
|
|
I like this strategy better than our existing RV adapter. We can certainly have both, but doing this from within RV itself has several advantages:
Ideally we could share code between this and the RV adapter, but that seems tricky since the RV in-memory API and the rvSession API are independent. Also, I like that this gets us closer to a general purpose OTIO playback tool, which would be really really handy. |
JoshBurnell
left a comment
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.
Looks great, guys. Very cool.
| """ | ||
| input_otio = otio.adapters.read_from_file(otio_file) | ||
|
|
||
| return create_rv_node_from_otio(input_otio) |
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.
I can envision a world where we want want to initiate a Sequence with certain settings and then incorporate the OTIO into it or combine OTIO's in the same Sequence. To that end, maybe change this to something like to "write_to_file" that takes an RVSequenceGroup and writes the OTIO into it. Something like:
def write_to_rv_sequence_group(otio_obj, rv_sequence_group):
return _create_track(otio_obj, track_kind=None, rv_sequence_group=rv_sequence_group)
def _create_track(in_seq, _=None, rv_sequence_group=None):
new_seq = rv_sequence_group or commands.newNode("RVSequenceGroup", str(in_seq.name or "track"))
...
| ) | ||
| ] | ||
|
|
||
| src = commands.addSourceVerbose(new_media) |
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.
Is there possibly a way to add the Sources outside of this adapter and, if they've already been added, have this adapter connect the existing sources into the Sequence?
I ask because, in our experience, while addSourceVerbose does add the source (verbosely), but it doesn't actively update the UI, so if you have several sources in your OTIO (as one would expect for a feature sequence), the user doesn't get any feedback until all the sources have been added. Maybe there's a world where you add all the sources for the OTIO in one step using rv.commands.addSources() (which provides a "Loading X of X" dialog) and then assemble the Sequence from the existing sources. (rv.commands.addSources() fires after-progressive-loading after it completes, so this second step could take place there.)
For an example OTIO reader, that may be overkill, but for production, it's something to consider.
Have you guys tried anything like that?
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.
I've tried using QtGui.QApplication.processEvents() to solve this problem, but the nature of processEvents can reverse the order of items loaded and cause other unintended consequences. You get a nice live loading feel though. Maybe a more specific processEvents command could be a solution.
I'm not sure which events to include though. IE
app.processEvents(QtCore.QEventLoop.ExcludeUserInputEvents, stepSize)
| class Mode(object): | ||
| sleeping = 1 | ||
| loading = 2 | ||
| processing = 3 |
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.
This is super clever.
|
Oops. This was closed by accident. We'll get it re-opened shortly... |
|
I was unable to re-opening this unfortunately, but recreated it as #565. |
For discussion. This is a copy and modify of the existing
extern_rv.pysession file based rv adapter and turns it into an "in-RV" plugin that'll support reading OTIO files directly into the current session.