Solved read data from a "capsule object"

i am trying to read the data from a drag and drop event on a tag but the "data" seem to contain a thing called a "capsule object" that i don't know how to crack in to

also from the looks of it the "msg" should contain the "INPUT_QUALIFIER" to limit the main function to only run when the "drop" part of the drag happens but i cant seem to work that out ether

any one have any experience in this stuff?

Hello @jesse,

Thank you for reaching out to us. It is always best to be as precise as possible with questions. I assume you are talking about MSG_DRAGANDDROP and its data input argument being of type PyCapsule? A PyCapsule is a wrapper type for arguments from the C/C++ backend of Python. Such value is effectively meaningless in Python and mostly intended to be passed through. You cannot 'crack into' it.

It would be best if you would describe:

  1. Which plugin interface/hook you are implementing.
  2. Where the message and which message is received, and which part of the message data you are interested in.
  3. What you want to achieve abstractly.

Otherwise, it will be extremely hard for us to give you a precise answer.

Cheers,
Ferdinand

MAXON SDK Specialist
developers.maxon.net

Hello @jesse,

Thank you for reaching out to us. It is always best to be as precise as possible with questions. I assume you are talking about MSG_DRAGANDDROP and its data input argument being of type PyCapsule? A PyCapsule is a wrapper type for arguments from the C/C++ backend of Python. Such value is effectively meaningless in Python and mostly intended to be passed through. You cannot 'crack into' it.

It would be best if you would describe:

  1. Which plugin interface/hook you are implementing.
  2. Where the message and which message is received, and which part of the message data you are interested in.
  3. What you want to achieve abstractly.

Otherwise, it will be extremely hard for us to give you a precise answer.

Cheers,
Ferdinand

MAXON SDK Specialist
developers.maxon.net

Hello @jesse,

without any further questions or other postings, we will consider this topic as solved and flag it as such by Friday, 17/06/2022.

Thank you for your understanding,
Ferdinand

MAXON SDK Specialist
developers.maxon.net