mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-24 17:26:47 +00:00
Pass bind_detect's Result to Python by Reference
pybind11 copies a reference argument to an override, so a Python printer agent that filled in detect wrote to a throwaway object and the host always saw an empty detectResult. Pass it as a pointer so Python edits the caller's struct.
This commit is contained in:
+2
-1
@@ -69,7 +69,8 @@ public:
|
||||
|
||||
int bind_detect(std::string dev_ip, std::string sec_link, detectResult& detect) override
|
||||
{
|
||||
ORCA_PY_AGENT_OVERRIDE(int, bind_detect, dev_ip, sec_link, detect);
|
||||
// Passed as a pointer: pybind11 copies a reference argument, so the plugin's writes would be lost.
|
||||
ORCA_PY_AGENT_OVERRIDE(int, bind_detect, dev_ip, sec_link, &detect);
|
||||
}
|
||||
|
||||
std::string get_user_selected_machine() override
|
||||
|
||||
Reference in New Issue
Block a user