mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
@@ -269,28 +269,28 @@ void registerGameFeaturesPythonConverters()
|
||||
|
||||
// Features require defs for all methods as Python can access C++ features
|
||||
bpy::class_<BSAInvalidationWrapper, boost::noncopyable>("BSAInvalidation")
|
||||
.def("isInvalidationBSA", bpy::pure_virtual(&BSAInvalidation::isInvalidationBSA))
|
||||
.def("deactivate", bpy::pure_virtual(&BSAInvalidation::deactivate))
|
||||
.def("activate", bpy::pure_virtual(&BSAInvalidation::activate))
|
||||
.def("isInvalidationBSA", bpy::pure_virtual(&BSAInvalidation::isInvalidationBSA), bpy::arg("name"))
|
||||
.def("deactivate", bpy::pure_virtual(&BSAInvalidation::deactivate), bpy::arg("profile"))
|
||||
.def("activate", bpy::pure_virtual(&BSAInvalidation::activate), bpy::arg("profile"))
|
||||
;
|
||||
|
||||
bpy::class_<DataArchivesWrapper, boost::noncopyable>("DataArchives")
|
||||
.def("vanillaArchives", bpy::pure_virtual(&DataArchives::vanillaArchives))
|
||||
.def("archives", bpy::pure_virtual(&DataArchives::archives))
|
||||
.def("addArchive", bpy::pure_virtual(&DataArchives::addArchive))
|
||||
.def("removeArchive", bpy::pure_virtual(&DataArchives::removeArchive))
|
||||
.def("archives", bpy::pure_virtual(&DataArchives::archives), bpy::arg("profile"))
|
||||
.def("addArchive", bpy::pure_virtual(&DataArchives::addArchive), (bpy::arg("profile"), "index", "name"))
|
||||
.def("removeArchive", bpy::pure_virtual(&DataArchives::removeArchive), (bpy::arg("profile"), "name"))
|
||||
;
|
||||
|
||||
bpy::class_<GamePluginsWrapper, boost::noncopyable>("GamePlugins")
|
||||
.def("writePluginLists", bpy::pure_virtual(&GamePlugins::writePluginLists))
|
||||
.def("readPluginLists", bpy::pure_virtual(&GamePlugins::readPluginLists))
|
||||
.def("writePluginLists", bpy::pure_virtual(&GamePlugins::writePluginLists), bpy::arg("plugin_list"))
|
||||
.def("readPluginLists", bpy::pure_virtual(&GamePlugins::readPluginLists), bpy::arg("plugin_list"))
|
||||
.def("getLoadOrder", bpy::pure_virtual(&GamePlugins::getLoadOrder))
|
||||
.def("lightPluginsAreSupported", bpy::pure_virtual(&GamePlugins::lightPluginsAreSupported))
|
||||
;
|
||||
|
||||
bpy::class_<LocalSavegamesWrapper, boost::noncopyable>("LocalSavegames")
|
||||
.def("mappings", bpy::pure_virtual(&LocalSavegames::mappings))
|
||||
.def("prepareProfile", bpy::pure_virtual(&LocalSavegames::prepareProfile))
|
||||
.def("mappings", bpy::pure_virtual(&LocalSavegames::mappings), bpy::arg("profile_save_dir"))
|
||||
.def("prepareProfile", bpy::pure_virtual(&LocalSavegames::prepareProfile), bpy::arg("profile"))
|
||||
;
|
||||
|
||||
auto modDataCheckerClass = bpy::class_<ModDataCheckerWrapper, boost::noncopyable>("ModDataChecker");
|
||||
@@ -305,18 +305,19 @@ void registerGameFeaturesPythonConverters()
|
||||
;
|
||||
|
||||
modDataCheckerClass
|
||||
.def("dataLooksValid", bpy::pure_virtual(&ModDataChecker::dataLooksValid))
|
||||
.def("fix", bpy::pure_virtual(&ModDataChecker::fix))
|
||||
.def("dataLooksValid", bpy::pure_virtual(&ModDataChecker::dataLooksValid), bpy::arg("filetree"))
|
||||
.def("fix", bpy::pure_virtual(&ModDataChecker::fix), bpy::arg("filetree"))
|
||||
;
|
||||
}
|
||||
|
||||
{
|
||||
bpy::scope scope = bpy::class_<ModDataContentWrapper, boost::noncopyable>("ModDataContent")
|
||||
.def("getAllContents", bpy::pure_virtual(&ModDataContent::getAllContents))
|
||||
.def("getContentsFor", bpy::pure_virtual(&ModDataContent::getContentsFor))
|
||||
.def("getContentsFor", bpy::pure_virtual(&ModDataContent::getContentsFor), bpy::arg("filetree"))
|
||||
;
|
||||
|
||||
bpy::class_<ModDataContent::Content>("Content", bpy::init<int, QString, QString, bpy::optional<bool>>())
|
||||
bpy::class_<ModDataContent::Content>("Content",
|
||||
bpy::init<int, QString, QString, bpy::optional<bool>>((bpy::arg("id"), "name", "icon", bpy::arg("filter_only") = false)))
|
||||
.add_property("id", &ModDataContent::Content::id)
|
||||
.add_property("name", &ModDataContent::Content::name)
|
||||
.add_property("icon", &ModDataContent::Content::icon)
|
||||
@@ -326,10 +327,12 @@ void registerGameFeaturesPythonConverters()
|
||||
}
|
||||
|
||||
bpy::class_<SaveGameInfoWrapper, boost::noncopyable>("SaveGameInfo")
|
||||
.def("getSaveGameInfo", bpy::pure_virtual(&SaveGameInfo::getSaveGameInfo), bpy::return_value_policy<bpy::manage_new_object>())
|
||||
.def("getMissingAssets", bpy::pure_virtual(&SaveGameInfo::getMissingAssets))
|
||||
.def("getSaveGameWidget", bpy::pure_virtual(&SaveGameInfo::getSaveGameWidget), bpy::return_value_policy<bpy::manage_new_object>(), "[optional]")
|
||||
.def("hasScriptExtenderSave", bpy::pure_virtual(&SaveGameInfo::hasScriptExtenderSave))
|
||||
.def("getSaveGameInfo", bpy::pure_virtual(&SaveGameInfo::getSaveGameInfo), bpy::return_value_policy<bpy::manage_new_object>(),
|
||||
bpy::arg("filepath"))
|
||||
.def("getMissingAssets", bpy::pure_virtual(&SaveGameInfo::getMissingAssets), bpy::arg("filepath"))
|
||||
.def("getSaveGameWidget", bpy::pure_virtual(&SaveGameInfo::getSaveGameWidget), bpy::return_value_policy<bpy::manage_new_object>(),
|
||||
bpy::arg("parent"), "[optional]")
|
||||
.def("hasScriptExtenderSave", bpy::pure_virtual(&SaveGameInfo::hasScriptExtenderSave), bpy::arg("filepath"))
|
||||
;
|
||||
|
||||
bpy::class_<ScriptExtenderWrapper, boost::noncopyable>("ScriptExtender")
|
||||
@@ -344,9 +347,9 @@ void registerGameFeaturesPythonConverters()
|
||||
;
|
||||
|
||||
bpy::class_<UnmanagedModsWrapper, boost::noncopyable>("UnmanagedMods")
|
||||
.def("mods", bpy::pure_virtual(&UnmanagedMods::mods))
|
||||
.def("displayName", bpy::pure_virtual(&UnmanagedMods::displayName))
|
||||
.def("referenceFile", bpy::pure_virtual(&UnmanagedMods::referenceFile))
|
||||
.def("secondaryFiles", bpy::pure_virtual(&UnmanagedMods::secondaryFiles))
|
||||
.def("mods", bpy::pure_virtual(&UnmanagedMods::mods), bpy::arg("official_only"))
|
||||
.def("displayName", bpy::pure_virtual(&UnmanagedMods::displayName), bpy::arg("mod_name"))
|
||||
.def("referenceFile", bpy::pure_virtual(&UnmanagedMods::referenceFile), bpy::arg("mod_name"))
|
||||
.def("secondaryFiles", bpy::pure_virtual(&UnmanagedMods::secondaryFiles), bpy::arg("mod_name"))
|
||||
;
|
||||
}
|
||||
|
||||
+161
-139
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user