I wrote a Custom locator using MPxLocatorNode in C++.
I have very special requirement for this locator. This is mainly targeted for using as rig controls as well as Character picker ui element. So, i provided an option to use it as button(like a normal push button which should execute some command and deselect itself). Tried implementing this pushButton kindof feature inside the draw call of locator. I simply check the status(MDisplayStatus) and de-select the object using MGlobal::unselect(path.node())
(path is the MDagPath from the locator draw function). Well, this crashes maya. I couldn't really debug this problem. From what I understood, it looks more like a memory access violation. Any workaround for this problem?
Asked
Active
Viewed 93 times
0

vaishak
- 63
- 7
-
Do you have the crash log ? or a minimal example ? – Achayan Feb 16 '17 at 18:19
-
@Achayan , here is the crash log [link](http://pastebin.com/Yr79MqPX) and this is the debug info from visual studio `The program '[5920] maya.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.` – vaishak Feb 17 '17 at 02:37