Add playblast: viewport capture to H.264 MP4 via libavcodec
- TimelinePanel: Playblast button opens modal with output dir (native folder picker via IFileOpenDialog), custom resolution (HD/FHD/4K presets), frame range, and movie export toggle - UsdSceneRenderer: CaptureFrame() reads pixels from resolved MSAA FBO; Render() stores last dimensions for off-screen re-render at capture res - MovieEncoder: streams RGBA frames directly into MP4 using libavcodec/ libswscale (H.264, tries libx264 → nvenc → qsv → amf → openh264) - Application: CapturePlayblastFrame() re-renders at capture resolution each frame; opens/writes/closes MovieEncoder inline with the render loop - FileDialog: BrowseFolder() using Vista-style IFileOpenDialog (COM) - CMake: FindFFmpeg.cmake locates prebuilt BtbN GPL shared package in third_party/ffmpeg; links and copies DLLs for main and test targets Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -212,10 +212,20 @@ public:
|
||||
// -----------------------------------------------------------------------
|
||||
uint32_t GetColorTextureID();
|
||||
|
||||
/// Dimensions of the most recent Render() call.
|
||||
int GetLastRenderWidth() const { return m_lastRenderWidth; }
|
||||
int GetLastRenderHeight() const { return m_lastRenderHeight; }
|
||||
|
||||
/// Read the last rendered frame into top-down RGBA8 pixels.
|
||||
/// Resolves MSAA before reading. Returns false if the draw target is not ready.
|
||||
bool CaptureFrame(std::vector<uint8_t>& outRGBA);
|
||||
|
||||
// For unit tests
|
||||
pxr::GlfDrawTargetRefPtr GetDrawTargetForTest() const { return m_drawTarget; }
|
||||
|
||||
private:
|
||||
int m_lastRenderWidth = 0;
|
||||
int m_lastRenderHeight = 0;
|
||||
void InitRenderer();
|
||||
void InitGridResources();
|
||||
void RebuildGridVBO(); ///< (Re)build grid line geometry after up-axis or size change.
|
||||
|
||||
Reference in New Issue
Block a user