Character definition of 8 bytes of data

Here's the context: I am working on the Maya plugin. One of the functions requires me to drag an element from the Outliner window into the user interface element of my plugin user interface. (Everything in Maya is in Qt) From the outliner I can drag and drop an item and drop it. For anyone familiar with Qt, you'll learn that DropEvent comes with a QMimeData object. This object contains data from a drag & drop source (Outliner window). In my case, the QMimeData format is "application / x-maya-data". The QByteArray returned by QMimeData.data () is 8 bytes long and the first 4 are NULL. So, I suspect this is a pointer to some data type.

So here's the question: Is there a way to determine which data type the pointer points to? I tried to include it in several Maya data structures (MPxData, MObjectHandle, etc.), but to no avail.

+4
source share
1 answer

You can try to remove it twice, and then run your program in a memory debugger (e.g. valgrind ), which will throw an error and show you where the memory was allocated.

However, you can also consider social sources: documentation or a project mailing list.

+1
source

Source: https://habr.com/ru/post/1384769/


All Articles