Commands syntax error

I just try to Kit Command.
In GUI, I drag the usd file to viewport to reference.
And in commands, I got that commands.
It is

import omni.kit.commands
from omni import usd._usd
from pxr import Sdf

usd_context=<omni.usd._usd.UsdContext object at 0x7fbf7d3a6070>,

When I tried it in script editor.
I got error
SyntaxError:(‘Invalid syntax’, …, 'from omni import usd_usd’n))
So I changed it

from omni import usd._usd => import omni.usd

But I got another error

SyntaxError:(‘invalid syntax’, …, usd_context=<omni.usd._usd.UsdContext object at 0x7fbf7d3a6070>

What is the problem?

Other commands works good.

I fixed it
usd_context=<omni.usd._usd.UsdContext object at 0x7fbf7d3a6070> => usd_context = omni.usd.get_context()

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.