Skip to content

UsdExportUI

UsdExportUI#

(Usd ExportUI)

  • Default object name: usd_exportui
  • Inherits from: Generic

No corresponding User page.

Description#

Object used to configure and export to a USD stage. It can be created directly, configured, and then the export actions can be called to trigger an export.

Public Attributes#

Type Name Visual Hint Description
string filename VISUAL_HINT_FILENAME_SAVE Filename of the output stage. Choose .usda for text format (slow and huge file, only use for debug on small contexts) or .usd/.usdc for compact and fast binary format.
long default_prim VISUAL_HINT_DEFAULT Configure the default prim of the exported stage. None: No default prim will be authored in the exported stage. Choose Existing: Choose an object from the scene to use as the default prim. In this case, beware that USD uses a kinematic hierarchy, and any sibling or parent will not be part of the default root. Create: Export the scene as a child of an Xform which will be authored as the default root prim.
reference (SceneItem) root_prim VISUAL_HINT_DEFAULT When Default Prim is set to Choose Existing, this attributes lets you select the object you want to author as a root prim.
string root_prim_name VISUAL_HINT_DEFAULT When Default Prim is set to Create, this attributes lets you choose the name of the create root Xform.
bool standalone VISUAL_HINT_DEFAULT When true, a single file containing everything is exported. When false, external USD files (either bundles or references) are referenced inplace and only the overrides (currently limited to transforms and visibility) are exported in the main stage.
bool use_instances VISUAL_HINT_DEFAULT When true, objects used more than once will be encapsulated in an instanceable xform, and instances will be used instead of simple references. Please note that if you have nested scatterers, using native USD instances is highly discouraged because of an issue of USD Imaging: https://github.com/PixarAnimationStudios/USD/issues/1311
bool export_invisible_objects VISUAL_HINT_DEFAULT By default, objects that are always invisible will not be exported. Use this to force them to be exported (they will be flagged invisible in USD)
bool export_displacement VISUAL_HINT_DEFAULT When checked (by default) displacement and subdivision will be baked in the exported geometry
bool export_custom_attributes VISUAL_HINT_DEFAULT By default custom attributes won't be exported. If this option is used, they will be exported as custom USD properties. Note that if you're not using namespace, attributes might not be exported if their names clash with existing USD properties.
string custom_attributes_namespace VISUAL_HINT_DEFAULT When the Export Custom Attributes option is used, this one allows to specify an optional namespace that will be prepended on the exported USD property names. If empty (the default) then no namespace is used.
long animation_mode VISUAL_HINT_DEFAULT Choose what animation data to export.
long custom_frame VISUAL_HINT_DEFAULT Specify the frame to export, when using Custom Range mode.
long[2] custom_frame_range VISUAL_HINT_DEFAULT Specify the start/end frames to export, when using Custom Range mode.

CID#

class "UsdExportUI" "Generic" {
    #version 0.0
    doc "Object used to configure and export to a USD stage. It can be created directly, configured, and then the export actions can be called to trigger an export."
    action "export_context" {
        doc "Action that can be called from Python. When used, will export the currently selected context to a USD stage using the current object\'s attribute values as options."
        private yes
        hidden yes
        value <empty>
    }
    attribute_group "output" {
        filename_save "filename" {
            doc "Filename of the output stage. Choose .usda for text format (slow and huge file, only use for debug on small contexts) or .usd/.usdc for compact and fast binary format."
            extension "usd" "usdc" "usda"
            value ""
        }
        long "default_prim" {
            doc "Configure the default prim of the exported stage. `None`: No default prim will be authored in the exported stage. `Choose Existing`: Choose an object from the scene to use as the default prim. In this case, beware that USD uses a kinematic hierarchy, and any sibling or parent will not be part of the default root. `Create`: Export the scene as a child of an Xform which will be authored as the default root prim."
            preset "None" "0"
            preset "Choose Existing" "1"
            preset "Create" "2"
            value 0
        }
        reference "root_prim" {
            doc "When `Default Prim` is set to `Choose Existing`, this attributes lets you select the object you want to author as a root prim."
            filter "SceneItem"
            read_only yes
            value ""
        }
        string "root_prim_name" {
            doc "When `Default Prim` is set to `Create`, this attributes lets you choose the name of the create root Xform."
            read_only yes
            value ""
        }
        bool "standalone" {
            doc "When true, a single file containing everything is exported. When false, external USD files (either bundles or references) are referenced inplace and only the overrides (currently limited to transforms and visibility) are exported in the main stage."
            value yes
        }
        bool "use_instances" {
            doc "When true, objects used more than once will be encapsulated in an instanceable xform, and instances will be used instead of simple references. Please note that if you have nested scatterers, using native USD instances is highly discouraged because of an issue of USD Imaging: https://github.com/PixarAnimationStudios/USD/issues/1311"
            value no
        }
        bool "export_invisible_objects" {
            doc "By default, objects that are always invisible will not be exported. Use this to force them to be exported (they will be flagged invisible in USD)"
            value no
        }
        bool "export_displacement" {
            doc "When checked (by default) displacement and subdivision will be baked in the exported geometry"
            value yes
        }
        bool "export_custom_attributes" {
            doc "By default custom attributes won\'t be exported. If this option is used, they will be exported as custom USD properties. Note that if you\'re not using namespace, attributes might not be exported if their names clash with existing USD properties."
            value no
        }
        string "custom_attributes_namespace" {
            doc "When the `Export Custom Attributes` option is used, this one allows to specify an optional namespace that will be prepended on the exported USD property names. If empty (the default) then no namespace is used."
            read_only yes
            value ""
        }
    }
    attribute_group "animation" {
        long "animation_mode" {
            doc "Choose what animation data to export."
            preset "Current Frame" "0"
            preset "Current Range" "1"
            preset "Custom Frame" "2"
            preset "Custom Range" "3"
            value 0
        }
        long "custom_frame" {
            doc "Specify the frame to export, when using `Custom Range` mode."
            read_only yes
            value 0
        }
        long[2] "custom_frame_range" {
            doc "Specify the start/end frames to export, when using `Custom Range` mode."
            read_only yes
            value 0 0
        }
    }
}