User Tools

Site Tools


DzExportMgr

Manager of all scene file exporter classes.

More...

Inherits :

Methods

DAZ Script
BooleancanExport ( String filename )
DzErrorexportFile ( String fileName, Number exporterIndex, DzFileIOSettings options )
DzErrorexportFile ( String fileName, Number exporterIndex )
DzExporterfindExporter ( String filename )
DzExporterfindExporterByClassName ( String className )
NumberfindExporterIndex ( String filename )
DzExportergetExporter ( Number i )
StringgetExportPath ()
NumbergetNumExporters ()
voidmakeExportFileFilter ( DzFileFilter filter, String defaultFilter=“” )
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. Don't create an instance of this class, but rather request a pointer to it from DzApp via DzApp::getExportMgr().

See Also:

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.

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

Export the scene contents to a file.

Parameter(s):

  • filename - The name of the file to export to.
  • exporterIndex - 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 exporterIndex )

Export the scene contents to a file.

Parameter(s):

  • filename - The name of the file to export to.
  • exporterIndex - 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.

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 i )

Parameter(s):

  • i - 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.

String : getExportPath()

Return Value:

  • The current default directory that files are exported to.

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

void : setExportPath( String path )

Sets the default directory that files are exported to.

Parameter(s):

  • path - The new default path for exporting files.

Signals


void : fileExported()

Signature:“fileExported()”

Emitted when a file export operation is finished

TODO: Add description.


void : fileExportStarting()

Signature:“fileExportStarting()”

Emitted when a file export operation is started

TODO: Add description.