User Tools

Site Tools


DzSaveFilterMgr (deprecated)

Manager responsible for the save filters that produce script-based presets. (deprecated).

More...

Inherits :

Enumerations

Static Methods

Methods

DAZ Script
DzErrordoSave ( Number filterIndex, String dir=“” )
StringgetSavePath ()
DzErrorwriteFile ( ScriptFileMode mode, String fileName, String filterName=“” )

Detailed Description

Deprecated

This class is responsible for the management of save filters that produce script-based presets - DzSaveFilter (deprecated). Script based presets are deprecated in favor of those in the DAZ Scene Object Notation (DSON) format.

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

See Also:

Enumerations


: ScriptFileMode

Save mode for saving the script to file. Values correspond with DzScript::ScriptFileMode.

  • UseExtension - If the file name extension is .dsb, the file is saved as DAZScriptFile, otherwise as TextScriptFile
  • TextScriptFile - Plain text file - no Unicode support
  • DAZScriptFile - Binary DAZ file format - supports Unicode characters
  • EncDAZScriptFile - Encrypted Binary DAZ file format - supports Unicode characters

Static Methods


Number : findFilter( String className )

Parameter(s):

  • className - The class name of the save filter to find.

Return Value:

  • The index of the save filter with the given class name.

DzSaveFilter (deprecated) : getFilter( Number i )

Parameter(s):

  • i - The index of the save filter to get.

Return Value:

  • A new instance of the i'th exporter in the list.

String : getFilterName( Number i )

Parameter(s):

  • i - The index of the save filter to get the name of.

Return Value:

  • The name of the i'th filter.

Number : getNumFilters()

Return Value:

  • The number of save filters currently supported.

Methods


DzError : doSave( Number filterIndex, String dir=“” )

Save the scene contents to a file with the given save filter. Prompts the user for a file to save to.

Parameter(s):

  • filterIndex - The index of the save filter class to use.
  • dir - The directory to start the file dialog in, if empty, the current load/save directory is used.

Return Value:

  • DZ_NO_ERROR if the file export was successful.

String : getSavePath()

Return Value:

  • Last directory that files were saved to.

DzError : writeFile( ScriptFileMode mode, String fileName, String filterName=“” )

Save the scene contents to a file with the given save filter.

Parameter(s):

  • mode - The file mode for saving the script
  • fileName - The name of the file to export to.
  • filterName - Optional argument. Class name of the filter to use, or no argument to show a choose filter dialog.

Return Value:

  • DZ_NO_ERROR if the file export was successfull.