User Tools

Site Tools


DzAssetMgr

Content asset (database) manager.

More...

Inherits :

Enumerations

Static Methods

Methods

DAZ Script
BooleancanStartAndStopCMS ()
voidcheckforNewMetadataScripts ()
voidclearAllGroupIDs ( Boolean notify=true )
voidclearDBMetaFileQueue ()
NumbercreateCompatibilityBase ( String base )
DzProductAssetContainercreateProduct ( String name, String storeID=“”, String token=“” )
DzProductAssetContainercreateProductFromAssets ( Array assets, String name=“” )
DzProductAssetContainercreateProductFromContainer ( DzAbstractAssetContainer container, String name=“” )
BooleancreateStore ( String storeID, String token, String url )
NumbercreateType ( String type, Boolean defaultLoad )
voidemitCategoryChanged ( Array idPath )
StringfindAssetPathFromShortFilename ( String fileName )
ArrayfindAssetsForFile ( String relativePath, Boolean userFacing, Boolean installed )
NumberfindAudienceID ( String audience )
NumberfindCompatibilityBaseID ( String base, Boolean create=true )
DzProductAssetContainerfindProductByGuid ( String guid )
DzProductAssetContainerfindProductByStoreToken ( String storeID, String token )
ArrayfindProductsByName ( String name )
ArrayfindProductsForFile ( String relativePath )
NumberfindTypeID ( String type, Boolean create=false, Boolean defaultLoad=false )
StringgetAudience ( Number id )
ArraygetAudiences ()
DzCategoryAssetContainergetCategories ()
StringgetCategoryPath ( Number categoryId )
ObjectgetCMSOptions ()
StringgetCompatibilityBase ( Number id )
DzTopLevelAssetContainergetContentDirs ()
StringgetDatabaseDsn ()
StringgetDatabaseFilePath ()
ArraygetDBMetaFileQueue ()
StringgetFirstCategory ( String assetPath, String preferredCategory )
BooleangetGroupNewProductsAsNew ()
DzTopLevelAssetContainergetImportDirs ()
NumbergetMaxFileSearchResultSize ()
NumbergetNumMaxItemsPerPage ()
DzTopLevelAssetContainergetPoserDirs ()
DzTopLevelAssetContainergetProducts ()
ArraygetRelativePaths ( String absolutePath, Boolean useImportFolders )
ArraygetRootCategoryStrings ()
BooleangetShowHiddenVendorCategorization ()
ArraygetStoresIDs ()
StringgetStoreToken ( String storeID )
StringgetStoreUrl ( String storeID )
StringgetType ( Number id )
StringgetTypeForContentFile ( String fullPath )
StringgetTypeForNode ( DzNode node )
ArraygetTypes ()
BooleanhaveDatabase ()
ArrayimportMetadataFiles ( Array productRelativePaths, Boolean runSilent=false, Boolean markAsVendor=false )
BooleanisClothingType ( String type )
BooleanisConnectedToCMS ()
BooleanisFigureType ( String type )
BooleanisFollowingType ( String type )
BooleanisHairType ( String type )
BooleanisNeedsBaseFigureType ( String type )
BooleanisPresetForFigureType ( String type )
BooleanisPresetType ( String type )
BooleanisPropType ( String type )
BooleanisReplaceableType ( String type )
BooleanisResettingDatabase ()
BooleanisSynchronizing ()
voidmarkCategoriesChanged ()
voidmarkProductsChanged ()
ArrayprocessDBMetaFile ( String productRelativePath, Boolean runSilent=false, Boolean markAsVendor=false, Boolean groupAsNew=true )
ArrayprocessDBMetaFileNoEmit ( String productRelativePath, Boolean runSilent=false, Boolean markAsVendor=false, Boolean groupAsNew=true )
voidprocessDBMetaFileQueue ()
voidqueueDBMetaFile ( String productRelativePath )
voidrefreshCategoryRoots ()
voidrefreshStores ()
voidrefreshTypes ()
voidreimportDBMetaFiles ()
voidremoveOrphanedAssetReferences ( Array list )
BooleanremoveStore ( String storeID )
voidresetDatabase ()
voidscanFiles ( SearchOption options, Boolean assignToGroup, Boolean addToCategory, Boolean onlyNewToCategory )
DzSearchContainersearchFiles ( String filename, SearchOption options )
DzSearchContainersearchForAssetAddOns ( DzAsset asset, String filterText, Array categories, Number sorting )
DzSearchContainersearchForAssets ( String filterText, Array categories, Array compatibilityBases, Array contentTypes, Number sorting )
DzSearchContainersearchForAssetsByKeywords ( String keywords, SearchOption options, Number sorting )
DzSearchContainersearchForAssetsInCategory ( String categoryPath, Boolean userFacing=true, Boolean installed=true )
DzSearchContainersearchForAssetTargets ( DzAsset asset, String filterText, Array categories, Number sorting )
DzSearchContainersearchForProductAssets ( DzProductAssetContainer product, String filterText, Array categories, Array compatibilityBases, Array contentTypes, Number sorting )
DzProductHolderContainersearchForProducts ( String filterText, Array categories, Array compatibilityBases, Array contentTypes, Number installStateFlags, Number sorting )
voidsetCMSOptions ( String clusterDirectory, Number port )
voidsetGroupNewProductsAsNew ( Boolean onOff )
voidsetMaxFileSearchResultSize ( Number maxNum )
voidsetMaxItemsPerPage ( Number maxNum )
voidsetProductGroupIDs ( Array guids, Number groupId, Boolean groupProduct=true, Boolean groupFiles=true )
voidsetShowAssetToolTip ( Boolean onOff )
voidsetShowExtensions ( Boolean onOff )
voidsetShowHiddenVendorCategorization ( Boolean shown )
voidsetShowLargeIcons ( Boolean onOff )
BooleanshowAssetToolTip ()
BooleanshowDatabaseEditor ( DzAbstractAssetContainer assetContainer )
BooleanshowExtensions ()
BooleanshowLargeIcons ()
voidshowMoreProductInfo ( DzProductAssetContainer product )
voidstartCMS ()
voidstopAllSearches ()
voidstopCMS ( Number mode, Boolean wait, Number timeout=0 )
voidstopFileScan ()
voidstopFileSearch ()
voidstopSearchForAssetAddOns ()
voidstopSearchForAssets ()
voidstopSearchForAssetTargets ()
voidstopSearchForProducts ()
voidupdateCategoryContainers ()
voidupdateContentContainers ()
voidupdateFolderBasedContainers ()
voidupdateImportContainers ()
voidupdatePoserContainers ()
voidupdateProductContainers ()
BooleanvacuumDatabase ()

Signals

voidbasePathsChanged ()
voidcategoryUpdate ( Array idPath )
voidcmsDSNChanged ()
voidcmsStarted ()
voidcmsStopped ()
voidcompatibilityBaseListChanged ()
voidcontainerUpdate ( Array idPath )
voiditemsPerPageChanged ( Number newPerPage )
voidmaxFileSearchResultSizeChanged ( Number maxFileSearchResultSize )
voidproductCreated ( String guid )
voidshowAssetToolTipChanged ()
voidshowExtensionsChanged ()
voidshowLargeIconsChanged ()
voidstoreListChanged ()
voidtypeListChanged ()
voiduiAboutToSearch ( QObject sender, String text, Array categories, Array compatibilityBases, Array contentTypes )

Detailed Description

The manager that is responsible for all content assets.

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::getAssetMgr().

Enumerations


: SearchOption

Search options used to search assets with the Asset Manager.

  • None - No options
  • WholeWord - A whole word search. Only works with file system based searches.
  • RegExp - A Regular Expression search. Only works with file system based searches.
  • NativeScenes - Include native scene files (*.duf, *.dsf, *.daz) in the search.
  • NativeScripts - Include native script files (*.ds, *.dsa, *.dsb, *.dse) in the search.
  • PoserFigures - Include Poser Character files (*.cr2, *.crz) in the search.
  • PoserPoses - Include Poser Pose files (*.pz2, *.p2z) in the search.
  • PoserProps - Include Poser Prop files (*.pp2, *.ppz) in the search.
  • PoserHair - Include Poser Hair files (*.hr2, *.hrz) in the search.
  • PoserFaces - Include Poser Face (Expression) files (*.fc2,*.fcz) in the search.
  • PoserLights - Include Poser Light files (*.lt2, *.ltz) in the search.
  • PoserCameras - Include Poser Camera files (*.cm2, *.cmz) in the search.
  • PoserHands - Include Poser Hand files (*.hd2, *.hdz) in the search.
  • PoserMaterials - Include Poser Material Collection files (*.mc6, *.mcz) in the search.
  • PoserScenes - Include Poser Scene files (*.pz3, *.pzz) in the search.
  • ImportFiles - Include general import files in the search.
  • AllNativeFiles - Include all native files (*.duf, *.dsf, *.daz, *.ds, *.dsa, *.dsb, *.dse) in the search.
  • NoNativeFilesMask - Mask for no native files in the search.
  • AllPoserFiles - Include all Poser files in the search.
  • NoPoserFilesMask - Mask for no Poser files in the search.
  • AllFiles - Search through all files.
  • DefaultOptions - Same as AllFiles.

Static Methods


String : escapeSearchTerm( String searchTerm )

Parameter(s):

  • searchTerm - The search term to be escaped

Return Value:

  • An escaped version of searchTerm

String : findCommonBaseCategoryPath( Array categoryPaths, Boolean flatten=false )

Parameter(s):

  • categoryPaths - The list of category paths to find a common path in. This can be a list of strings, or a list of lists of strings.
  • flatten - If true, the categories are processed as if they are a single list. If false (default), the deepest path common to all lists will be chosen. In either case, non-default categorization is preferred over default categorization.

Return Value:

  • A string representing the portion of categoryPaths that is common.

Since:

  • 4.9.2.68

String : getAssetUriForNode( DzNode node )

Parameter(s):

  • node - The node to get the asset URI for.

Return Value:

  • The asset URI for node, or an empty string if node is null.

String : getCategoriesID()

Return Value:

  • An identifier for the top level categories container.

String : getCompatibilityBasePathForNode( DzNode node )

Parameter(s):

  • node - The node to get compatibility base for.

Return Value:

  • A string version of the node's compatibility base, or an empty string if none exists.

String : getImportDirID()

Return Value:

  • An identifier for the top level import formats container.

String : getPoserDirID()

Return Value:

  • An identifier for the top level Poser formats container.

Array : getPoserVirtualDirID()

Return Value:

  • The identifier for the virtual folder container within the top level Poser formats container.

Since:

  • 4.9.2.68

String : getProductsID()

Return Value:

  • An identifier for the top level products container.

String : getRealPathCasing( String path, String search )

Parameter(s):

  • path - The path to the file/folder that real, on disk, casing is desired for
  • search - A file/folder in the path to get the on disk casing for

Return Value:

  • a string path/search combination or empty string if search is not in path

String : getRelativeProductMetafilePath( String store, String token, String title, String extension=“dsx” )

Parameter(s):

  • store - The store ID for the product.
  • token - The token for the product.
  • title - The title of the product.
  • extension - The extension of the meta file.

Return Value:

  • The relative metadata file path.

Since:

  • 4.9.4.31

Array : getSpecialPoserFolders()

Return Value:

  • A list of the folder names that are considered special, and thus handled in specific ways, in a Poser runtime.

String : getStudioDirID()

Return Value:

  • An identifier for the top level DAZ Studio formats container.

Array : getStudioExcludes()

Return Value:

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

Array : getStudioVirtualDirID()

Return Value:

  • The identifier for the virtual folder container within the top level DAZ Studio formats container.

Since:

  • 4.9.2.68

String : normalizePath( String type, Boolean relative=true )

Parameter(s):

  • type - The path/type to be normalized
  • relative - Whether or not this is a relative (or absolute) path

Return Value:

  • A string with a normalized path

DzError : saveUserDBData( String dirPath, String filePrefix )

Saves non-vendor data in the content database to the specified directory.

Parameter(s):

  • dirPath - The path of the directory to save the file(s) to
  • prefix - The leading portion of the filename

Return Value:

  • An error code representing the status of the operation.

Saves user owned metadata to an XML file (or a series of XML files).

Parameter(s):

  • dirPath - The path to save user metadata files in.
  • filePrefix - The prefix for the filename sequence.

void : setFileMetadata( String filepath, String contentType, String compatibleWith, String category, DzNode assetNode=undefined, String compatiblityBase=“” )

Sets the metadata associated with a file.

Parameter(s):

  • filepath - The path of the file to set the metadata on.
  • contentType - The content type to set.
  • compatibleWith - The compatibility base the asset is an add-on for.
  • category - The category to put the asset in.
  • assetNode - The node to get the compatibility base from if compatibleWith is empty
  • compatiblityBase - The compatibility base to set; for add-ons to target.

Since:

  • 4.9.0.17

Methods


Boolean : canStartAndStopCMS()

Return Value:

  • true if the currently connected Content Management Service (CMS) is of the type that can be started and stopped, otherwise false.

void : checkforNewMetadataScripts()

Checks for new metadata scripts within the RunOnce directories.


void : clearAllGroupIDs( Boolean notify=true )

Removes all groups from all assets.

Parameter(s):

  • notify - If true, causes product and category containers to update.

void : clearDBMetaFileQueue()

Clears the metadata queue.


Number : createCompatibilityBase( String base )

Creates a compatibility base.

Parameter(s):

  • base - The compatibility base to create.

Return Value:

  • The id used to identify base.

DzProductAssetContainer : createProduct( String name, String storeID=“”, String token=“” )

Creates a new product.

Parameter(s):

  • name - The name for the product.
  • storeID - The ID of the store for the product. If the store does not exist in the database or this arguement is empty (default), the LOCAL USER store will be used.
  • token - The token (i.e., SKU) used to identify the product in the store storeID.

Return Value:

  • The product named name, from store storeID, with the token token. If a product with the storeID and token already exists, a new product will not be created and the existing product will be returned instead.

Since:

  • 4.9.3.39

DzProductAssetContainer : createProductFromAssets( Array assets, String name=“” )

Creates a new product from container and its children.

Parameter(s):

  • assetList - The list of assets to create the product from.
  • name - The name for the product. If empty (default), the user will be prompted to provide a name.

Since:

  • 4.9.3.41

DzProductAssetContainer : createProductFromContainer( DzAbstractAssetContainer container, String name=“” )

Creates a new product from container and its children.

Parameter(s):

  • container - The asset container to create the product from.
  • name - The name for the product. If empty (default), the user will be prompted to provide a name.

Since:

  • 4.9.3.39

Boolean : createStore( String storeID, String token, String url )

Attempts to create a store in the database.

Parameter(s):

  • storeID - The identifier for the store.
  • token - The value used within url to be replaced by a product's token.
  • url - The URL for the store.

Return Value:

  • true if the store is successfully created, otherwise false.

Attention:

  • The “DAZ 3D” and “LOCAL USER” storeIDs are reserved. Attempting to create a store with either ID will fail immediately and return a value of false.

See Also:


Number : createType( String type, Boolean defaultLoad )

Creates a content type.

Parameter(s):

  • type - The content type to create.
  • defaultOpen - If true, assets that the type is assigned to will be opened by default; the contents of the scene will be cleared prior to loading the asset. If false, assets that the type is assigned to will be merged by default; the asset will be added to the existing scene.

Return Value:

  • The id used to identify type.

void : emitCategoryChanged( Array idPath )

Causes the category identified by idPath to update.

Parameter(s):

  • idPath - The id path of the category to update.

String : findAssetPathFromShortFilename( String fileName )

Parameter(s):

  • fileName - The short name of the file to find the asset path for.

Return Value:

  • If fileName can be found, the physical path of the asset on disk, otherwise an empty string.

Array : findAssetsForFile( String relativePath, Boolean userFacing, Boolean installed )

Parameter(s):

  • relativePath - The relative path of a file to find assets for.
  • userFacing - Whether or not the file is user-facing.
  • installed - Whether or not the file is installed.

Return Value:

  • A list of assets that relativePath refers to.

Since:

  • 4.9.2.69

Number : findAudienceID( String audience )

Return Value:

  • The id used to identify audience.

Number : findCompatibilityBaseID( String base, Boolean create=true )

Attempts to find a compatibility base, and potentially create it if it doesn't already exist.

Parameter(s):

  • base - The compatibility base to find (or create).
  • create - If true, the compatibility base is created if it cannot be found.

Return Value:

  • The id used to identify type.

DzProductAssetContainer : findProductByGuid( String guid )

Parameter(s):

  • guid - The Globally Unique Identifier (GUID) of the product to find.

Return Value:

  • The product with the globally unique identifier guid, otherwise NULL.

Since:

  • 4.9.2.69

DzProductAssetContainer : findProductByStoreToken( String storeID, String token )

Parameter(s):

  • storeID - The identifier of the store for the product.
  • token - The token (i.e., SKU) used to identify the product in the store storeID.

Return Value:

  • The product from store storeID with the token token, otherwise NULL.

Since:

  • 4.9.3.39

Array : findProductsByName( String name )

Parameter(s):

  • name - The name of the products to find.

Return Value:

  • A list of products (if any) that are named name.

Since:

  • 4.9.3.39

Array : findProductsForFile( String relativePath )

Parameter(s):

  • relativePath - The relative path of a file to find products that contain it.

Return Value:

  • A list of products that contain relativePath in their respective list of assets.

Since:

  • 4.8.1.73

Number : findTypeID( String type, Boolean create=false, Boolean defaultLoad=false )

Attempts to find the identifier used to identify a content type.

Parameter(s):

  • type - The content type to find.
  • create - If true, the content type is created if it cannot be found.
  • defaultOpen - If true, assets that the type is assigned to will be opened by default; the contents of the scene will be cleared prior to loading the asset. If false, assets that the type is assigned to will be merged by default; the asset will be added to the existing scene.

Return Value:

  • The id used to identify type.

String : getAudience( Number id )

Parameter(s):

  • id - The unsigned 32-bit integer used to identify the audience.

Return Value:

  • The audience identified by id.

Array : getAudiences()

Return Value:

  • The list of available audiences.

DzCategoryAssetContainer : getCategories()

Return Value:

  • A top-level container with child containers that match the hierarchy of categories in the content database.

String : getCategoryPath( Number categoryId )

Parameter(s):

  • categoryId - The 64-bit integer used to identify the category.

Return Value:

  • The full path of the category (if any), otherwise an empty string.

Since:

  • 4.9.3.11

Object : getCMSOptions()

Return Value:

  • A JSON object consisting of options for the currently connected Content Management Service (CMS)

String : getCompatibilityBase( Number id )

Parameter(s):

  • id - The unsigned 32-bit integer used to identify the compatibility base

Return Value:

  • The compatibility base identified by id.

DzTopLevelAssetContainer : getContentDirs()

Return Value:

  • A top-level container with all of the mapped native content directories.

String : getDatabaseDsn()

Return Value:

  • The Data Source Name (DSN) -i.e. “connection string”- for the PostgreSQL server if the server version is valid, otherwise an empty string.

Since:

  • 4.9.0.17

String : getDatabaseFilePath()

Return Value:

  • The path on disk where database files are located; for backup purposes.

Array : getDBMetaFileQueue()

Return Value:

  • A list of metadata files queued for processing.

String : getFirstCategory( String assetPath, String preferredCategory )

Parameter(s):

  • assetPath - The path of the asset to find the first category for.
  • preferredCategory - The path of the category preferred if it exists and the asset at assetPath is assigned to it.

Return Value:

  • The full path of the first category that the file at assetPath is assigned to.

Boolean : getGroupNewProductsAsNew()

Return Value:

  • true if new products should be assigned to the “New” group, otherwise false.

See Also:

Since:

  • 4.9.0.23

DzTopLevelAssetContainer : getImportDirs()

Return Value:

  • A top-level container with all of the mapped import content directories.

Number : getMaxFileSearchResultSize()

Return Value:

  • The maximum number of items returned by a file search.

Since:

  • 4.9.0.15

Number : getNumMaxItemsPerPage()

Return Value:

  • The maximum number of items to show per page.

DzTopLevelAssetContainer : getPoserDirs()

Return Value:


DzTopLevelAssetContainer : getProducts()

Return Value:

  • A top-level container with child containers for intermediate alpha-numeric organization of products by name. Each intermediate container then has its respective children for the products in the content database.

See Also:


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 and empty list

See Also:


Array : getRootCategoryStrings()

Return Value:

  • A list of root category paths.

Boolean : getShowHiddenVendorCategorization()

Return Value:

  • true if hidden vendor categorizations are shown, otherwise false.

Since:

  • 4.9.3.4

Array : getStoresIDs()

Return Value:

  • A list of store identifiers.

String : getStoreToken( String storeID )

Return Value:

  • The token used in the URL for the store with the given storeID, to be replaced by a product's token.

String : getStoreUrl( String storeID )

Return Value:

  • The URL for the store with the given storeID.

String : getType( Number id )

Parameter(s):

  • id - The unsigned 32-bit integer used to identify the content type.

Return Value:

  • The content type identified by id.

String : getTypeForContentFile( String fullPath )

Looks up the file in the content database to find its type.

Parameter(s):

  • fullPath - The file to get the type of.

Return Value:

  • The type of the source file if the file is in the content database, otherwise, an empty string.

String : getTypeForNode( DzNode node )

Checks the given node for a source file data item, looks up the item in the content database to find its type.

Parameter(s):

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

Return Value:

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

Array : getTypes()

Return Value:

  • A list of hierarchical, slash (“/”) delimited, content types

Boolean : haveDatabase()

Return Value:

  • true if the PostgreSQL server version is valid and the DSN is non-empty, otherwise false.

Since:

  • 4.9.0.17

See Also:


Array : importMetadataFiles( Array productRelativePaths, Boolean runSilent=false, Boolean markAsVendor=false )

Causes metadata files at absoluteProductPaths to be imported.

Parameter(s):

  • absoluteProductPaths - The list of absolute paths to import product metadata from.
  • runSilent - If true, the progress dialog will not be shown.
  • markAsVendor - If true, the data is considered vendor owned.

Boolean : isClothingType( String type )

Parameter(s):

  • type - The content type to test.

Return Value:

  • true if type is of the base type of Clothing.

Boolean : isConnectedToCMS()

Return Value:

  • true if the Content Management Service (CMS) is currently connected, otherwise false.

Boolean : isFigureType( String type )

Parameter(s):

  • type - The content type to test.

Return Value:

  • true if type is of the base type of Figure.

Boolean : isFollowingType( String type )

Parameter(s):

  • type - The content type to test.

Return Value:

  • true if type is of a following type.

Boolean : isHairType( String type )

Parameter(s):

  • type - The content type to test.

Return Value:

  • true if type is of the base type of Hair.

Boolean : isNeedsBaseFigureType( String type )

Parameter(s):

  • type - The content type to test.

Return Value:

  • true if type is of a type that needs a base figure.

Boolean : isPresetForFigureType( String type )

Parameter(s):

  • type - The content type to test.

Return Value:

  • true if type is a Preset for a Figure.

Boolean : isPresetType( String type )

Parameter(s):

  • type - The content type to test.

Return Value:

  • true if type is of the base type of Preset.

Boolean : isPropType( String type )

Parameter(s):

  • type - The content type to test.

Return Value:

  • true if type is of the base type of Prop.

Boolean : isReplaceableType( String type )

Parameter(s):

  • type - The content type to test.

Return Value:

  • true if type is of a replaceable type.

Boolean : isResettingDatabase()

Return Value:

  • true if the connected PostgreSQL database is currently being reset, otherwise false.

Since:

  • 4.9.0.17

Boolean : isSynchronizing()

Return Value:

  • true if the database is currently synchronizing, otherwise false.

4.9.3.71


void : markCategoriesChanged()

Signals that categories need to be updated.


void : markProductsChanged()

Signals that products need to be updated.


Array : processDBMetaFile( String productRelativePath, Boolean runSilent=false, Boolean markAsVendor=false, Boolean groupAsNew=true )

Causes the metadata file at productRelativePath to be processed and category containers to update.

Parameter(s):

  • productRelativePath - The relative product path to import metadata from.
  • runSilent - If true, the progress dialog will not be shown.
  • markAsVendor - If true, the data is considered vendor owned.
  • groupAsNew - If true, the product/assets are grouped as “New”.

Array : processDBMetaFileNoEmit( String productRelativePath, Boolean runSilent=false, Boolean markAsVendor=false, Boolean groupAsNew=true )

Causes the metadata file at productRelativePath to be processed, without causing category containers to update.

Parameter(s):

  • productRelativePath - The relative product path to import metadata from.
  • runSilent - If true, the progress dialog will not be shown.
  • markAsVendor - If true, the data is considered vendor owned.
  • groupAsNew - If true, the assets are grouped as “New”.

void : processDBMetaFileQueue()

If metadata files are queued, causes the metadata import dialog to be displayed and allows the user to select which products to process metadata for, then starts the import process on the selected products.


void : queueDBMetaFile( String productRelativePath )

Adds the file at productRelativePath to the metadata queue.


void : refreshCategoryRoots()

Causes the internal list of root categories to be rebuilt.


void : refreshStores()

Causes the internal list of stores to be rebuilt.


void : refreshTypes()

Causes the internal list of content types to be rebuilt


void : reimportDBMetaFiles()

Causes all *.dsx metadata files in the “./Runtime/Support” folder of each mapped native and Poser content directory to be queued, and then imported.


void : removeOrphanedAssetReferences( Array list )

Removes assets in list that have been orphaned (no longer exist) from the database.

Parameter(s):

  • list - The list of DzAsset to check whether the files still exist.

Since:

  • 4.9.0.17

Boolean : removeStore( String storeID )

Attempts to remove a store from the database.

Parameter(s):

  • storeID - The identifier for the store to remove.

Return Value:

  • true if the store is successfully removed, otherwise false.

Attention:

  • The “DAZ 3D” and “LOCAL USER” storeIDs are reserved. Attempting to remove a store with either ID will fail immediately and return a value of false.

Since:

  • 4.9.1.24

void : resetDatabase()

Triggers the connected PostgreSQL server to reset (delete) the current database and re-establish the default content types, compatibility bases, and categories.

Attention:

  • Stops all running searches and logs the current user out, if needed.

Since:

  • 4.9.0.17

void : scanFiles( SearchOption options, Boolean assignToGroup, Boolean addToCategory, Boolean onlyNewToCategory )

Performs a user-facing file scan, ultimately mapping any directories found to contain compatible content.

Parameter(s):

  • options - The SearchOption to use for filtering the file scan.
  • assignToGroup - If true, groups any found files as “New”.
  • addToCategory - If true, found files are assigned to the “Scan Results” category.
  • onlyNewToCategory - If true, only “new” files are assigned to the “Scan Results” category.

DzSearchContainer : searchFiles( String filename, SearchOption options )

Performs a user-facing file search on the mapped content directories.

Parameter(s):

  • filename - The name of the file to search for.
  • options - The SearchOption to use for filtering the results.

Return Value:

  • A container consisting of any files found during the search.

DzSearchContainer : searchForAssetAddOns( DzAsset asset, String filterText, Array categories, Number sorting )

Performs a user-facing asset search on the content database, where the results are confined to those that indicate they are compatible with the compatibility base of the specified asset.

Parameter(s):

  • asset - The context asset; the asset to find addons for.
  • filterText - The text to use for filtering the results.
  • categories - A list of category paths to use for filtering the results.
  • sorting - The sorting filter index to use for ordering the results.
    • 0 = None,
    • 1 = Name,
    • 2 = Date Purchased,
    • 3 = Date Installed,
    • 4 = Date Created,
    • 5 = Release Date,
    • 6 = Last Update,
    • 7 = Group ID,
    • 8 = Product ID (SKU),
    • For Descending add 0x80000000 to the value

Return Value:

  • A container consisting of any DzAsset instances found during the search.

Since:

  • 4.9.0.32

DzSearchContainer : searchForAssets( String filterText, Array categories, Array compatibilityBases, Array contentTypes, Number sorting )

Performs a user-facing asset search on the content database.

Parameter(s):

  • filterText - The text to use for filtering the results.
  • categories - A list of category paths to use for filtering the results.
  • compatibilityBases - A list of compatibility bases to use for filtering the results.
  • contentTypes - A list of content types to use for filtering the results.
  • sorting - The sorting filter index to use for ordering the results.
    • 0 = None,
    • 1 = Name,
    • 2 = Date Purchased,
    • 3 = Date Installed,
    • 4 = Date Created,
    • 5 = Release Date,
    • 6 = Last Update,
    • 7 = Group ID,
    • 8 = Product ID (SKU),
    • For Descending add 0x80000000 to the value

Return Value:

  • A container consisting of any DzAsset instances found during the search.

Since:

  • 4.9.0.32

DzSearchContainer : searchForAssetsByKeywords( String keywords, SearchOption options, Number sorting )

Performs a user-facing asset search on the content database.

Parameter(s):

  • keywords - The keywords to use for filtering the results.
  • options - The SearchOption to use for filtering the results.
  • sorting - The sorting filter index to use for ordering the results.
    • 0 = None,
    • 1 = Name,
    • 2 = Date Purchased,
    • 3 = Date Installed,
    • 4 = Date Created,
    • 5 = Release Date,
    • 6 = Last Update,
    • 7 = Group ID,
    • 8 = Product ID (SKU),
    • For Descending add 0x80000000 to the value

Return Value:

  • A container consisting of any DzAsset instances found during the search.

Since:

  • 4.9.0.32

DzSearchContainer : searchForAssetsInCategory( String categoryPath, Boolean userFacing=true, Boolean installed=true )

Parameter(s):

  • categoryPath - The full path of the category to search for assets.
  • userFacing - Whether or not to limit the search to user-facing assets. (since 4.9.3.56)
  • installed - Whether or not to limit the search to installed assets. (since 4.9.3.56)

Return Value:

  • A search container containing the assets matching the criteria specified.

Since:

  • 4.9.1.17

DzSearchContainer : searchForAssetTargets( DzAsset asset, String filterText, Array categories, Number sorting )

Performs a user-facing asset search on the content database, where the results are confined to those that indicate they are the compatibility base of the specified asset.

Parameter(s):

  • asset - The context asset; the asset to find targets for.
  • filterText - The text to use for filtering the results.
  • categories - A list of category paths to use for filtering the results.
  • sorting - The sorting filter index to use for ordering the results.
    • 0 = None,
    • 1 = Name,
    • 2 = Date Purchased,
    • 3 = Date Installed,
    • 4 = Date Created,
    • 5 = Release Date,
    • 6 = Last Update,
    • 7 = Group ID,
    • 8 = Product ID (SKU),
    • For Descending add 0x80000000 to the value

Return Value:

  • A container consisting of any DzAsset instances found during the search.

Since:

  • 4.9.0.32

DzSearchContainer : searchForProductAssets( DzProductAssetContainer product, String filterText, Array categories, Array compatibilityBases, Array contentTypes, Number sorting )

Performs a user-facing asset search on the content database, where the results are confined to a specified product.

Parameter(s):

  • product - The context product; the product to filter results by.
  • filterText - The text to use for filtering the results.
  • categories - A list of category paths to use for filtering the results.
  • compatibilityBases - A list of compatibility bases to use for filtering the results.
  • contentTypes - A list of content types to use for filtering the results.
  • sorting - The sorting filter index to use for ordering the results.
    • 0 = None,
    • 1 = Name,
    • 2 = Date Purchased,
    • 3 = Date Installed,
    • 4 = Date Created,
    • 5 = Release Date,
    • 6 = Last Update,
    • 7 = Group ID,
    • 8 = Product ID (SKU),
    • For Descending add 0x80000000 to the value

Return Value:

  • A container consisting of any DzAsset instances found during the search.

Since:

  • 4.9.0.32

DzProductHolderContainer : searchForProducts( String filterText, Array categories, Array compatibilityBases, Array contentTypes, Number installStateFlags, Number sorting )

Parameter(s):

  • filterText - The text to use for filtering the results.
  • categories - A list of category paths to use for filtering the results.
  • compatibilityBases - A list of compatibility bases to use for filtering the results.
  • contentTypes - A list of content types to use for filtering the results.
  • installStateFlags - The install state flags to use for filtering the results.
    • None = 0x0,
    • Installed = 0x1,
    • NotInstalled = 0x2,
    • Damaged = 0x4,
    • NeedsUpdate = 0x8,
    • Pending = 0x10,
    • Any = Installed | NotInstalled | Damaged | NeedsUpdate | Pending
  • sorting - The sorting filter index to use for ordering the results.
    • 0 = None,
    • 1 = Name,
    • 2 = Date Purchased,
    • 3 = Date Installed,
    • 4 = Date Created,
    • 5 = Release Date,
    • 6 = Last Update,
    • 7 = Group ID,
    • 8 = Product ID (SKU),
    • For Descending add 0x80000000 to the value

Return Value:

Since:

  • 4.9.0.32

void : setCMSOptions( String clusterDirectory, Number port )

Sets the options for the Content Management Service (CMS), if it is of the type that can accept options.

Parameter(s):

  • clusterDirectory - The path of the directory that contains the database files.
  • port - The port number to use for connecting to the database server.

void : setGroupNewProductsAsNew( Boolean onOff )

Parameter(s):

  • onOff - If true, new products will be assigned to the “New” group.

See Also:

Since:

  • 4.9.0.23

void : setMaxFileSearchResultSize( Number maxNum )

Parameter(s):

  • maxNum - The maximum number of items to return from a standard file search.

See Also:

  • getMaxFileSearchResultsSize()

Since:

  • 4.9.0.15

void : setMaxItemsPerPage( Number maxNum )

Parameter(s):

  • maxNum - The maximum number of items to show on a page in the content view

See Also:


void : setProductGroupIDs( Array guids, Number groupId, Boolean groupProduct=true, Boolean groupFiles=true )

Sets the group identifier on products and/or files, for a list of products.

Parameter(s):

  • guids - A list of guids for the products to set the group identifier on.
  • groupId - The group identifier to set.
  • groupProduct - If true, sets the group identifier on the product.
  • groupFiles - If true, sets the group identifier on the user-facing files in the product.

Since:

  • 4.9.0.25

void : setShowAssetToolTip( Boolean onOff )

Parameter(s):

  • onOff - Whether or not to show tool tips on assets.

See Also:


void : setShowExtensions( Boolean onOff )

Parameter(s):

  • onOff - Whether or not to show extensions on assets.

See Also:


void : setShowHiddenVendorCategorization( Boolean shown )

Sets whether or not hidden vendor categorizations are shown.

Parameter(s):

  • shown - If true, hidden vendor categorizations are shown.

Since:

  • 4.9.3.4

void : setShowLargeIcons( Boolean onOff )

Parameter(s):

  • onOff - Whether or not to show large icons.

See Also:


Boolean : showAssetToolTip()

Return Value:

  • true if showing asset tool tips, otherwise false.

See Also:


Boolean : showDatabaseEditor( DzAbstractAssetContainer assetContainer )

Causes the Content DB Editor to be displayed, allowing the user to view/edit metadata for products and/or assets all within a centralized dialog.

Parameter(s):

  • assetContainer - The asset container to load into the editor. If the asset container is a DzProductAssetContainer, the dialog will display two pages: one for the product specific data, and one for the asset specific data. If the asset container is any other type, only the page for the asset specific data is displayed.

Return Value:

  • true if the dialog is accepted, otherwise false.

Boolean : showExtensions()

Return Value:

  • true if showing asset file extensions, otherwise false.

See Also:


Boolean : showLargeIcons()

Return Value:

  • true if showing large asset icons, otherwise false.

See Also:


void : showMoreProductInfo( DzProductAssetContainer product )

Executes a script named after the store associated with product, in the ./resources/stores directory. A single anonymous JSON object is passed to the script, which can be retrieved using the global “getArguments()” function. The properties on the Object consist of values stored in the content database.

  • store_id - A String containing the identifier for the store product is associated with.
  • store_token - A String containing the token in store_url to be replaced by product_token.
  • store_url - A String containing the URL with more information about product.
  • product_token - A String containing the token (SKU) from product.
  • product_name - A String containing the name of product.
  • product_artists - An Array of String values containing the names of artists that contributed to product.
  • product_description - A String containing the description of product.
  • product_guid - A String containing the Globally Unique Identifier for product.
  • product_is_vendor - A Boolean indicating whether product is provided by a vendor or the user.
  • product_has_cloud_meta - A Boolean indicating whether product has metadata provided via the cloud (or manual/local).
  • product_is_cloud_owned - A Boolean indicating whether product is managed via the cloud (or manual/local).

Parameter(s):

  • product - The product to show more information for.

See Also:

Since:

  • 4.8.1.70

void : startCMS()

Starts the Content Management Service (CMS), if it is not already running.


void : stopAllSearches()

Stops all searches that were started by any of the search* methods on DzAssetMgr.


void : stopCMS( Number mode, Boolean wait, Number timeout=0 )

Stops the Content Management Service (CMS), if it is running and is of the type that can be stopped.

Parameter(s):

  • mode - The mode to use to stop the service;
    • 0 = Smart
    • 1 = Fast
    • 2 = Immediate
  • wait - Whether or not to wait for the CMS to stop before continuing.
  • timeout - The number of seconds to wait for the service to stop before continuing.

void : stopFileScan()

Stops any searches that were started by DzAssetMgr::scanFiles().


void : stopFileSearch()

Stops any searches that were started by DzAssetMgr::searchFiles().


void : stopSearchForAssetAddOns()

Stops any searches that were started by DzAssetMgr::searchForAssetAddOns().


void : stopSearchForAssets()

Stops any searches that were started by DzAssetMgr::searchForAssets(), DzAssetMgr::searchForAssetsByKeywords() or DzAssetMgr::searchForProductAssets().


void : stopSearchForAssetTargets()

Stops any searches that were started by DzAssetMgr::searchForAssetTargets().


void : stopSearchForProducts()

Stops any searches that were started by DzAssetMgr::searchForProducts().


void : updateCategoryContainers()

Triggers an update to asset containers within the Categories top-level container.

See Also:

Since:

  • 4.8.1.65

void : updateContentContainers()

Triggers an update to asset containers within the native formats top-level container.

See Also:

Since:

  • 4.8.1.65

void : updateFolderBasedContainers()

Triggers an update to asset containers within the folder based top-level containers.

See Also:

Since:

  • 4.8.1.65

void : updateImportContainers()

Triggers an update to asset containers within the other import formats top-level container.

See Also:

Since:

  • 4.8.1.65

void : updatePoserContainers()

Triggers an update to asset containers within the Poser formats top-level container.

See Also:

Since:

  • 4.8.1.65

void : updateProductContainers()

Triggers an update to asset containers within the Products top-level container.

See Also:


Boolean : vacuumDatabase()

Reclaims space in the database previously occupied by deleted or updated data.

Return Value:

  • true if the operation was successful, otherwise false.

Signals


void : basePathsChanged()

Signature:“basePathsChanged()”

Emitted when the base paths list has changed.


void : categoryUpdate( Array idPath )

Signature:“categoryUpdate(QVariantList)”

Emitted when a category has been changed.

Parameter(s):

  • idPath - The list of ids leading to the changed category.

void : cmsDSNChanged()

Signature:“cmsDSNChanged()”

Emitted when the Data Source Name (DSN) for the Content Management Service (CMS) has changed.


void : cmsStarted()

Signature:“cmsStarted()”

Emitted when the Content Management Service (CMS) has started.


void : cmsStopped()

Signature:“cmsStopped()”

Emitted when the Content Management Service (CMS) has stopped.


void : compatibilityBaseListChanged()

Signature:“compatibilityBaseListChanged()”

Emitted when the compatibility base list has changed.


void : containerUpdate( Array idPath )

Signature:“containerUpdate(QVariantList)”

Emitted when a container has been changed.

Parameter(s):

  • idPath - The list of ids leading to the changed container.

void : itemsPerPageChanged( Number newPerPage )

Signature:“itemsPerPageChanged(int)”

Emitted when itemsPerPage() will return a new value.

Parameter(s):

  • newPerPage - number of items to show per page.

void : maxFileSearchResultSizeChanged( Number maxFileSearchResultSize )

TODO: Add description.


void : productCreated( String guid )

Signature:“productCreated(const QString &)”

Emitted when a product has been created.

Parameter(s):

  • guid - The Globally Unique Identifier (GUID) for the created product.

void : showAssetToolTipChanged()

Signature:“showAssetToolTipChanged()”

Emitted when showAssetToolTipChanged() will return a new value.


void : showExtensionsChanged()

Signature:“showExtensionsChanged()”

Emitted when showExtensions() will return a new value.


void : showLargeIconsChanged()

Signature:“showLargeIconsChanged()”

Emitted when showLargeIcons() will return a new value.


void : storeListChanged()

Signature:“storeListChanged()”

Emitted when the store list has changed.


void : typeListChanged()

Signature:“typeListChanged()”

Emitted when the type list is changed


void : uiAboutToSearch( QObject sender, String text, Array categories, Array compatibilityBases, Array contentTypes )

TODO: Add description.