Omnivser/IsaacSim Codeful USD Schema Extension

How can I create a codeful USD schema extension. There are examples here, but these seem to use CMake rather than premake, and I’ve had trouble getting that repo to build (see issue I submitted here. The IsaacSim repo has a codless schema, but it appears to me that the code actually has been generated with usdGenSchema separately, I’d like this to be run during the build process.

Hi @taaj.street,

I saw your follow-up in your codeless schema topic
where you confirmed that prim.IsA() returns False for codeless schemas even in plain USD Python –
that explains exactly why you need a codeful schema here. Codeless schemas skip C++ TfType
registration, so IsA() can’t traverse the type hierarchy at the C++ level. Codeful (compiled)
schemas are the right solution.

One nuance worth knowing: the string form prim.IsA("MyType") actually works even for codeless
schemas (USD resolves it from the plugInfo at runtime). What breaks with codeless is the class form
prim.IsA(MySchema.MyClass) and inheritance queries like prim.IsA(UsdGeom.Xformable) – because
those require a live C++ TfType chain. If you only need identity checks and not inheritance
polymorphism, codeless + string-IsA is sufficient; but if you need the class form or parent-type
queries, codeful is required.

Note: Isaac Sim’s own robot/sensor schemas (isaacsim.robot.schema) are intentionally codeless –
NVIDIA’s internal code works around this by using prim.GetTypeName() == "IsaacContactSensor"
and prim.HasAPI("IsaacRobotAPI") instead of IsA(). Your use case (needing the class-form
IsA()) is the concrete reason to go codeful.