hou method for instancepoint?

   2978   2   1
User Avatar
Member
201 posts
Joined: 7月 2005
Offline
Is there a hou method that is equivalent to the instancepoint() expression? I want to take an expression like:
points(“/obj/geo”,instancepoint(),“foo”)

and convert to a python line.
Cheers,
Rob
Digital Supervisor | Stargate Studios Toronto
User Avatar
Member
11 posts
Joined: 12月 2011
Offline
I know this has been quite a long time, but I was looking for an answer to this exact question, and I've found the method called hou.hscriptExpression() that may do the trick.


instancepoint = hou.hscriptExpression('instancepoint()')
User Avatar
Member
11 posts
Joined: 12月 2011
Offline
To add: there are some instances (no pun intended) where instancepoint() (and I think it is in the context of hou.hscriptExpression()) where it returns a -1 or None, and so it seems like a sanity check is necessary for places such as accessing indices from an array/tuple/list.

This doesn't seem to crop up when hscript instancepoint() is used directly.
  • Quick Links