OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::host_bindings Namespace Reference

Functions

void register_plugin (pybind11::module_ &host)
void register_geometry (pybind11::module_ &host)
void register_mesh (pybind11::module_ &host)
void register_presets (pybind11::module_ &host)
void register_model (pybind11::module_ &host)
void register_app (pybind11::module_ &host)
void register_slicing (pybind11::module_ &host)

Function Documentation

◆ register_app()

void Slic3r::host_bindings::register_app ( pybind11::module_ & host)

Referenced by Slic3r::PluginHost::RegisterBindings().

Here is the caller graph for this function:

◆ register_geometry()

void Slic3r::host_bindings::register_geometry ( pybind11::module_ & host)

Referenced by Slic3r::PluginHost::RegisterBindings().

Here is the caller graph for this function:

◆ register_mesh()

void Slic3r::host_bindings::register_mesh ( pybind11::module_ & host)

Referenced by Slic3r::PluginHost::RegisterBindings().

Here is the caller graph for this function:

◆ register_model()

void Slic3r::host_bindings::register_model ( pybind11::module_ & host)

Referenced by Slic3r::PluginHost::RegisterBindings().

Here is the caller graph for this function:

◆ register_plugin()

void Slic3r::host_bindings::register_plugin ( pybind11::module_ & host)
16{
17 auto plugin_host = host.def_submodule("plugin", "Plugin host API");
18
19 plugin_host.def(
20 "storage",
21 []() -> std::string {
22 const std::string plugin_key = PluginAuditManager::instance().current_plugin();
23 if (plugin_key.empty())
24 throw std::runtime_error("plugin.storage() must be called from a plugin callback");
25
26 return PluginManager::instance().get_storage_dir(plugin_key);
27 },
28 "Return the installed folder of the current plugin.");
29}
static PluginAuditManager & instance()
Definition PluginAuditManager.cpp:535
std::string current_plugin() const
Definition PluginAuditManager.cpp:543
std::string get_storage_dir(const std::string &plugin_key) const
Definition PluginManager.cpp:558
static PluginManager & instance()
Definition PluginManager.cpp:74

References Slic3r::PluginAuditManager::current_plugin(), Slic3r::PluginManager::get_storage_dir(), Slic3r::PluginAuditManager::instance(), and Slic3r::PluginManager::instance().

Referenced by Slic3r::PluginHost::RegisterBindings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_presets()

void Slic3r::host_bindings::register_presets ( pybind11::module_ & host)

Referenced by Slic3r::PluginHost::RegisterBindings().

Here is the caller graph for this function:

◆ register_slicing()

void Slic3r::host_bindings::register_slicing ( pybind11::module_ & host)

Referenced by Slic3r::PluginHost::RegisterBindings().

Here is the caller graph for this function: