Get insertion point node in python

   2034   2   2
User Avatar
Member
9 posts
Joined: July 2014
Offline
Hi all, I'm trying to get the current insertion point for a given viewport. I've been looking in the doc but there is not much information about it. I didn't see anything in the method of hou.SceneViewer. Basically I just need the node.

If someone can help me I would appreciate it. Thanks!
User Avatar
Staff
4259 posts
Joined: Sept. 2007
Offline
It looks like it's actually tied to a lopnetwork; there is an insertionpointutilsmodule available, something like this might help:

import toolutils, insertionpointutils

viewer = toolutils.sceneViewer()
ip     = insertionpointutils.getInsertionPoint(viewer.pwd())
print(ip)
I'm o.d.d.
User Avatar
Member
9 posts
Joined: July 2014
Offline
Awesome! That's exactly what I was missing. Thank you.
  • Quick Links