Update selected assets metadata
loueteliot
Posts: 0
Hello,
I would like to update the metadata of all selected data with a script but it don't work...
Here is my actual script :
// DAZ Studio version 4.10.0.123 filetype DAZ Scriptvar oPaneMgr = MainWindow.getPaneMgr();var oPane = oPaneMgr.findPane("DzContentLibraryPane");var oAssetMgr = App.getAssetMgr(); if( oPane ){ var aAssets = oPane.getSelectedAssets(); var sAbsFilePath; var oAsset, oFileInfo; for( var i = 0; i < aAssets.length; i += 1 ){ oAsset = aAssets[ i ]; sAbsFilePath = oAsset.getAsLocalFile(); var sContentType = oAsset.contentType; sContentType = "Actor"; var sCategory = oAsset.categories.join(" "); oAssetMgr.setFileMetadata( sAbsFilePath, sContentType, "", sCategory, undefined, "" ); }}
Nothing happens no error code or anything, do you know what i'm doing wrong ? Thanks for your help.
Comments
Have you checked the length of aAssets (added a print( aAssets.length ) line before the loop? Why are you setting sContentType twice?