MPxContext is calling setup and cleanup but not doPress

MPxContext is calling setup and cleanup but not doPress

jmreinhart
Advisor Advisor
712 Views
2 Replies
Message 1 of 3

MPxContext is calling setup and cleanup but not doPress

jmreinhart
Advisor
Advisor

I am working on a custom context and I'm running into an issue where the context calls the setup and cleanup methods but won't call doPress, doRelase, or doDrag. I've commented out the parts of the code that actually do anything other than give a print statement, I've attached the .sln. Any help would be greatly appreciated, I've never worked on a custom context before so it's a bit confusing.

0 Likes
Accepted solutions (1)
713 Views
2 Replies
Replies (2)
Message 2 of 3

stuzzz
Collaborator
Collaborator
Accepted solution

hi,

 

Your signature in the header is  the old one (not viewport 2.0). You need to get the following for you MPxContext:

virtual MStatus doPress(MEvent &event, MHWRender::MUIDrawManager& drawMgr, const MHWRender::MFrameContext& context);

 

You've made the declaration but the definition is missing in the cpp...

I did not read the rest of the code but this will be a huge step if you take in consideration the point above.

0 Likes
Message 3 of 3

jmreinhart
Advisor
Advisor

Switching to that vp2 method work. Thanks.

0 Likes