Hi, I’m trying to use omni.kit.commands
during startup, but the kit plugin doens’t intialize.
2023-05-22 06:53:51 [14,594ms] [Error] [omni.kit.commands.command] Can't execute command: "DeletePrims", it wasn't registered or ambigious.
2023-05-22 06:53:51 [14,595ms] [Error] [omni.kit.commands.command] Can't execute command: "CreatePrimWithDefaultXform", it wasn't registered or ambigious.
2023-05-22 06:53:51 [14,600ms] [Error] [omni.kit.commands.command] Can't execute command: "CreatePayload", it wasn't registered or ambigious.
Also it happens when setting up cameras during loading stage in the startup function, since it also uses kit.commands
import omni.kit.commands
def adjust_session_camera(cam_path: Sdf.Path, adjustment: Gf.Matrix4d):
cam_prim = stage.GetPrimAtPath(cam_path)
xformable = UsdGeom.Xformable(cam_prim) if cam_prim else None
if xformable:
cur_xform = xformable.GetLocalTransformation(time_code)
omni.kit.commands.create(
'TransformPrimCommand',
path=cam_path,
new_transform_matrix=cur_xform * adjustment,
old_transform_matrix=cur_xform,
time_code=time_code,
usd_context_name=usd_context_name
).do()
Is there any workaround? Thanks. (omni.usd.commands seems to work well but I don’t want to modify the official plugin)