omni.flux.asset_importer.core#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- pydantic model omni.flux.asset_importer.core.AssetImporterModel#
Show JSON schema
{ "title": "AssetImporterModel", "type": "object", "properties": { "data": { "items": { "$ref": "#/$defs/AssetItemImporterModel" }, "title": "Data", "type": "array" } }, "$defs": { "AssetItemImporterModel": { "properties": { "input_path": { "title": "Input Path", "type": "string" }, "output_path": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "title": "Output Path" }, "output_usd_extension": { "anyOf": [ { "$ref": "#/$defs/UsdExtensions" }, { "type": "null" } ], "default": null }, "ignore_materials": { "default": false, "title": "Ignore Materials", "type": "boolean" }, "ignore_animations": { "default": false, "title": "Ignore Animations", "type": "boolean" }, "ignore_camera": { "default": false, "title": "Ignore Camera", "type": "boolean" }, "ignore_light": { "default": false, "title": "Ignore Light", "type": "boolean" }, "single_mesh": { "default": false, "title": "Single Mesh", "type": "boolean" }, "smooth_normals": { "default": true, "title": "Smooth Normals", "type": "boolean" }, "export_preview_surface": { "default": false, "title": "Export Preview Surface", "type": "boolean" }, "support_point_instancer": { "default": false, "title": "Support Point Instancer", "type": "boolean" }, "embed_mdl_in_usd": { "default": true, "title": "Embed Mdl In Usd", "type": "boolean" }, "use_meter_as_world_unit": { "default": false, "title": "Use Meter As World Unit", "type": "boolean" }, "create_world_as_default_root_prim": { "default": true, "title": "Create World As Default Root Prim", "type": "boolean" }, "embed_textures": { "default": true, "title": "Embed Textures", "type": "boolean" }, "convert_fbx_to_y_up": { "default": false, "title": "Convert Fbx To Y Up", "type": "boolean" }, "convert_fbx_to_z_up": { "default": false, "title": "Convert Fbx To Z Up", "type": "boolean" }, "keep_all_materials": { "default": false, "title": "Keep All Materials", "type": "boolean" }, "merge_all_meshes": { "default": false, "title": "Merge All Meshes", "type": "boolean" }, "use_double_precision_to_usd_transform_op": { "default": false, "title": "Use Double Precision To Usd Transform Op", "type": "boolean" }, "ignore_pivots": { "default": false, "title": "Ignore Pivots", "type": "boolean" }, "disabling_instancing": { "default": false, "title": "Disabling Instancing", "type": "boolean" }, "export_hidden_props": { "default": false, "title": "Export Hidden Props", "type": "boolean" }, "baking_scales": { "default": false, "title": "Baking Scales", "type": "boolean" }, "ignore_flip_rotations": { "default": false, "title": "Ignore Flip Rotations", "type": "boolean" }, "ignore_unbound_bones": { "default": false, "title": "Ignore Unbound Bones", "type": "boolean" }, "bake_material": { "default": false, "title": "Bake Material", "type": "boolean" }, "export_separate_gltf": { "default": false, "title": "Export Separate Gltf", "type": "boolean" }, "export_mdl_gltf_extension": { "default": false, "title": "Export Mdl Gltf Extension", "type": "boolean" }, "convert_stage_up_y": { "default": false, "title": "Convert Stage Up Y", "type": "boolean" }, "convert_stage_up_z": { "default": false, "title": "Convert Stage Up Z", "type": "boolean" } }, "required": [ "input_path" ], "title": "AssetItemImporterModel", "type": "object" }, "UsdExtensions": { "enum": [ "usd", "usda", "usdc" ], "title": "UsdExtensions", "type": "string" } }, "required": [ "data" ] }
- Fields:
data (List[omni.flux.asset_importer.core.asset_importer.AssetItemImporterModel])
- Validators:
at_least_one»data
- field data: List[AssetItemImporterModel] [Required]#
- Validated by:
at_least_one
- validator at_least_one » data#
Check if there is at least 1 asset
- pydantic model omni.flux.asset_importer.core.AssetItemImporterModel#
Show JSON schema
{ "title": "AssetItemImporterModel", "type": "object", "properties": { "input_path": { "title": "Input Path", "type": "string" }, "output_path": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "title": "Output Path" }, "output_usd_extension": { "anyOf": [ { "$ref": "#/$defs/UsdExtensions" }, { "type": "null" } ], "default": null }, "ignore_materials": { "default": false, "title": "Ignore Materials", "type": "boolean" }, "ignore_animations": { "default": false, "title": "Ignore Animations", "type": "boolean" }, "ignore_camera": { "default": false, "title": "Ignore Camera", "type": "boolean" }, "ignore_light": { "default": false, "title": "Ignore Light", "type": "boolean" }, "single_mesh": { "default": false, "title": "Single Mesh", "type": "boolean" }, "smooth_normals": { "default": true, "title": "Smooth Normals", "type": "boolean" }, "export_preview_surface": { "default": false, "title": "Export Preview Surface", "type": "boolean" }, "support_point_instancer": { "default": false, "title": "Support Point Instancer", "type": "boolean" }, "embed_mdl_in_usd": { "default": true, "title": "Embed Mdl In Usd", "type": "boolean" }, "use_meter_as_world_unit": { "default": false, "title": "Use Meter As World Unit", "type": "boolean" }, "create_world_as_default_root_prim": { "default": true, "title": "Create World As Default Root Prim", "type": "boolean" }, "embed_textures": { "default": true, "title": "Embed Textures", "type": "boolean" }, "convert_fbx_to_y_up": { "default": false, "title": "Convert Fbx To Y Up", "type": "boolean" }, "convert_fbx_to_z_up": { "default": false, "title": "Convert Fbx To Z Up", "type": "boolean" }, "keep_all_materials": { "default": false, "title": "Keep All Materials", "type": "boolean" }, "merge_all_meshes": { "default": false, "title": "Merge All Meshes", "type": "boolean" }, "use_double_precision_to_usd_transform_op": { "default": false, "title": "Use Double Precision To Usd Transform Op", "type": "boolean" }, "ignore_pivots": { "default": false, "title": "Ignore Pivots", "type": "boolean" }, "disabling_instancing": { "default": false, "title": "Disabling Instancing", "type": "boolean" }, "export_hidden_props": { "default": false, "title": "Export Hidden Props", "type": "boolean" }, "baking_scales": { "default": false, "title": "Baking Scales", "type": "boolean" }, "ignore_flip_rotations": { "default": false, "title": "Ignore Flip Rotations", "type": "boolean" }, "ignore_unbound_bones": { "default": false, "title": "Ignore Unbound Bones", "type": "boolean" }, "bake_material": { "default": false, "title": "Bake Material", "type": "boolean" }, "export_separate_gltf": { "default": false, "title": "Export Separate Gltf", "type": "boolean" }, "export_mdl_gltf_extension": { "default": false, "title": "Export Mdl Gltf Extension", "type": "boolean" }, "convert_stage_up_y": { "default": false, "title": "Convert Stage Up Y", "type": "boolean" }, "convert_stage_up_z": { "default": false, "title": "Convert Stage Up Z", "type": "boolean" } }, "$defs": { "UsdExtensions": { "enum": [ "usd", "usda", "usdc" ], "title": "UsdExtensions", "type": "string" } }, "required": [ "input_path" ] }
- Fields:
bake_material (bool)baking_scales (bool)convert_fbx_to_y_up (bool)convert_fbx_to_z_up (bool)convert_stage_up_y (bool)convert_stage_up_z (bool)create_world_as_default_root_prim (bool)disabling_instancing (bool)embed_mdl_in_usd (bool)embed_textures (bool)export_hidden_props (bool)export_mdl_gltf_extension (bool)export_preview_surface (bool)export_separate_gltf (bool)ignore_animations (bool)ignore_camera (bool)ignore_flip_rotations (bool)ignore_light (bool)ignore_materials (bool)ignore_pivots (bool)ignore_unbound_bones (bool)keep_all_materials (bool)merge_all_meshes (bool)single_mesh (bool)smooth_normals (bool)support_point_instancer (bool)use_double_precision_to_usd_transform_op (bool)use_meter_as_world_unit (bool)
- Validators:
- field bake_material: Annotated[bool, SkipValidation()] = False#
- field baking_scales: Annotated[bool, SkipValidation()] = False#
- field convert_fbx_to_y_up: Annotated[bool, SkipValidation()] = False#
- field convert_fbx_to_z_up: Annotated[bool, SkipValidation()] = False#
- field convert_stage_up_y: Annotated[bool, SkipValidation()] = False#
- field convert_stage_up_z: Annotated[bool, SkipValidation()] = False#
- field create_world_as_default_root_prim: Annotated[bool, SkipValidation()] = True#
- field disabling_instancing: Annotated[bool, SkipValidation()] = False#
- field embed_mdl_in_usd: Annotated[bool, SkipValidation()] = True#
- field embed_textures: Annotated[bool, SkipValidation()] = True#
- field export_mdl_gltf_extension: Annotated[bool, SkipValidation()] = False#
- field export_preview_surface: Annotated[bool, SkipValidation()] = False#
- field export_separate_gltf: Annotated[bool, SkipValidation()] = False#
- field ignore_animations: Annotated[bool, SkipValidation()] = False#
- field ignore_camera: Annotated[bool, SkipValidation()] = False#
- field ignore_flip_rotations: Annotated[bool, SkipValidation()] = False#
- field ignore_light: Annotated[bool, SkipValidation()] = False#
- field ignore_materials: Annotated[bool, SkipValidation()] = False#
- field ignore_pivots: Annotated[bool, SkipValidation()] = False#
- field ignore_unbound_bones: Annotated[bool, SkipValidation()] = False#
- field keep_all_materials: Annotated[bool, SkipValidation()] = False#
- field merge_all_meshes: Annotated[bool, SkipValidation()] = False#
- field single_mesh: Annotated[bool, SkipValidation()] = False#
- field smooth_normals: Annotated[bool, SkipValidation()] = True#
- field support_point_instancer: Annotated[bool, SkipValidation()] = False#
- field use_double_precision_to_usd_transform_op: Annotated[bool, SkipValidation()] = False#
- field use_meter_as_world_unit: Annotated[bool, SkipValidation()] = False#
- omni.flux.asset_importer.core.determine_ideal_types(
- paths: List[str],
- pref_normal_conv: TextureTypes | None = None,
Will try to determine the TextureType based on the filename. If no TextureType can be found, no entry will be added to the returned dictionary.
- omni.flux.asset_importer.core.get_texture_sets(
- paths: List[str],
From a list of paths, return a list of set of textures
- Parameters:
paths – the texture paths
- Returns:
Set of textures
- omni.flux.asset_importer.core.parse_texture_paths(paths_to_parse, required_ext='dds')#
From a list of paths, return a dictionary with the paths broken up by _-. or capital letter
- Parameters:
paths_to_parse – the texture paths
required_ext – the texture extension
- Returns:
dictionary of parsed textures