From 671776f3066f5c5bebed13fc5384788c52ec4e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Tue, 16 Jun 2020 22:12:25 +0200 Subject: [PATCH] Clarify comment for MoVariant export. --- src/runner/pythonrunner.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index b45370a..5fffd9b 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -828,7 +828,10 @@ BOOST_PYTHON_MODULE(mobase) bpy::def("getProductVersion", &MOBase::getProductVersion); bpy::def("getIconForExecutable", &MOBase::iconForExecutable); - // Expose MoVariant: + // Expose MoVariant: MoVariant is a fake object whose only purpose is to be used as a type-hint + // on the python side (e.g., def foo(x: mobase.MoVariant)). The real MoVariant is defined in the + // generated stubs, since it's only relevant when doing type-checking, but this needs to be defined, + // otherwise MoVariant is not found when actually running plugins through MO2, making them crash. bpy::scope().attr("MoVariant") = bpy::object(); }