Hello,
I have a question about Kit and was also hoping I could get some advice from more seasoned developers.
I’m trying to set up my Kit development environment and I’m having an issue with intelligent suggestions/help with the omni APIs. Damien Fagnou gave a great talk at GTC where he mentioned/showcased the Pylance support but it doesn’t seem to work for me and I need help setting it up. [note the yellow underline/error in the following picture]
Do I point Pylance to the .pyi files mentioned in this post?
If so where can I find them? I’ve looked in [Omniverse path]\pkg\kit-100.1.0_exts and [Omniverse path]\pkg\kit-102.1.1\exts and I see what looks like many of the files for these libraries but no files with the .pyi extension.
My goal is to create something that fills the gap identified in this post:
Specifically being able to measure between a voxel within a Flow point cloud and a piece of a UsdGeomMesh in order to capture discrepancies between design and production. I figure this is a good starting point for learning how the Kit APIs work.
Any advice regarding relevant and helpful functions for such a use case in these libraries (omni or pxr) would be greatly appreciated as well! There are so many to read up on but I think I start with omni.usd or pxr.usd
In reading, I found omni.usd.selection as a way to access the user selected prim in Create and subsequently get coordinates of any UsdGeomXFormable prim, but there are two problems with this:
-I don’t think individual voxels in a flow point cloud can be selected this way (please correct me if I’m wrong here)
-A mesh selected this way would only give me access to the transform of the shape in 3d space.
I am looking for the position of a raycast collision originating at my current viewport toward the object my mouse cursor is hovering on (screen-space to world-space conversion) - and to have the coordinates relative to the world origin - It’s a very similar operation to how we select objects using the Kit viewport, so I’m sure the tools to make it happen are somewhere in the omni utilities.
Note: my point clouds’ origins aren’t always perfectly aligned with the origin of the USD file referencing them, that’s why I would compare this raycast collision to the world origin or the default prim origin - as long as it’s not relative to the currently selected object.
I appreciate any advice the community can give.
Thank you for reading!
-Matthew
[edited for clarity - 12-22-2021]