User Tools

Site Tools


DzContentMgr

Content library (folder & file) manager.

More...

Inherits :

Enumerations

Properties

Static Methods

Methods

DAZ Script
voidaddContentDirectory ( String directory, Boolean saveSetting=true )
voidaddImportDirectory ( String directory, Boolean saveSetting=true )
voidaddMDLDirectory ( String directory, Boolean saveSetting=true )
voidaddPoserDirectory ( String directory, Boolean saveSetting=true )
voidaddRecentFile ( String filename )
voidclearRecentFileList ()
BooleancontentDirectoryIsMapped ( String dirPath )
BooleandoContentSearch ()
voiddoDirNumCheck ()
voidfileCreated ( String filename )
DzContentFolderfindBaseDirectory ( DirectoryTypes dirTypes, String path )
DzContentFolderfindBaseDirectory ( String path, Boolean useImportFolders )
StringfindFile ( String partialPath, DirectoryTypes dirTypes=CloudNativeAndBuiltInDirs )
StringfindSourcePathForNode ( DzNode sceneNode )
StringgetAbsolutePath ( DirectoryTypes dirTypes, String relativePath, String preferredPath=“” )
StringgetAbsolutePath ( String relativePath, Boolean useImportFolders, String preferredPath=“” )
ArraygetAbsolutePaths ( DirectoryTypes dirTypes, String relativePath )
ArraygetAbsolutePaths ( String relativePath, Boolean useImportFolders )
DzUrigetAbsoluteUri ( DirectoryTypes dirTypes, String relativePath, String preferredPath=“” )
DzContentFoldergetBuiltInContentDirectory ()
StringgetBuiltInContentDirectoryPath ()
DzContentFoldergetBuiltInMDLDirectory ( Number which )
StringgetBuiltInMDLDirectoryPath ( Number which )
StringgetCloudAbsolutePath ( String relativePath )
DzContentFoldergetCloudContentDirectory ()
StringgetCloudContentDirectoryPath ()
StringgetCloudRelativePath ( String absolutePath )
DzContentFoldergetContentDirectory ( Number which )
StringgetContentDirectoryPath ( Number which )
DzContentReplaceMgrgetContentReplaceMgr ()
StringgetDefaultContentDir ()
ArraygetDirectoryContentsUrisList ( DirectoryTypes dirTypes, Array relativeDirPaths, Array fileSuffixes )
StringgetImportAbsolutePath ( String relativePath )
DzContentFoldergetImportDirectory ( Number which )
StringgetImportDirectoryPath ( Number which )
ArraygetImportFileExtensions ()
StringgetMappedPath ( String path, Boolean useImportFolders, Boolean isRelative )
StringgetMappedPath ( DirectoryTypes dirTypes, String path, Boolean isRelative )
StringgetMDLAbsolutePath ( String relativePath )
DzContentFoldergetMDLDirectory ( Number which )
StringgetMDLDirectoryPath ( Number which )
StringgetMDLRelativePath ( String absolutePath )
StringgetNativeAbsolutePath ( String relativePath )
ArraygetNativeBaseUserFacingExcludedDirs ()
ArraygetNativeFileExtensions ()
NumbergetNumBuiltInMDLDirectories ()
NumbergetNumContentDirectories ()
NumbergetNumImportDirectories ()
NumbergetNumMDLDirectories ()
NumbergetNumPoserDirectories ()
StringgetPoserAbsolutePath ( String relativePath )
ArraygetPoserBaseUserFacingDirs ()
DzContentFoldergetPoserDirectory ( Number which )
StringgetPoserDirectoryPath ( Number which )
ArraygetPoserFileExtensions ()
ArraygetRecentFileList ()
StringgetRelativePath ( DirectoryTypes dirTypes, String absolutePath )
StringgetRelativePath ( String absolutePath, Boolean useImportFolders )
ArraygetRelativePaths ( DirectoryTypes dirTypes, String absolutePath )
ArraygetRelativePaths ( String absolutePath, Boolean useImportFolders )
BooleanimportDirectoryIsMapped ( String dirPath )
BooleanimportFile ( String path )
BooleanisDirectoryMapped ( String directory )
BooleanisUserFacingDirectoryPath ( DirectoryTypes dirTypes, String relativePath )
BooleanisUserFacingFilePath ( DirectoryTypes dirTypes, String relativePath )
BooleanloadAsset ( DzAsset asset )
BooleanloadAsset ( DzAsset asset, Boolean merge )
BooleanmdlDirectoryIsMapped ( String dirPath )
BooleanmergeFiles ( Array filenames )
BooleanopenFile ( String filename, Boolean merge=true )
BooleanopenNativeFile ( String filename, Boolean isMerge=true )
BooleanopenNativeUri ( DzUri uri, String filename=“”, Boolean isMerge=true )
BooleanopenUri ( DzUri uri, String filename=“”, Boolean merge=true )
BooleanposerDirectoryIsMapped ( String dirPath )
voidrefresh ( Boolean reloadIcons=false )
DzErrorreloadAssetsFromSource ( DzNode sceneNode, DzSettings settings, String srcFilePath=“” )
BooleanreloadSceneAssetsFromSource ( DzSettings settings )
voidremoveAllContentDirectories ()
voidremoveAllImportDirectories ()
voidremoveAllMDLDirectories ()
voidremoveAllPoserDirectories ()
BooleanremoveContentDirectory ( String directory )
BooleanremoveImportDirectory ( String directory )
BooleanremoveMDLDirectory ( String directory )
BooleanremovePoserDirectory ( String directory )
voidsaveAllMappedDirectories ()
voidsetCheckCompatibilityOn ( Boolean useCheckCompatibility )
voidsetCloudContentDirectory ( String directory, Boolean saveSetting=true )
voidsetContentDirectories ( Array directories, Boolean saveSettings=true )
voidsetImportDirectories ( Array directories, Boolean saveSettings=true )
voidsetPoserDirectories ( Array directories, Boolean saveSettings=true )
voidsetUseDatabaseSearch ( Boolean useDatabase )
BooleanshouldMerge ( String filename )
BooleanusingCheckCompatibility ()
BooleanusingDatabaseSearch ()

Signals

Detailed Description

The manager that is responsible for all the content folder & file trees that are accessible from the content library.

There is only one instance of this manager in an application. This instance is created and owned by DzApp. Do not create an instance of this class, rather request the instance from DzApp via DzApp::getContentMgr().

Enumerations


: DirectoryTypes

The types of directories that can be specified when working with this manager.

  • NativeDirs - Represents the directories that are mapped and expected to contain files in the DAZ Studio native file format.
  • PoserDirs - Represents the directories that are mapped and expected to contain files in the Poser file formats.
  • ImportDirs - Represents the directories that are mapped and expected to contain files in formats supported by the various importers a user has installed (with the exception of the Poser format importer - see PoserDirs).
  • BuiltInDirs - Represents the built-in directories that are expected to contain files in compatible formats.
  • MDLDirs - Represents the built-in MDL directories and the directories that are expected to contain files in the MDL format. Since: 4.8.1.50
  • CloudDB - Represents the directories managed by the database, a given storeId_productId subdirectory, within a CloudDir directory. Since: 4.9.0.46
  • CloudDir - Represents the mapped cloud directory and any ./data/cloud subdirectory located within NativeDirs and PoserDirs. Since: 4.9.0.46
  • NativeAndBuiltInDirs - Represents the directory types defined by NativeDirs and BuiltInDirs (typically used to provide legacy support for methods that now use this enum).
  • CloudNativeAndBuiltInDirs - Represents the directory types defined by NativeDirs and BuiltInDirs, CloudDir, and CloudDB.
  • AllLocalNonCloudDirs - Represents the directory types defined by NativeDirs and BuiltInDirs, PoserDirs, ImportDirs, and MDLDirs. Since: 4.9.0.51
  • AllLocalDirs - Represents the directory types defined by NativeDirs and BuiltInDirs, PoserDirs, ImportDirs, MDLDirs, and CloudDir. Since: 4.9.0.51
  • AllDirs - Represents all directory types except those defined by MDLDirs, CloudDir and CloudDB. The “all” prior to 4.8.
  • AllDirsAndCloud - Represents all directory types. Since: 4.9.0.51

Properties


Boolean : autoRefresh

Holds whether or not the content manager automatically refreshes itself.


Number : maxRecentFiles

Holds the maximum length of the File > Open Recent submenu, in the main menu bar.


String : newScene

Holds the path of the scene that will load when the scene is cleared (if any).

Since:

  • 4.9.3.68

Boolean : showBuiltInContent

Holds whether or not the built-in content is shown in the content panes.


String : startupScene

Holds the path of the scene that will load on startup (if any).

Static Methods


String : getCloudPathPrefix()

Return Value:

  • Prefix where cloud places installed products.

Since:

  • 4.9.0.46

String : getContentPath( DzNode node )

Checks the given node for a source file data item, and returns the path of the source file if one is found.

Parameter(s):

  • node - The scene node to get the source file of.

Return Value:

  • The path of the source file for the node if the node contains a source file data item, otherwise an empty string.

Methods


void : addContentDirectory( String directory, Boolean saveSetting=true )

Adds a native content directory to the list.

Parameter(s):

  • directory - The path of the native content directory to add.
  • saveSetting - If true, causes the native content directory mappings to be saved immediately instead of when the application is closed.

void : addImportDirectory( String directory, Boolean saveSetting=true )

Adds an import directory to the list.

Parameter(s):

  • directory - The name of the directory to add.
  • saveSetting - If true, causes the Import directory mappings to be saved immediately instead of when the application is closed.

void : addMDLDirectory( String directory, Boolean saveSetting=true )

Adds a directory where MDL files can reside to the list.

Parameter(s):

  • directory - The name of the directory to add.
  • saveSetting - If true, causes the MDL directory mappings to be saved immediately instead of when the application is closed.

Since:

  • 4.8.0.23

void : addPoserDirectory( String directory, Boolean saveSetting=true )

Adds a Poser import content directory to the list.

Parameter(s):

  • directory - The Poser content directory to add.
  • saveSetting - If true, causes the Poser directory mappings to be saved immediately instead of when the application is closed.

Attention:

  • Poser import paths are folders one level above any Poser Runtime folder.

void : addRecentFile( String filename )

Adds a file to the list of recent files.

Parameter(s):

  • filename - The path of the file to add.

void : clearRecentFileList()

Clears the list of recent files.


Boolean : contentDirectoryIsMapped( String dirPath )

Attempts to locate dirPath among the mapped native content directories.

Parameter(s):

  • dirPath - The directory path to locate.

Return Value:

  • true if the directory is mapped as a native content directory, otherwise false.

Since:

  • 4.5.0.124

Boolean : doContentSearch()

Displays a dialog to the user to perform a Poser content search on the local machine.

Return Value:

  • true if the user accepted and a search was performed, otherwise false.

void : doDirNumCheck()

Causes the content manager to check the number of mapped content directories, and display a warning to the user if it is excessive.


void : fileCreated( String filename )

Notifies the content manager that a new content file has been saved.


DzContentFolder : findBaseDirectory( DirectoryTypes dirTypes, String path )

Given an absolute path, this method traverses the content directories and attempts to find the base (mapped) folder.

Parameter(s):

  • dirTypes - Bitwise OR of flags for which directory types to search.
  • path - The absolute path.

Return Value:

  • The given content folder if successful, otherwise NULL.

Since:

  • 4.8.1.51

DzContentFolder : findBaseDirectory( String path, Boolean useImportFolders )

Given an absolute path, this method traverses the content directories and attempts to find the base (mapped) folder.

Parameter(s):

  • path - The absolute path.
  • useImportFolders - If true, the import folders will also be searched.

Return Value:

  • The given content folder if successful, otherwise NULL.

String : findFile( String partialPath, DirectoryTypes dirTypes=CloudNativeAndBuiltInDirs )

Given a partial path (a file path that is relative to a content directory) this function traverses all folders of the specified mapped directory types in the following order (NativeDirs, PoserDirs, ImportDirs, BuiltInDirs)

Parameter(s):

  • partialPath - The relative path to the file to find.
  • dirTypes - Bitwise OR of flags for which directory types to search.

Return Value:

  • The full path to the file if successful, otherwise an empty string.

See Also:


String : findSourcePathForNode( DzNode sceneNode )

Finds the source path for a node in the scene.

Parameter(s):

  • sceneNode - The node to find the source path for.

Return Value:

  • The source path of the node.

String : getAbsolutePath( DirectoryTypes dirTypes, String relativePath, String preferredPath=“” )

Attempts to locate relativePath by pre-pending the path information for each mapped content directory.

Parameter(s):

  • dirTypes - Bitwise OR of flags for which directory types to search.
  • relativePath - The relative path to find.
  • preferredPath - (Optional) If provided, first directory to check for.

Return Value:

  • The absolute path for the file if it can be found, otherwise an empty string.

Since:

  • 4.8.1.51

String : getAbsolutePath( String relativePath, Boolean useImportFolders, String preferredPath=“” )

Attempts to locate relativePath by pre-pending the path information for each mapped content directory.

Parameter(s):

  • relativePath - The relative path to find.
  • useImportFolders - If true, the mapped import folders will also be searched.
  • preferredPath - (Optional) If provided, first directory to check for.

Return Value:

  • The absolute path for the file if it can be found, otherwise an empty string.

Array : getAbsolutePaths( DirectoryTypes dirTypes, String relativePath )

Attempts to locate relativePath by pre-pending the path information for each mapped content directory.

Parameter(s):

  • dirTypes - Bitwise OR of flags for which directory types to search.
  • relativePath - The relative path to find.

Return Value:

  • A list of absolute paths for the file if it can be found, otherwise an empty list.

Since:

  • 4.8.1.51

Array : getAbsolutePaths( String relativePath, Boolean useImportFolders )

Attempts to locate relativePath by pre-pending the path information for each mapped directory.

Parameter(s):

  • relativePath - The relative path to find.
  • useImportFolders - If true, the mapped import folders will also be searched.

Return Value:

  • A list of absolute paths for the file if it can be found, otherwise an empty list.

DzUri : getAbsoluteUri( DirectoryTypes dirTypes, String relativePath, String preferredPath=“” )

Attempts to locate relativePath by pre-pending the path information for each mapped content directory.

Parameter(s):

  • dirTypes - Bitwise OR of flags for which directory types to search.
  • relativePath - The relative path to find.
  • preferredPath - (Optional) If provided, first directory to check for.

Return Value:

  • The URI for the file if it can be found, otherwise an empty URI.

Since:

  • 4.9.0.38

DzContentFolder : getBuiltInContentDirectory()

Return Value:

  • The built-in content directory used for content and utilities that are shipped with the application.

String : getBuiltInContentDirectoryPath()

Return Value:

  • The path of the built-in content directory used for content and utilities that are shipped with the application.

DzContentFolder : getBuiltInMDLDirectory( Number which )

Parameter(s):

  • which - The index of the built in MDL directory to return.

Return Value:

  • The given built in MDL directory.

Since:

  • 4.8.0.23

String : getBuiltInMDLDirectoryPath( Number which )

Parameter(s):

  • which - The index of the built in MDL directory to return the path of.

Return Value:

  • The path of the given MDL directory.

Since:

  • 4.8.0.23

String : getCloudAbsolutePath( String relativePath )

Attempts to locate relativePath by pre-pending the path information for the mapped cloud directory.

Parameter(s):

  • relativePath - The relative path to find.

Return Value:

  • The absolute path for the file, or an empty string if the file cannot be found.

Since:

  • 4.9.0.33

DzContentFolder : getCloudContentDirectory()

Return Value:

  • The directory used for content that is downloaded and installed through the application.

Since:

  • 4.9.0.33

String : getCloudContentDirectoryPath()

Return Value:

  • The path of the content directory used for content and utilities that are downloaded and installed through the application.

Since:

  • 4.9.0.33

String : getCloudRelativePath( String absolutePath )

Attempts to shorten absolutePath to a path that is relative to the cloud directory. If the path cannot be shortened, the original string is returned.

Parameter(s):

  • absolutePath - The path to make relative.

Return Value:

  • A relative path to the file if one can be made, otherwise the original path.

Since:

  • 4.9.0.33

DzContentFolder : getContentDirectory( Number which )

Parameter(s):

  • which - The index of the content directory to be returned.

Return Value:

  • The given content directory.

String : getContentDirectoryPath( Number which )

Parameter(s):

  • which - The index of the content directory to return the path of.

Return Value:

  • The path of the given content directory.

DzContentReplaceMgr : getContentReplaceMgr()

Return Value:

  • The content replace manager that belongs to the DzContentMgr.

String : getDefaultContentDir()

Return Value:

  • The path of the default content directory.

Array : getDirectoryContentsUrisList( DirectoryTypes dirTypes, Array relativeDirPaths, Array fileSuffixes )

Parameter(s):

  • dirTypes - Bitwise OR of flags for which directory types to search.
  • relativeDirPaths - The relative directory paths to list from.
  • fileSuffixes - The list of filename suffixes to filter by.

Return Value:

  • A list of the URIs for the files in the specified relative paths.

Since:

  • 4.9.0.38

String : getImportAbsolutePath( String relativePath )

Attempts to locate a file with the given relative path by pre-pending the path information for each mapped import directory, finally falling back to the Built-In content directory.

Parameter(s):

  • relativePath - The relative path to find.

Return Value:

  • The absolute path for the file, or an empty string if the file cannot be found.

DzContentFolder : getImportDirectory( Number which )

Parameter(s):

  • which - The index of the import directory to return.

Return Value:

  • The given inport directory.

String : getImportDirectoryPath( Number which )

Parameter(s):

  • which - The index of the import directory to return the path of.

Return Value:

  • The path of the given import directory.

Array : getImportFileExtensions()

Return Value:

  • A list of the extensions for files that can be imported.

Attention:

  • Specifically excludes Poser file extensions even though they are technically imported.

See Also:

Since:

  • 4.9.4.64

String : getMappedPath( String path, Boolean useImportFolders, Boolean isRelative )

Attempts to extract the mapped directory portion of path.

Parameter(s):

  • path - An absolute or relative path to find a corresponding content path for.
  • useImportFolders - If true, the import folders will also be searched.
  • isRelative - If true, path is treated as a relative path. If false, path is treated as an absolute path.

Return Value:

  • The portion of the absolute path that matches a mapped content directory, or an empty string if no match was found.

String : getMappedPath( DirectoryTypes dirTypes, String path, Boolean isRelative )

Attempts to extract the mapped directory portion of path.

Parameter(s):

  • dirTypes - Bitwise OR of flags for which directory types to search
  • path - An absolute or relative path to find a corresponding content path for.
  • isRelative - If true, path is treated as a relative path. If false, path is treated as an absolute path.

Return Value:

  • The portion of the absolute path that matches a mapped content directory, or an empty string if no match was found.

String : getMDLAbsolutePath( String relativePath )

Attempts to locate a file with the given relative path by pre-pending the path information for each mapped MDL directory, as well as the built-in MDL directories, finally falling back to the built-in content directory.

Parameter(s):

  • relativePath - The relative path to find.

Return Value:

  • The absolute path for the file, or an empty string if the file cannot be found.

DzContentFolder : getMDLDirectory( Number which )

Parameter(s):

  • which - The index of the MDL directory to return.

Return Value:

  • The given MDL directory.

Since:

  • 4.8.0.23

String : getMDLDirectoryPath( Number which )

Parameter(s):

  • which - The index of the MDL directory to return the path of.

Return Value:

  • The path of the given MDL directory.

Since:

  • 4.8.0.23

String : getMDLRelativePath( String absolutePath )

Attempts to shorten absolutePath to a path that is relative to one of the mapped MDL directories. If the path cannot be shortened, the original string is returned.

Parameter(s):

  • absolutePath - The path to make relative.

Return Value:

  • A relative path to the file if one can be made, otherwise the original path.

Since:

  • 4.8.0.35

String : getNativeAbsolutePath( String relativePath )

Attempts to locate relativePath by pre-pending the path information for each mapped native directory, finally falling back to the Built-In content directory.

Parameter(s):

  • relativePath - The relative path to find.

Return Value:

  • The absolute path for the file, or an empty string if the file cannot be found.

Array : getNativeBaseUserFacingExcludedDirs()

Return Value:

  • A list of the folder names that are excluded when building the native user-facing folder structure.

Since:

  • 4.9.4.64

Array : getNativeFileExtensions()

Return Value:

  • A list of the native file extensions.

Since:

  • 4.9.4.64

Number : getNumBuiltInMDLDirectories()

Return Value:

  • The number of content directories for imported content.

Since:

  • 4.8.0.23

Number : getNumContentDirectories()

Return Value:

  • The number of content directories.

Number : getNumImportDirectories()

Return Value:

  • The number of content directories for imported content.

Number : getNumMDLDirectories()

Return Value:

  • The number of content directories for imported content.

Since:

  • 4.8.0.23

Number : getNumPoserDirectories()

Return Value:

  • The number of stored paths to Poser content directories.

String : getPoserAbsolutePath( String relativePath )

Attempts to locate a file with the given relative path by pre-pending the path information for each mapped Poser directory, finally falling back to the Built-In content directory.

Parameter(s):

  • relativePath - The relative path to find.

Return Value:

  • The absolute path for the file, or an empty string if the file cannot be found.

Array : getPoserBaseUserFacingDirs()

Return Value:

  • A list of the folder names within a Poser runtime folder that are considered user-facing.

Since:

  • 4.9.4.64

DzContentFolder : getPoserDirectory( Number which )

Parameter(s):

  • which - The index of the Poser directory to return.

Return Value:

  • The given Poser content directory, otherwise null.

String : getPoserDirectoryPath( Number which )

Parameter(s):

  • which - The index of the Poser directory to return the path of.

Return Value:

  • The path of the given Poser content directory, otherwise an empty string.

Array : getPoserFileExtensions()

Return Value:

  • A list of the Poser file extensions.

Since:

  • 4.9.4.64

Array : getRecentFileList()

Return Value:

  • A list of recent files

String : getRelativePath( DirectoryTypes dirTypes, String absolutePath )

Attempts to shorten absolutePath to a path that is relative to one of the mapped content directories. If the path cannot be shortened, the original path is returned.

Parameter(s):

  • dirTypes - Bitwise OR of flags for which directory types to search.
  • absolutePath - The path to make relative.

Return Value:

  • A relative path to the file if one can be made, otherwise absolutePath.

Since:

  • 4.8.1.51

String : getRelativePath( String absolutePath, Boolean useImportFolders )

Attempts to shorten absolutePath to a path that is relative to one of the mapped content directories. If the path cannot be shortened, the original string is returned.

Parameter(s):

  • absolutePath - The path to make relative.
  • useImportFolders - If true, the mapped import folders will also be searched.

Return Value:

  • A relative path to the file if one can be made, otherwise absolutePath.

Array : getRelativePaths( DirectoryTypes dirTypes, String absolutePath )

Attempts to shorten absolutePath to a list of paths that are relative to one of the mapped content directories.

Parameter(s):

  • dirTypes - Bitwise OR of flags for which directory types to search.
  • absolutePath - The path to make relative.

Return Value:

  • A list of relative paths to the file if one can be made, otherwise absolutePath.

Since:

  • 4.8.1.51

Array : getRelativePaths( String absolutePath, Boolean useImportFolders )

Attempts to shorten absolutePath to a list of paths that are relative to one of the mapped content directories.

Parameter(s):

  • absolutePath - The path to make relative.
  • useImportFolders - If true, the mapped import folders will also be searched.

Return Value:

  • A list of relative paths to the file if one can be made, otherwise an empty list.

Boolean : importDirectoryIsMapped( String dirPath )

Attempts to locate dirPath among the mapped import directories.

Parameter(s):

  • dirPath - The directory path to locate.

Return Value:

  • true if the directory is mapped as an import directory, otherwise false.

Since:

  • 4.5.0.124

Boolean : importFile( String path )

Imports the file at the given path. A companion file (a DAZ Script file with the same name as the file being imported, or a DUF file if a DAZ Script does not exist) will be executed if one exists. This function should only be used in special circumstances. Use openFile() instead.

Parameter(s):

  • filename - The path to the file to import.

Return Value:

  • true if the file was imported successfully, otherwise false.

See Also:


Boolean : isDirectoryMapped( String directory )

Parameter(s):

  • directory - The path of the directory to check.

Return Value:

  • true if directory is mapped, otherwise false.

Boolean : isUserFacingDirectoryPath( DirectoryTypes dirTypes, String relativePath )

Parameter(s):

  • dirTypes - Bitwise OR of flags for which directory types to search.
  • relativePath - The relative path to find.

Return Value:

  • true if relativePath is considered “user facing” for the given directory type.

Since:

  • 4.9.4.64

Boolean : isUserFacingFilePath( DirectoryTypes dirTypes, String relativePath )

Parameter(s):

  • dirTypes - Bitwise OR of flags for which directory types to search.
  • relativePath - The relative path to find.

Return Value:

  • true if relativePath is considered “user facing” for the given directory type.

Since:

  • 4.9.4.64

Boolean : loadAsset( DzAsset asset )

Loads an asset as a new scene.

Parameter(s):

  • asset - The asset to load.

Return Value:

  • true if asset is loaded successfully, otherwise false. (since 4.9.3.68)

Since:

  • 4.9.3.41

Boolean : loadAsset( DzAsset asset, Boolean merge )

Loads an asset into the scene.

Parameter(s):

  • asset - The asset to load.
  • merge - If true, combine the new asset with the existing scene. Othererwise, replace the existing scene with the new asset.

Return Value:

  • true if asset is loaded successfully, otherwise false. (since 4.9.3.68)

Since:

  • 4.9.3.41

Boolean : mdlDirectoryIsMapped( String dirPath )

Attempts to locate dirPath among the mapped MDL directories.

Parameter(s):

  • dirPath - The directory path to locate.

Return Value:

  • true if the directory is mapped as a MDL directory, otherwise false.

Since:

  • 4.8.0.23

Boolean : mergeFiles( Array filenames )

Merges a list of files, either as native files or imported files, by calling openNativeFile() or importFile() based on the file extension. For file imports, a companion file (a DAZ Script file with the same name as the file being imported, or a DUF file if a DAZ Script does not exist) will be executed if one exists.

Parameter(s):

  • filenames - A list of names of the files to merge into the current scene.

Return Value:

  • true if the file was loaded successfully, otherwise false.

Boolean : openFile( String filename, Boolean merge=true )

Loads the file, either as a native file or an imported file, by calling openNativeFile() or importFile() based on the file extension. For file imports, a companion file (a DAZ Script file with the same name as the file being imported, or a DUF file if a DAZ Script does not exist) will be executed if one exists.

Parameter(s):

  • filename - The name of the file to load.
  • merge - True to merge file, false to open it (applies only for native files).

Return Value:

  • true if the file was loaded successfully, otherwise false.

Boolean : openNativeFile( String filename, Boolean isMerge=true )

Loads a native file into the scene. This function should only be used in special circumstances. Use openFile() instead.

Parameter(s):

  • filename - The path to the native file to open.
  • isMerge - If true, the file is merged into the scene. If false, the file is loaded as the scene.

Return Value:

  • true if the file was loaded successfully, otherwise false.

See Also:


Boolean : openNativeUri( DzUri uri, String filename=“”, Boolean isMerge=true )

Loads a native file into the scene. This function should only be used in special circumstances. Use openFile() instead.

Parameter(s):

  • uri - The URI of the native file to open. This can be empty if a filename is supplied.
  • filename - The path to the native file to open. This can be empty if a valid URI is supplied.
  • isMerge - If true, the file is merged into the scene. If false, the file is loaded as the scene.

Return Value:

  • true if the file was loaded successfully, otherwise false.

See Also:


Boolean : openUri( DzUri uri, String filename=“”, Boolean merge=true )

Loads the file, either as a native file or an imported file, by calling openNativeFile() or importFile() based on the file extension. For file imports, a companion file (a DAZ Script file with the same name as the file being imported, or a DUF file if a DAZ Script does not exist) will be executed if one exists.

Parameter(s):

  • uri - The URI of the file to load. This can be empty if a valid filename is supplied.
  • filename - The name of the file to load. This can be empty if a valid URI is supplied.
  • merge - true to merge the file, false to open it (applies only to native files).

Return Value:

  • true if the file was loaded successfully, otherwise false.

Boolean : poserDirectoryIsMapped( String dirPath )

Attempts to locate dirPath path among the mapped Poser content directories.

Parameter(s):

  • dirPath - The directory path to locate.

Return Value:

  • true if the directory is mapped as a Poser directory, otherwise false.

void : refresh( Boolean reloadIcons=false )

Refreshes any currently loaded content directories. Call this after any operation that makes changes to the file system, e.g. saving or deleting files, etc.

Parameter(s):

  • reloadIcons - If true, all file icons will be reloaded - good for updating the current content directory when a file has been saved over, etc.

DzError : reloadAssetsFromSource( DzNode sceneNode, DzSettings settings, String srcFilePath=“” )

Causes assets for a given node in the scene to be reloaded, using the given settings, from source files at the given path.

Parameter(s):

  • sceneNode -
  • settings -
  • srcFilePath -

Return Value:


Boolean : reloadSceneAssetsFromSource( DzSettings settings )

Causes the assets for all nodes in the scene to be reloaded from their respective source files.

Parameter(s):

  • settings -

Return Value:


void : removeAllContentDirectories()

Removes all native content mapped directories.


void : removeAllImportDirectories()

Removes all import content directory mappings from the list.


void : removeAllMDLDirectories()

Removes all MDL directory mappings from the list.

Since:

  • 4.8.0.23

void : removeAllPoserDirectories()

Removes all Poser import content directory mappings from the list.


Boolean : removeContentDirectory( String directory )

Removes a navtive content directory mapping from the list.

Parameter(s):

  • directory - The path of the native content directory to remove.

Return Value:

  • true if the directory was removed, false if the given directory is not in the list.

Boolean : removeImportDirectory( String directory )

Removes an import content directory mapping from the list.

Parameter(s):

  • directory - The path of the import content directory to remove.

Return Value:

  • true if the directory was removed, false if the given directory is not in the list.

Boolean : removeMDLDirectory( String directory )

Removes a MDL directory mapping from the list.

Parameter(s):

  • directory - The path of the MDL directory to remove.

Return Value:

  • true if the directory was removed, false if the given directory is not in the list.

Since:

  • 4.8.0.23

Boolean : removePoserDirectory( String directory )

Removes a Poser import content directory mapping from the list.

Parameter(s):

  • directory - The path of the Poser import content directory to remove.

Return Value:

  • true if the directory was removed, false if the given directory is not in the list.

void : saveAllMappedDirectories()

Saves all currently mapped directories to the registry.


void : setCheckCompatibilityOn( Boolean useCheckCompatibility )

Deprecated

This function is provided to keep old source working. This function does nothing.


void : setCloudContentDirectory( String directory, Boolean saveSetting=true )

Sets the directory for content and utilities downloaded and installed through the application.

Parameter(s):

  • directory - The path of the directory to add.
  • saveSetting - Whether or not to save the setting immediately or wait until the application exits.

Since:

  • 4.9.0.33

void : setContentDirectories( Array directories, Boolean saveSettings=true )

Sets the list of directories for native format files.

Parameter(s):

  • directories - The list of directory paths to set.
  • saveSettings - Whether or not to save the settings immediately or wait until the application exits.

Since:

  • 4.9.0.35

void : setImportDirectories( Array directories, Boolean saveSettings=true )

Sets the list of directories for other import format files.

Parameter(s):

  • directories - The list of directory paths to set.
  • saveSettings - Whether or not to save the settings immediately or wait until the application exits.

Since:

  • 4.9.0.35

void : setPoserDirectories( Array directories, Boolean saveSettings=true )

Sets the list of directories for Poser format files.

Parameter(s):

  • directories - The list of directory paths to set.
  • saveSettings - Whether or not to save the settings immediately or wait until the application exits.

Since:

  • 4.9.0.35

void : setUseDatabaseSearch( Boolean useDatabase )

Sets whether or not to use the database.

Parameter(s):

  • useDatabaseSearch - If true, turns database use on, if false, turns database use off.

Boolean : shouldMerge( String filename )

Given the filename, determines if the file should be treated as a merge or an open when loaded. This is determined first by content type. If that does not exist and the file is a .duf it will attempt to retrieve the type from inside the file.

Parameter(s):

  • filename - The name of the file to check.

Return Value:

  • true if the file should be merged, otherwise false.

Boolean : usingCheckCompatibility()

Deprecated

This function is provided to keep old source working. This function does nothing and always returns false.


Boolean : usingDatabaseSearch()

Return Value:

  • true if database use is turned on, otherwise false.

Signals


void : autoRefreshChanged( Boolean onOff )

Signature:“autoRefreshChanged(bool)”

Emitted when the enabled state of the auto refresh has changed

Parameter(s):

  • onOff - The new state of auto refresh.

void : cloudContentDirectoryChanged()

Signature:“cloudContentDirectoryChanged()”

Emitted when the cloud content directory has changed.


void : contentDirectoryListChanged()

Signature:“contentDirectoryListChanged()”

Emitted when a content directory is added or removed.


void : folderTreeChanged()

Signature:“folderTreeChanged()”

Emitted when the currently loaded tree of folders has changed and needs to be rebuilt. Usually a result of a call to refresh(), or when one of the content directory lists has changed.


void : importDirectoryListChanged()

Signature:“importDirectoryListChanged()”

Emitted when an import directory is added or removed.


void : loadScriptFinished()

Signature:“loadScriptFinished()”

Emitted when the loading of a script has failed, or when the execution of a script has finished or failed.

Since:

  • 4.6.4.62

void : loadScriptStarting()

Signature:“loadScriptStarting()”

Emitted when the loading of a script is starting.

Since:

  • 4.6.2.103

void : mdlDirectoryListChanged()

Signature:“mdlDirectoryListChanged()”

Emitted when a MDL directory is added or removed.


void : newFileCreated( String filename )

Signature:“newFileCreated(const QString&)”

Emitted when a new content file has been created.


void : onNewSceneChanged( String filename )

Signature:“onNewSceneChanged(const QString&)”

Emitted when the file that is loaded on 'new' has been changed.


void : poserDirectoryListChanged()

Signature:“poserDirectoryListChanged()”

Emitted when a poser import directory is added or removed.


void : recentFileListChanged()

Signature:“recentFileListChanged()”

Emitted when a recent file is added or removed.


void : scriptFailed( String filename )

Signature:“scriptFailed(const QString&)”

Emitted when the execution of a script fails.

Since:

  • 4.6.4.62

void : scriptFinished( String filename )

Signature:“scriptFinished(const QString&)”

Emitted when the execution of a script has finished.

Since:

  • 4.6.4.62

void : scriptLoadFailed( String filename )

Signature:“scriptLoadFailed(const QString&)”

Emitted when the loading of a script fails.

Since:

  • 4.6.4.62

void : scriptLoadStarting( String filename )

Signature:“scriptLoadStarting(const QString&)”

Emitted when the loading of a script is starting.

Since:

  • 4.6.4.62

void : scriptStarting( String filename )

Signature:“scriptStarting(const QString&)”

Emitted when the execution of a script is starting.

Since:

  • 4.6.4.62

void : startupSceneChanged( String filename )

Signature:“startupSceneChanged(const QString&)”

Emitted when the startup scene file has changed

Parameter(s):

  • filename - The new startup scene file.