Quantcast
Channel: Daz Script Developer Discussion - Daz 3D Forums
Viewing all articles
Browse latest Browse all 1036

Update selected assets metadata

$
0
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 Script

var 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.


Viewing all articles
Browse latest Browse all 1036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>