DgnConverterDelegate

class omni.kit.converter.dgn.DgnConverterDelegate(name, filters, descriptions)

Bases: omni.kit.tool.asset_importer.importer_delegate.AbstractImporterDelegate

Methods

__init__(name, filters, descriptions)

build_options(paths)

Options pane builder for file picker after paths are selected.

convert_assets(paths, **kargs)

The real worker to convert assets.

create_temp_json(import_path)

destroy()

launch_kit_app(file_path, output_path)

show_scene_optimizer_config_frame()

Whether the option panel show scene optimizer config frame

supports_usd_stage_cache()

Whether the importer can write to UsdStageCache for us to retrieve data from

Attributes

filter_descriptions

List of descriptions for each regex filter.

filter_regexes

List of regex filters of this importer supported.

name

__init__(name, filters, descriptions)
build_options(paths) None

Options pane builder for file picker after paths are selected. It will only include those paths that are supported by this importer filtered with regex filters.

Parameters

paths (List[str]) – The list of selected paths from file picker.

async convert_assets(paths, **kargs) Dict[str, Optional[str]]

The real worker to convert assets. It will only include those paths that are supported by this importer filtered with regex filters.

Parameters
  • paths (List[str]) – The list of selected paths from file picker.

  • **kwargs – Optional arguments. Following args are supported currently: add_reference: If it will be added into stage after convert.

Returns

The key is the asset path to be converted, and the value is the target path or stage ID within UsdStageCache that this asset converted to. If value is None, it means it’s failed to be converted.

Return type

Dict[str, Union[str, None]]

show_scene_optimizer_config_frame()

Whether the option panel show scene optimizer config frame

supports_usd_stage_cache() bool

Whether the importer can write to UsdStageCache for us to retrieve data from

property filter_descriptions: List[str]

List of descriptions for each regex filter. It will be used for filter description in the file picker.

Parameters

None

Returns

List of regex descriptions.

property filter_regexes: List[str]

List of regex filters of this importer supported. It’s provided as a list because it’s possible that the importer will support multiple formats and share the same options list.

Parameters

None

Returns

List of regex strings.