API - Simulation while playing or not? How to approach this?

API - Simulation while playing or not? How to approach this?

Anonymous
Not applicable
524 Views
1 Reply
Message 1 of 2

API - Simulation while playing or not? How to approach this?

Anonymous
Not applicable

I want to create a simulation for a set of vertices on a particular mesh so that it moves around while interacting with it.


I understand that the maya viewport is static and you can't see anything interactive unless you are in play mode... isnt't it? 


How do you approach this using the C++ API?  Should the viewport be in "play" mode? In that case, what kind of plugin should I create to do this? is it a manipulator? a tool? a custom node?

 

I would like it to be interactive and moving while you move other objects around it.

0 Likes
525 Views
1 Reply
Reply (1)
Message 2 of 2

chaneyx
Advocate
Advocate

If you are looking to hijack Maya and use it as a window to view some custom graphics while the maya session is idle, then the easy thing is to play it. 

 

But if you are just looking for updates as you change parameters then you need to understand the notion of "dirty/clean" updates and attributeAffects. It will force an update when relevant attributes change. For example if you want your plugin to update as you change the camera position then that relationship needs to be represent by a connection as seen in hypergraph. 

 

0 Likes