tagosaku Posted April 8, 2023 Share Posted April 8, 2023 Hi, I am learning python script , in order to create my own flipbook tool. Right now I try to get the list of viewers, and houdini documents show this 'hou.Desktop.sceneViewers'. However, 'sceneViewers' method is not working with ui or desktop class. After all, my code went up so crazy as the code shows in the below, but I think this is not smart way. Thus, my questions are: - can you give me decent codes to get the list of scene viewers ? - Also, if you know any good references for how to make custom flipbook, like UI codes, actual nessesary core codes, it would be appreciated. Thank you! import hou # Get the current desktop session desktop = hou.ui.curDesktop() # Get the list of pane tabs in the desktop session pane_tabs = desktop.paneTabs() # Iterate through each pane tab and check if it's a Scene Viewer pane tab scene_viewers = [] for pane_tab in pane_tabs: if isinstance(pane_tab, hou.SceneViewer): scene_viewers.append(pane_tab) # Print the name of each scene viewer pane tab for viewer in scene_viewers: print(viewer.name()) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.