Clarify comment for MoVariant export.

This commit is contained in:
Mikaël Capelle
2020-06-16 22:12:25 +02:00
parent 95ed8ae14a
commit 671776f306
+4 -1
View File
@@ -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();
}