Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ python:
- requirements: docs/requirements.txt

sphinx:
# Path to your Sphinx configuration file.
configuration: docs/conf.py
fail_on_warning: false

formats:
Expand Down
10 changes: 5 additions & 5 deletions rvcmds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
RV_TOOLCHAIN=""

# Windows
elif [[ "$OSTYPE" == "msys"* ]]; then
elif [[ "$OSTYPE" == "msys"* || "$OSTYPE" == "cygwin"* ]]; then
CMAKE_GENERATOR="${CMAKE_GENERATOR:-Visual Studio 17 2022}"
WIN_PERL="${WIN_PERL:-c:/Strawberry/perl/bin}"
CMAKE_WIN_ARCH="${CMAKE_WIN_ARCH:--A x64}"
SETUPTOOLS_USE_DISTUTILS=stdlib
RV_TOOLCHAIN="-T v143,version=14.40"

else
echo "OS does not seem to be linux, darwin or msys. Exiting."
echo "OS does not seem to be linux, darwin or msys/cygwin. Exiting."
exit 1
fi

Expand Down Expand Up @@ -107,8 +107,8 @@ fi
rvenv_shell() {
local activate_path=".venv/bin/activate"

# Using msys2 as a way to detect if the script is running on Windows.
if [[ "$OSTYPE" == "msys"* ]]; then
# Using msys2/cygwin as a way to detect if the script is running on Windows.
if [[ "$OSTYPE" == "msys"* || "$OSTYPE" == "cygwin"* ]]; then
activate_path=".venv/Scripts/activate"
fi

Expand Down Expand Up @@ -164,7 +164,7 @@ echo "RV_BUILD is $RV_BUILD"
echo "RV_INST is $RV_INST"
echo "CMAKE_GENERATOR is $CMAKE_GENERATOR"
echo "QT_HOME is $QT_HOME"
if [[ "$OSTYPE" == "msys"* ]]; then echo "WIN_PERL is $WIN_PERL"; fi
if [[ "$OSTYPE" == "msys"* || "$OSTYPE" == "cygwin"* ]]; then echo "WIN_PERL is $WIN_PERL"; fi

echo "To override any of them do unset [name]; export [name]=value; source $SCRIPT"
echo
Expand Down
25 changes: 21 additions & 4 deletions src/plugins/rv-packages/otio_reader/otio_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ def _set_sequence_edl(sequence, edl_time, edl):
# edl.in/out are terminated by 0. edl.frame is terminated by last frame + 1.
edl["in"].append(0)
edl["out"].append(0)
edl["frame"].append(edl_time.to_frames() + 1)
# Note that the edl_time is already exclusive so we don't need to add 1 here
# For reference: _create_track() - edl_time = edl_range.end_time_exclusive()
edl["frame"].append(edl_time.to_frames())

# This effectively forces each cut to use the otio trimmed_range, regardless
# of effects or other modifications to a sources timing.
Expand Down Expand Up @@ -454,6 +456,15 @@ def _create_media(media_ref, trimmed_range, context=None):


def _create_sources(item, context=None):
def rename_media_rep(media_rep_name):
media_rep_name_replacement = {
"mp4": "Streaming",
"original_media": "Original",
"path_to_movie": "Movie",
"path_to_frames": "Frames",
}
return media_rep_name_replacement.get(media_rep_name, media_rep_name)

def add_media(media_ref, active_key, cmd, *cmd_args):
media = _create_media(media_ref, item.trimmed_range(), context)

Expand Down Expand Up @@ -493,15 +504,21 @@ def add_media(media_ref, active_key, cmd, *cmd_args):
)
if hasattr(item, "media_reference") and item.media_reference:
active_source = add_media(
item.media_reference, active_key, commands.addSourceVerbose
item.media_reference,
rename_media_rep(active_key),
commands.addSourceVerbose,
)

source_group = commands.nodeGroup(active_source)
if active_source and hasattr(item, "media_references"):
for key, media_ref in item.media_references().items():
if key != active_key:
add_media(
media_ref, None, commands.addSourceMediaRep, active_source, key
media_ref,
None,
commands.addSourceMediaRep,
active_source,
rename_media_rep(key),
)

switch_group = commands.nodeConnections(source_group)[1][0]
Expand All @@ -516,7 +533,7 @@ def add_media(media_ref, active_key, cmd, *cmd_args):
def _get_media_path(target_url: str, context: dict | None = None) -> str:
context = context or {}

if "sg_url" in context:
if "sg_url" in context and target_url.startswith("/file_serve/version"):
return context.get("sg_url") + target_url

if not os.path.isabs(target_url):
Expand Down
Loading