Jump to content

Expand collapsed toolbars with Python

Recommended Posts

I haven't seen a function for this inside HOM but there is in hscript, which you can call from python.


This should work:


import toolutils

def viewName(viewer):
    Returns the Scene viewer name in a hscript compatible format
    name = {
        'desktop' : viewer.pane().desktop(),
        'pane' : viewer.name(),
        'type' :'world',
        'viewport': viewer.curViewport().name()
    # special case for floating windows - they don't belong to desktops
    if name['desktop']==None:
        name['desktop'] = '*'
        name['desktop'] = name['desktop'].name()

    return '{desktop}.{pane}.{type}'.format(**name)
viewer = toolutils.sceneViewer()
hscriptViewer = viewName(viewer)
cmd = "viewerstow -t open -b open -l open -x open -m open -c open -d open %s" % hscriptViewer


Edited by Luijee
  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now