User Tools

Site Tools


DzExportMgr

Manager responsible for scene file exporters.

More...

Inherits :

Static Methods

Methods

DAZ Script
DzErrorexportFile ( String fileName, Number exporterIdx )
DzErrorexportFile ( String fileName, Number exporterIdx, DzFileIOSettings options )
StringgetExportPath ()
BooleanisExporting ()
voidsetExportPath ( String path )

Signals

Detailed Description

There is only one instance of this manager in an application. This instance is created and owned by DzApp. Request the instance via DzApp::getExportMgr().

See Also:

Static Methods


Boolean : canExport( String filename )

Uses the extension from each of the exporters and attempts to match an exporter with the extension of the filename.

Parameter(s):

  • filename - The name of the file to try to find an exporter for.

Return Value:

  • true if an exporter was found that can write the given file.

DzExporter : findExporter( String filename )

Uses the extension from each of the exporters and attempts to match an exporter with the extension of the filename.

Parameter(s):

  • filename - The name of the file to try to find an exporter for.

Return Value:

  • A new instance of the matching exporter, or NULL if none was found. The caller takes ownership of this pointer and is responsible for deleting it.

DzExporter : findExporterByClassName( String className )

Uses the class name of each of the exporters and attempts to find an exporter with the given class name.

Parameter(s):

  • className - The name of the exporter class to find.

Return Value:

  • A new instance of the matching exporter, or NULL if none was found. The caller takes ownership of this pointer and is responsible for deleting it.

Number : findExporterIndex( String filename )

Uses the extension from each of the exporters and attempts to match an exporter with the extension of the filename.

Parameter(s):

  • filename - The name of the file to try to find an exporter for.

Return Value:

  • The index of a matching exporter, or -1 if none was found.

DzExporter : getExporter( Number exporterIdx )

Parameter(s):

  • exporterIdx - The index of the exporter to get an instance of.

Return Value:

  • A new instance of the i'th exporter in the list. The caller takes ownership of this pointer and is responsible for deleting it when finished.

Number : getNumExporters()

Return Value:

  • The number of exporters currently supported.

void : makeExportFileFilter( DzFileFilter filter, String defaultFilter=“” )

Populates the given filter with all the types recognized by the export manager.

Parameter(s):

  • filter - The filter to populate
  • defaultFilter - The filter to set as the default

Methods


DzError : exportFile( String fileName, Number exporterIdx )

Export the scene contents to a file.

Parameter(s):

  • filename - The name of the file to export to.
  • exporterIdx - The index of the exporter class to use. If this is less than 0, then the extension of fileName is used to attempt to find an appropriate exporter.

Return Value:

  • DZ_NO_ERROR if the file export was successful.

DzError : exportFile( String fileName, Number exporterIdx, DzFileIOSettings options )

Export the scene contents to a file.

Parameter(s):

  • filename - The name of the file to export to.
  • exporterIdx - The index of the exporter class to use. If this is less than 0, then the extension of fileName is used to attempt to find an appropriate exporter.
  • options - The options to use while exporting the file.

Return Value:

  • DZ_NO_ERROR if the file export was successful.

String : getExportPath()

Gets the default export directory - this is typically the last directory that the user exported a file to, and will be the directory that user will be taken to next time the file export dialog is displayed.

Return Value:

  • The current default directory that files are exported to.

Boolean : isExporting()

Return Value:

  • true if there is currently a file being exported, otherwise false.

void : setExportPath( String path )

Sets the default export directory - this is the directory that user will be taken to next time the file export dialog is displayed.

Parameter(s):

  • path - The new default path for exporting files.

Signals


void : fileExported()

Signature:“fileExported()”

Emitted when a file export operation is finished


void : fileExportStarting()

Signature:“fileExportStarting()”

Emitted when a file export operation is started