An abstraction between the presentation of a content file and the file on disk.
Inherits :
Inherited By : DzNotInstalledProductAsset
DAZ Script | |
---|---|
void | addCompatibilities ( Array bases, Boolean create=false ) |
void | addToCategories ( Array categories, Boolean create=false ) |
void | clearGroup () |
void | forceImageReload () |
String | getAsLocalFile () |
String | getBaseExtension () |
String | getDSLinkExtension () |
String | getDSLinkText () |
DzAbstractAssetContainer | getOwner () |
DzProductAssetContainer | getProduct () |
String | getRelativeFilePath () |
Boolean | isGroup ( Number id ) |
Boolean | loadDefaultIcon ( Boolean delayLoad ) |
Object | readLinkData ( String linkPath ) |
void | removeCompatibilities ( Array bases, Boolean isVender=false ) |
void | removeFromCategories ( Array categories, Boolean isVender=false ) |
Boolean | rename ( String name ) |
Boolean | saveDSLink ( String linkSavePath ) |
void | setIgnoreExists ( Boolean onOff ) |
DzUri | toUri () |
Boolean | updateFromMetadata ( String guid=“” ) |
void | assetImageChanged ( DzAsset asset ) |
An “Asset” serves as an abstraction between the presentation of a content file and the actual file that resides on disk; it is a “container” for information about a content file.
At a minimum, an asset contains a reference to the relative path and filename of a file.
Metadata
When the Content Management System (CMS) is active, an asset provides an interface to its metadata within the content database. This metadata includes information such as what type of asset it is, what it is used for, what it is compatible with, which category(ies) it is presented to the user in, etc.
Conceptually, each asset belongs to exactly one “Product”. By default, and until/unless modified, all newly created assets are assigned to the “LOCAL USER” product. An asset is uniquely identified within a product by the combination of its relative path and filename. While any number of products can reference a file with the same relative path and filename combination, each product's concept of that combination is unique (even if their metadata is identical).
The metadata for a given asset is divided into 2 distinct types; that which is owned and/or maintained by the vendor (the originating source), and that which is owned and/or maintained by the end-user. Unless the metadata component (e.g., userKeywords, userNotes, etc), the product (e.g., “LOCAL USER”), or the store (e.g., “LOCAL USER”) indicate “user” in their name, any assumption (if there is to be one) about which type the data is should be that which is owned and/or maintained by the vendor.
The metadata for an asset that is “installed” and which belongs to a product associated with a “Store” (source) other than the “LOCAL USER” store is owned by the vendor. Conversely, the metadata for an asset that is created by the user and/or belongs to a product associated with the “LOCAL USER” store is owned by the user. The exceptions to this are those attributes which integrate “user” into their name; which in fact always belong to the user.
The significance of the distinction between the 2 types of metadata comes down to how the data is handled during an update and whether or not an effort is made to preserve it. Metadata that is owned and/or maintained by the vendor can be summarily purged during an update. This provides a vendor with the means to clean up all potential prior versions of the metadata without being faced with complex bookkeeping tasks.
See Also:
Holds the asset identifier for this asset. (Read Only)
Holds the name for this asset. (Read Only)
Holds the vendor intended audience for this asset.
Since:
Holds a list of all categories that this asset is in. (Read Only)
Since:
Holds whether the companion file (if any) is a DAZ Script. (Read Only)
Holds the full path to the folder the companion file is in. (Read Only)
Holds a list of all compatibility bases that this asset is compatible with. (Read Only)
Since:
Holds the [vendor] compatibility base for this asset.
Since:
Holds the [vendor] content type for this asset.
Since:
Holds the date this asset was created. (Read Only)
Since:
Holds the date this asset was last modified. (Read Only)
Since:
Holds the vendor description for this asset.
Since:
Holds the name displayed to the user for this asset. (Read Only)
Since:
Holds the group identifier for this asset. 0 = default, < 0 = app defined, > 0 = user defined.
Since:
Holds whether this asset has metadata provided by the cloud. (Read Only)
Since:
Return Value:
true
if metadata for this asset came from the cloud, otherwise false
.Since:
Holds whether this asset is a non-native file and a DAZ Script or native file with the same basename exists in the same directory. (Read Only)
Holds whether this asset is a non-native file and a DAZ Script with the same basename exists in the same directory. (Read Only)
Holds whether this asset should be hidden in asset views.
Since:
Holds the icon path for this asset. (Read Only)
Holds whether this asset can be installed from the cloud. (Read Only)
Since:
Holds whether this asset is installed from the cloud. (Read Only)
Since:
Holds whether this asset is managed by the cloud. (Read Only)
Since:
Return Value:
true
if this asset is installed by the cloud, otherwise false
.Since:
Holds whether this asset is installed in the database. (Read Only)
Since:
Holds whether the metadata for this asset is valid. (Read Only)
Since:
Return Value:
true
if the metadata is valid, otherwise false
.Since:
Holds whether this asset is a native file. (Read Only)
Holds whether this asset is a native script file. (Read Only)
Holds whether this asset is a symbolic link. (Read Only)
Return Value:
true
if this asset is a symbolic link, otherwisefalse
.Holds whether this asset is owned by a vendor or by the user. (Read Only)
Since:
Holds whether this asset needs to be installed from the cloud. (Read Only)
Since:
Holds whether this asset needs to be updated from the cloud. (Read Only)
Since:
Return Value:
true
if this asset has an update available from the cloud, otherwise false
.Since:
Holds the user notes for this asset.
Since:
Holds the original filename for this asset. (Read Only)
Since:
Holds the original path for this asset. (Read Only)
Since:
Holds the Globally Unique Identifier (GUID) for the product this asset belongs to. (Read Only)
Since:
Holds the product identifier for the product that this asset belongs to. (Read Only)
Since:
Holds the name of the product this asset belongs to. (Read Only)
Since:
Holds the base of the product path in the cloud folder for cloud assets. (Read Only)
Since:
Holds the icon path for this asset. (Read Only)
Holds the store identifier for the product that this asset belongs to. (Read Only)
Since:
Holds the path that the symbolic link is referencing (if any).
Holds the URL for this asset. (Read Only)
Holds the encoded URL for this asset. (Read Only)
Holds a list of user owned categories that this asset is in. (Read Only)
Since:
Holds a list of user owned compatibility bases that this asset is compatible with. (Read Only)
Since:
Holds the user keywords for this asset.
Since:
Holds a list of vendor owned categories that this asset is in. (Read Only)
Since:
Holds a list of vendor owned compatibility bases that this asset is compatible with. (Read Only)
Since:
Holds the vendor keywords for this asset.
Since:
void : addCompatibilities( Array bases, Boolean create=false )
Sets the compatibility bases that this asset is compatible with.
Parameter(s):
true
, creates compatibility bases that do not exist. If false
, compatibility will only be established for compatibility bases that already exist.Since:
void : addToCategories( Array categories, Boolean create=false )
Sets the categories for this asset.
Parameter(s):
true
, creates categories that do not exist. If false
, only categories that already exist will be assigned.Since:
void : clearGroup()
Sets this asset as belonging to the default group identifier; 0.
Since:
void : forceImageReload()
Forces the icon for this asset to reload.
String : getAsLocalFile()
Return Value:
Return Value:
Return Value:
Since:
String : getDSLinkText()
Return Value:
Since:
DzAbstractAssetContainer : getOwner()
Return Value:
See Also:
DzProductAssetContainer : getProduct()
Return Value:
See Also:
Since:
String : getRelativeFilePath()
Return Value:
Boolean : isGroup( Number id )
Return Value:
true
if this asset is a member of group
, otherwise false
.Attention:
Since:
Boolean : loadDefaultIcon( Boolean delayLoad )
Loads the default icon for this asset.
Parameter(s):
true
, loading of the icon is delayed.Return Value:
true
if the default icon for this asset is successfully loaded, otherwise false
.Object : readLinkData( String linkPath )
Parameter(s):
Return Value:
Since:
void : removeCompatibilities( Array bases, Boolean isVender=false )
Removes the compatibility bases that this asset is compatible with.
Parameter(s):
true
, the compatibilities being looked up are owned by the vendor.Since:
void : removeFromCategories( Array categories, Boolean isVender=false )
Removes this asset from the categories.
Parameter(s):
true
, the categories being looked up are owned by the vendor.Since:
Boolean : rename( String name )
Changes the name of this asset.
Parameter(s):
Return Value:
true
if the operation is successful, otherwise false
.Boolean : saveDSLink( String linkSavePath )
Parameter(s):
Return Value:
true
if a DAZ Studio file link to this asset is saved, otherwise false
.Attention:
Since:
void : setIgnoreExists( Boolean onOff )
Sets whether existence of this asset should be ignored.
Return Value:
Since:
Boolean : updateFromMetadata( String guid=“” )
Parameter(s):
Return Value:
true
if this asset is updated, otherwise false
.Since:
void : assetImageChanged( DzAsset asset )
Signature:“assetImageChanged(DzAsset*)”
Emitted when the image for this asset has changed.
Parameter(s):