I'm exploring python viewer states as a means to add functionality to Solaris. It seems neither viewport.queryNodeAtPixel() or viewport.queryPrimAtPixel() are available in Solaris viewports. Is there another function that provides the same functionality?
I'm just looking to shoot a ray in to the scene and figure out which USD prim it's hitting, perhaps there's another way to achieve that?
Get the prim under the cursor in Solaris
1426 5 1- blented
- Member
- 61 posts
- Joined: Oct. 2013
- Offline
- mtucker
- Staff
- 4419 posts
- Joined: July 2005
- Offline
- blented
- Member
- 61 posts
- Joined: Oct. 2013
- Offline
- blented
- Member
- 61 posts
- Joined: Oct. 2013
- Offline
Celebrated a wee bit too soon. First stumble was that these functions aren't available in .391, but show up in the latest (glad I checked).
Secondly, even w/ a single cube primitive covering the entire screen, I'm unable to get anything but (0, “”) as a return result.
See the attached example, here's my code:
Secondly, even w/ a single cube primitive covering the entire screen, I'm unable to get anything but (0, “”) as a return result.
See the attached example, here's my code:
>>> import toolutils >>> viewer = toolutils.sceneViewer() >>> vp = viewer.curViewport() >>> vp.resolutionInPixels() (1741, 1001) >>> viewer.locateSceneGraphPrim(870, 500) (0.0, '')
Edited by blented - March 29, 2020 16:12:41
Grant Miller
VFX Supervisor
Ingenuity Studios
VFX Supervisor
Ingenuity Studios
- malexander
- Staff
- 5151 posts
- Joined: July 2005
- Offline
- blented
- Member
- 61 posts
- Joined: Oct. 2013
- Offline
-
- Quick Links