Skip to content

Commit 4d136df

Browse files
Import _opentime before actually creating the bindings for _otio (#1396)
1 parent 8b430a6 commit 4d136df

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/py-opentimelineio/opentimelineio-bindings/otio_bindings.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,13 @@ static SerializableObject* instance_from_schema(std::string schema_name,
166166
}
167167

168168
PYBIND11_MODULE(_otio, m) {
169+
// Import _opentime before actually creating the bindings
170+
// for _otio. This allows the import of _otio without
171+
// manually importing _opentime before. For example: python -c 'import opentimelineio._otio'
172+
py::module_::import("opentimelineio._opentime");
173+
169174
m.doc() = "Bindings to C++ OTIO implementation";
175+
170176
otio_exception_bindings(m);
171177
otio_any_dictionary_bindings(m);
172178
otio_any_vector_bindings(m);

0 commit comments

Comments
 (0)