Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPxContext is calling setup and cleanup but not doPress

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
jmreinhart
628 Views, 2 Replies

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

MPxContext is calling setup and cleanup but not doPress

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.

2 REPLIES 2
Message 2 of 3
stuzzz
in reply to: jmreinhart

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

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.

Message 3 of 3
jmreinhart
in reply to: stuzzz

jmreinhart
Advisor
Advisor

Switching to that vp2 method work. Thanks.

0 Likes

Switching to that vp2 method work. Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report