User Tools

Site Tools


DzAssetIOFilter

Base class for all classes that save DSON-based scene settings.

More...

Inherits :

Inherited By : DzAssetFileOutFilter

Methods

Detailed Description

Save filter classes save out a subset of scene settings in a DSON format such as poses, light sets, camera sets, etc.

Methods


DzError : doSave( String filename, String startingDir )

Saves to a file.

Parameter(s):

  • filePath - The full path of the file to save to.
  • startingDir - The initial directory to start the save dialog in.

Return Value:

  • DZ_NO_ERROR on success, otherwise an error code.

DzError : doSave( DzFileIOSettings options, String filename, String startingDir )

Saves to a file.

Parameter(s):

  • options - The options for the save.
  • filePath - The path of the file to export to.
  • startingDir - The initial directory to start the file browse.

Return Value:

  • DZ_NO_ERROR on success, otherwise an error code.

Example:

Export a DUF based Pose Preset.

var oAssetIOMgr = App.getAssetIOMgr();
var nAssetIOFilter = oAssetIOMgr.findFilter( "DzPoseAssetFilter" );
var oAssetIOFilter = oAssetIOMgr.getFilter( nAssetIOFilter );
if( oAssetIOFilter ){
	var oSettings = new DzFileIOSettings();
	//oAssetIOFilter.getDefaultOptions( oSettings );
	oAssetIOFilter.getOptions( oSettings, false, "c:/test" );
	oAssetIOFilter.doSave( oSettings, "test", "c:/" );
}

DzUri : getAssetDefinitionUri( DzBase base )

Return Value:

  • The URI to use when referring to the given asset from a definition.

DzUri : getAssetInstanceUri( DzBase base )

Return Value:

  • The URI to use when referring to the given asset from an instance.

String : getCompatiblityBase()

Return Value:

  • The compatibility base of the saved file.

String : getContentType()

Return Value:

  • The content type of the saved file.

String : getDescription()

Return Value:

  • The name of the filter.

String : getDoSavePath()

Return Value:

  • The path of the saved file.

String : getLoadSavePath()

Return Value:

  • The last path used to load/save files with the filter.

String : getStandardSaveRelativePath()

Return Value:

  • The default relative path for saving files with this filter.

Boolean : isSupportAssetFilter()

Return Value:

  • true if this filter saves support files, otherwise false.

void : setLoadSavePath( String path )

Sets the path to use for loading/saving files with this filter.

Parameter(s):

  • path - The path to set.