I have Nvidia Omniverse plugin. This plugin adds a item in Right mouse button menu in Asset browser - “Import facial animation”.
Manually - i RMB, then click this item. Choose *.usd files, and set options.
Omniverse does not provide any docs for scripting it.
How i can import it in Python way?
- Directly via API. How?
- Triggering Menu item with label “Import facial animation”. How?
- Simulating mouse and button clicks?
P.S.
I’ve found code in omniverse plugin, that add this item in menu. Maybe i must call some CPP procedure via Python. How?
OmniverseEditorMenuExtension.cpp
MenuBuilder.AddMenuEntry(
FText::FromString(L"Import Facial Animation"),
FText(),
FSlateIcon(),
FUIAction(FExecuteAction::CreateLambda(
[SelectedObjects]()
{
FString SelectedPath;
for(auto SelectedObj : SelectedObjects)
{
auto OmniAsset = Cast<UOmniverseAsset>(SelectedObj);
if (OmniAsset)
{
if (!SelectedPath.IsEmpty())
{
SelectedPath += ";";
}
SelectedPath += OmniAsset->GetOmniPath();
}
}
SOmniverseImporterDialog::ShowDialog(EOmniImporterType::OIT_Facial, EOmniSourceType::OST_Nucleus, SelectedPath);
}
)));