Reason for the py::cast() error with custom BSDF? #317
-
Hi again,
I am not clear where this error happens, and whenever I have to cast a float to int, I am only casting a If it can be clarified what is the reason for this error, I'd be grateful. I can share the code if more context is needed. Entire error for reference:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @apoorvkhattar , This means that C++ is not able to digest a Python object provided as an argument to a C++ function / method. If I understood correctly, you are implementing your own BSDF as a python plugin, similar to the custom python plugin tutorial is that right? Ideally if you could share the code for this plugin, we could help you debug this further. I suggest you check the inputs/outputs of the methods defined in this trampoline class, as they need to match the ones of the BSDF API. |
Beta Was this translation helpful? Give feedback.
Hi @apoorvkhattar ,
This means that C++ is not able to digest a Python object provided as an argument to a C++ function / method. If I understood correctly, you are implementing your own BSDF as a python plugin, similar to the custom python plugin tutorial is that right?
Ideally if you could share the code for this plugin, we could help you debug this further. I suggest you check the inputs/outputs of the methods defined in this trampoline class, as they need to match the ones of the BSDF API.