User Tools

Site Tools


DzSourceFileData

A DzElementData implementation that stores the source file of an imported object on the element.

More...

Inherits :

Inherited By : DzGeomSourceFileData

Properties

Constructors

DAZ Script
DzSourceFileData ( String filePath=“” )

Methods

Detailed Description

Implements a custom data item that stores the source of an imported object on the element.

Primarily used by the framework to store source paths for imported Poser format content.

Can be used as follows to retrieve the path of the CR2 file from which a figure was loaded:

var sPath;
var oSkeleton = Scene.getPrimarySelection();
// ... error checking
var oData = oSkeleton.findDataItem( "SourceFileData" );
if( oData && oData.inherits( "DzSourceFileData" ) ){
	sPath = oData.sourceFilePath;
}
 
print( "Source Path:", sPath );

Could also be used by plug-in developers for other custom importers to store the source file for imported objects.

Properties


String : sourceFilePath

The path to the source file.

Constructors


DzSourceFileData( String filePath=“” )

Creates a new source file data object that stores the source path of an imported object.

Parameter(s):

  • filePath - The path to the source file.

Attention:

  • It is the developer's responsibility to manage the lifetime of this object. This can be accomplished most easily by adding it to the list of data items owned by an element.

See Also:

Methods


Boolean : getGeometryChanged()

Return Value:

  • true if the source geometry has changed, otherwise false.

String : getPoserRuntimeRelativePath()

Attempts to convert the source path into a “Poser” style Runtime-relative path (i.e., “:Runtime:Libraries:Character:FileName.cr2”).

Return Value:

  • The converted source path (if conversion succeeds), otherwise an empty string.

void : setGeometryChanged( Boolean onoff )

Sets whether or not the source geometry has changed.

Parameter(s):

  • onOff - Whether or not the source geometry has changed.