Help recreating `omni.deform.GetPoints` in C++ as OmniGraph extension

I was using Machinima 104.x.y and found there was a bug with visibility.

This bug is no longer there with USD Composer 106.x.y, but I no longer have the extension omni.deform.GetPoints which is a node available in Machinima.

So I can just code the functionality of the extension myself and then I can open the files from Machinima in Composer and move on with life.

The problem is I do not have the source code to omni.deform.GetPoints and the only OmniGraph DAG node example is here:

and the docs here:
Overview — Omniverse Kit 1.140.2 documentation are based around Python.

I guess I need to know the data type of the incoming and outgoing plugs to this node:
https://docs.omniverse.nvidia.com/extensions/latest/ext_omnigraph/node-library/nodes/omni-deform-shared/omni-deform-getpoints-1.html

Any help would be gratefully received.

Sam

The node in the middle is the one I need to recreate:

with a “Mesh” input of type “deformable(bundle)” which is connected to

Import USD Prim Data (ImportUSDPrim from omni.graph)

here is the TOML file

omni.deform.shared-104.13.2+104.1.lx64.r.cp37.toml.zip (1.4 KB)

The deprecation cycle is burning a bit of goodwill from me.

Here is the TOML file contents

[package]
# Semantic Versioning is used: https://semver.org/
version = "104.13.2"

# Lists people or organizations that are considered the "authors" of the package.
authors = [
    "Edy Susanto Lim <esusantolim@nvidia.com>",
    "Tae-Yong Kim <taeyongk@nvidia.com>",
    "Jaewoo Seo <jseo@nvidia.com>",
    "Ehsan Hassani Moghaddam <emoghaddam@nvidia.com>"
]

# The title and description fields are primarily for displaying extension info in UI
title = "Bundle Based Deformer IO"
description = "OmniGraph nodes for bundle based deformer workflow."

# URL of the extension source repository.
repository="https://gitlab-master.nvidia.com/omniverse/rigging/rigging-operators"

# Keywords for the extension
keywords = ["deformer", "mesh", "omnigraph", "nodes"]

# Location of change log file in target (final) folder of extension, relative to the root.
# More info on writing changelog: https://keepachangelog.com/en/1.0.0/
changelog="docs/CHANGELOG.md"

# Preview image and icon. Folder named "data" automatically goes in git lfs (see .gitattributes file).
# Preview image is shown in "Overview" of Extensions window. Screenshot of an extension might be a good preview image.
preview_image = "data/preview.png"
readme = "docs/README.md"
icon = "data/preview.png"

category = "Animation"

# Main module of the python interface
[[python.module]]
name = "omni.deform.shared"

# Additional python module used to make .ogn test files auto-discoverable
[[python.module]]
name = "omni.deform.shared.tests"

# Other extensions that must be loaded before this one
[dependencies]
"omni.graph" = {}
"omni.graph.tools" = {}
"omni.kit.usd_undo" = {}
"omni.hydra.scene_delegate" = {}
"omni.graph.core" = {}
"omni.graph.io" = {}
"omni.anim.shared" = {}

# The generated tests will make use of these modules
"omni.usd" = {}
"omni.kit.async_engine" = {}

[[native.plugin]]
path = "bin/*.plugin"
recursive = false

[[test]]
dependencies = [
    "omni.kit.renderer.core",
]

[package.writeTarget]
kit = true

This is the code that makes this graph

def connectPointsTool():
    """Create builtin points timesample node and connect it to the destination meshes.
    First selected mesh is the source, and the second one is the destination.

    Returns:
        None
    """
    # get selection
    selected_prims = omni.usd.get_context().get_selection().get_selected_prim_paths()

    if len(selected_prims) == 2:
        src_prim = get_prim(selected_prims[0])
        dest_prim = get_prim(selected_prims[1])

        if UsdGeom.Mesh(src_prim) and UsdGeom.Mesh(dest_prim):
            if not len(src_prim.GetAttribute("points").Get(0)) == len(dest_prim.GetAttribute("points").Get(0)):
                carb.log_error("connectPoints FAILED: mismatch point count.")
                return False

            # then create MeshReader node
            graph = get_graph()
            tn = get_time_node(graph=graph)
            last_node, last_attr = get_last_node(src_prim)
            if last_node.get_type_name() == "omni.graph.ImportUSDPrim":
                # if this is a reader, let's connect the time node
                if not last_node.get_attribute("inputs:usdTimecode").get_upstream_connections():
                    og.Controller.connect(
                        tn.get_attribute("outputs:frame"), last_node.get_attribute("inputs:usdTimecode")
                    )

            gp_node = next(
                (
                    x.get_node()
                    for x in last_node.get_attribute(last_attr).get_downstream_connections()
                    if x.get_node().get_type_name() == "omni.deform.GetPoints"
                ),
                None,
            )
            if not gp_node:
                gp_node = create_node("omni.deform.GetPoints", last_node.get_prim_path().split("/")[-1], graph=graph)
                og.Controller.connect(last_node.get_attribute(last_attr), gp_node.get_attribute("inputs:deformable"))
            export_node = get_prim_io(dest_prim, "omni.graph.nodes.WritePrim", graph=graph)

            # disconnect previous inputs
            in_attr = export_node.get_attribute("inputs:points")
            for conn in in_attr.get_upstream_connections():
                og.Controller.disconnect(conn, in_attr)

            # connect new driver
            og.Controller.connect(gp_node.get_attribute("outputs:points"), in_attr)
        else:
            carb.log_error("connectPoints FAILED: Invalid selection type.")

    else:
        carb.log_error("connectPoints FAILED: Need to select 2 Meshes.")

within extension
omni.anim.toolbox-104.9.0+104.1.cp36.cp37

with TOML

[package]
# Semantic Versioning is used: https://semver.org/
version = "104.9.0"

# Lists people or organizations that are considered the "authors" of the package.
authors = ["Edy Susanto Lim <esusantolim@nvidia.com>", "Jaewoo Seo <jseo@nvidia.com>"]

# The title and description fields are primarily for displaying extension info in UI
title = "Kit Toolbox Extension"
description="Collection of handy tools."

# Path (relative to the root) or content of readme markdown file for UI.
readme  = "docs/README.md"

# URL of the extension source repository.
repository="https://gitlab-master.nvidia.com/omniverse/rigging/rigging-operators"

# Keywords for the extension
keywords = ["kit", "toolbox", "tools"]

# Location of change log file in target (final) folder of extension, relative to the root.
# More info on writing changelog: https://keepachangelog.com/en/1.0.0/
changelog="docs/CHANGELOG.md"

# Preview image and icon. Folder named "data" automatically goes in git lfs (see .gitattributes file).
# Preview image is shown in "Overview" of Extensions window. Screenshot of an extension might be a good preview image.
preview_image = "data/preview.png"

# Icon is shown in Extensions window, it is recommended to be square, of size 256x256.
icon = "data/icon.png"

category = "Animation"

[dependencies]
"omni.kit.test" = {}
"omni.graph" = {}
"omni.graph.tools" = {}
"omni.ui" = {}
"omni.anim.shared" = {}
"omni.deform.shared" = {}
"omni.graph.core" = {}

# Main python module this extension provides, it will be publicly available as "import omni.example.hello".
[[python.module]]
name = "omni.anim.toolbox"

# Publish target
[package.target]
python = ["cp36", "cp37"]

[[test]]
dependencies = [
    "omni.kit.renderer.core",
]

[package.writeTarget]
kit = true

Discord link

Jackpot:

https://docs.omniverse.nvidia.com/kit/docs/omni.graph.examples.cpp/latest/Overview.html

more Kit C++ Extension Template — Kit Extension Template C++ 106.4.0 documentation

Where is the source code associated with this Documentation?

Can you be more specific. The source code for the OmniGraph examples? There is a bundle that is already in Kit 106.4 Extension Manager.

When I click on this link

https://docs.omniverse.nvidia.com/kit/docs/kit-extension-template-cpp/106.0.1/index.html

It gives me a 404 error.

https://docs.omniverse.nvidia.com/kit/docs/kit-extension-template-cpp/latest/index.html

What I was referring to is the link above on this page

https://docs.omniverse.nvidia.com/kit/docs/omni.example.cpp.omnigraph_node/latest/Overview.html

Is a Page Not Found Error

I was hoping for there to be a walkthrough of this code:

Acutally to be fair this code is pretty heavily documented.