Jump to content

re-entering paint mode in otl


TomRaynor

Recommended Posts

I have an otl, which has a paint node inside it and part of otl depends on painting an attribute on some geometry.

I was wondering if anyone might know how I can re-enter paint mode from the top level of the otl by for example pressing a button on the top level UI.

I thought that by selecting the paint node it would get into paint mode and so tried making a button that ran some python code to select the paint node from within the otl.

This seems pretty buggy/inconsistant however, and also the parameter window switches to the paint node's parameters instead of the top level otl UI which is a bit of a pain.

Any thoughts?

Link to comment
Share on other sites

I can't remember exactly what I used to do, but it was something like using hou.Node.setCurrent() on the paint node, then using hou.SceneViewer.enterCurrentNodeState() on the scene viewer.

The parameter pane would change which was annoying, I just got into the habit of pinning the parm panes before pressing the button :/

You can get the scene viewer with:

>>> import toolutils

>>> toolutils.sceneViewer()

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...