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
1723 5 1- blented
- Member
- 61 posts
- Joined: 10月 2013
- Offline
- mtucker
- スタッフ
- 4525 posts
- Joined: 7月 2005
- Offline
- blented
- Member
- 61 posts
- Joined: 10月 2013
- Offline
- blented
- Member
- 61 posts
- Joined: 10月 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 - 2020年3月29日 16:12:41
Grant Miller
VFX Supervisor
Ingenuity Studios
VFX Supervisor
Ingenuity Studios
- malexander
- スタッフ
- 5212 posts
- Joined: 7月 2005
- Offline
- blented
- Member
- 61 posts
- Joined: 10月 2013
- Offline
-
- Quick Links