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: 

How to get the camera view Matrix of each frame during playblast in the VP 2.0 viewport plugin?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
zxl120125
206 Views, 1 Reply

How to get the camera view Matrix of each frame during playblast in the VP 2.0 viewport plugin?

I wrote a viewport plugin for a custom effect and wanted to preview it in playblast with a moving camera view. But I found that the video generated by playblast is always the first frame.
I checked the plug-in code and found that the problem lies in the cameraOverride function of MHWRender::MSceneRender I wrote. M3dView cannot get the modelViewMatrix of each frame during playblast, and it always returns the data of the first frame.
The examples in devkit also have no related cases to refer to.
I tried to call the refresh method of M3dView before getting the matrix, maya will be stuck.
Does anyone have experience with this? What is the solution to this problem?

1 REPLY 1
Message 2 of 2
zxl120125
in reply to: zxl120125

My solution: I gave up using M3dView to dynamically obtain viewMatrix, and used MFnCamera to calculate. It works fine so far.

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

Post to forums  

Autodesk Design & Make Report