#include <asset_keyword.h>
KeywordAssetInterface extends the AssetInterface to deal with keyword assets. 
 
◆ MAXON_INTERFACE()
◆ Create()
◆ AddKeyword()
  
  
      
        
          | static MAXON_METHOD Result<Bool> AddKeyword  | 
          ( | 
          const AssetDescription &  | 
          target,  | 
         
        
           | 
           | 
          const Id &  | 
          keywordId,  | 
         
        
           | 
           | 
          Bool  | 
          userScope,  | 
         
        
           | 
           | 
          const AssetRepositoryRef &  | 
          updateUsageRepository  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
AddKeyword adds a keyword to an asset. 
- Parameters
 - 
  
    | [in] | target | Asset to add keywords.  | 
    | [in] | keywordId | Keyword Id to add.  | 
    | [in] | userScope | True to use ASSETMETADATA::UserKeywords other wise ASSETMETADATA::Keywords.  | 
    | [in] | updateUsageRepository | True to update the last used time and use count.  | 
  
   
- Returns
 - True if a keyword was added. False if the keyword was not added - that means it already exists. Error if it was not possible to add the keyword. 
 
 
 
◆ RemoveKeyword()
RemoveKeyword removes a keyword from an asset. 
- Parameters
 - 
  
    | [in] | target | Asset to remove keywords.  | 
    | [in] | keywordId | Keyword Id to remove.  | 
    | [in] | userScope | True to use ASSETMETADATA::UserKeywords other wise ASSETMETADATA::Keywords.  | 
  
   
- Returns
 - True if a keyword was found and removed. False if the keyword was not found on the asset. Error if it was not possible to remove the keyword. 
 
 
 
◆ HasKeyword()
HasKeyword returns if the asset has a given keyword assigned 
- Parameters
 - 
  
    | [in] | target | Asset to search.  | 
    | [in] | keywordId | Keyword Id to search.  | 
  
   
- Returns
 - userScope type on success ASSETMETADATA::UserKeywords or ASSETMETADATA::Keywords. Id() if not found. 
 
 
 
◆ IsFavouriteAsset()
IsFavouriteAsset returns true if the given asset is a favourite. 
- Parameters
 - 
  
  
 
- Returns
 - True if favourite. 
 
 
 
◆ GetDefaultAssetState()
GetDefaultAssetState checks if the given asset is a preset. 
- Parameters
 - 
  
  
 
- Returns
 - Tuple<Bool, Bool> on success. First: true if it is an preset, Second: True if the asset is the default asset. 
 
 
 
◆ GetDefaultAsset()
  
  
      
        
          | static MAXON_METHOD Result<AssetDescription> GetDefaultAsset  | 
          ( | 
          const Id &  | 
          type,  | 
         
        
           | 
           | 
          const AssetRepositoryRef &  | 
          lookupRepository  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
GetDefaultAsset returns the default preset for the given type. 
- Parameters
 - 
  
    | [in] | type | Preset type.  | 
    | [in] | lookupRepository | Repository to search for.  | 
  
   
- Returns
 - AssetDescription on success. 
 
 
 
◆ SetDefaultAsset()
SetDefaultAsset sets the default state of the given preset asset. Every type can only have one preset as default. 
- Parameters
 - 
  
    | [in] | ad | Asset to modify.  | 
    | [in] | on | True to make this preset the default. False to make it no longer the default.  | 
  
   
- Returns
 - OK on success.