Get insertion point node in python

   2004   2   2
User Avatar
Member
9 posts
Joined: 7月 2014
オフライン
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
スタッフ
4256 posts
Joined: 9月 2007
オフライン
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: 7月 2014
オフライン
Awesome! That's exactly what I was missing. Thank you.
  • Quick Links