MCPcopy
hub / github.com/AcademySoftwareFoundation/OpenTimelineIO / read_from_file

Function read_from_file

tests/baselines/example.py:12–24  ·  view source on GitHub ↗
(filepath, suffix="", hook_function_argument_map=None)

Source from the content-addressed store, hash-verified

10# `hook_function_argument_map` is only a required argument for adapters that implement
11# custom hooks.
12def read_from_file(filepath, suffix="", hook_function_argument_map=None):
13 import opentimelineio as otio
14
15 fake_tl = otio.schema.Timeline(name=filepath + str(suffix))
16 fake_tl.tracks.append(otio.schema.Track())
17 fake_tl.tracks[0].append(otio.schema.Clip(name=filepath + "_clip"))
18
19 if (hook_function_argument_map and
20 hook_function_argument_map.get("run_custom_hook", False)):
21 return otio.hooks.run(hook="custom_adapter_hook", tl=fake_tl,
22 extra_args=hook_function_argument_map)
23
24 return fake_tl
25
26
27# `hook_function_argument_map` is only a required argument for adapters that implement

Callers 1

read_from_stringFunction · 0.70

Calls 1

runMethod · 0.45

Tested by

no test coverage detected