Mplay scripting

   291   2   2
User Avatar
Member
25 posts
Joined: 10月 2018
Offline
I'm writing a pyside tool for Mplay to publish/export flipbooks, so I want to display the current frame range and resolution, but I can't find a way to get the resolution and the playback range of the current flipbook session.

In Mplay's textport frange will return the global frame range, but not the playback range. And I can't find anything to return the current resolution or view dimensions.

Even better would be in python but Mplay doesn't seem to play well with python. You don't have access to the ui so something like the following doesn't work (not that surprising since its referring to a scene viewer..):

import hou
import toolutils

scene = toolutils.sceneViewer()

settings = scene.flipbookSettings()

res = settings.resolution()
Edited by mike.battcock - 2024年12月18日 02:57:43
User Avatar
Member
2629 posts
Joined: 6月 2008
Offline
MPlay is essentially a wrapped OpenGL ROP. You may want to focus there instead.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
25 posts
Joined: 10月 2018
Offline
Yea but there are a few issues with the OpenGL ROP too:

- its not representative of the viewport, e.g. it doesn't have the viewport background colour, it doesn't show the grid, the lighting settings are separate to the viewport settings. This can be good sometimes but also unhelpful if you just want a straight viewport render that matches what you can see in the viewport
- the frame range in mplay starts at 1 regardless of the frame range you set on the OpenGL ROP - it does actually render the correct frames, but the playback starts from 1 in Mplay which is unhelpful and inconsistent with doing a flipbook from the Flibpook button
  • Quick Links