Closed kfields closed 2 years ago
Your welcome.
I agree. The next PR I'll add an example.
I went ahead and added a quick description to the README: https://github.com/Nelarius/imnodes/commit/9aa6a0f48aeb9ac5e359af1133e3ffe3205e6cbc If you have any improvements, I would be happy to merge 👍
Minimally invasive change to allow pybind11 callback and callback data
Here is what it basically looks like in my project if anyone is curious. I had to extend py::object to be assignable from NULL and also extend the bool conversion operator to test for Py_None. I slapped it together over the weekend so I'm sure it can be improved. The upside is not having to make any modifications to ImNodes source except for adding the conditional typedefs/macros.
CMakeLists.txt:
target_compile_definitions(${THIS} PRIVATE IMNODES_USER_CONFIG=<imnodes_config.h>)
imnodes_config.h: