Searching/Finding Folder Names in Content Library Pane
Hi,
so im new to this Daz land but been using Poser for a while. The one good thing about it was a decent Content manager, but they ruined that in Poser 11 so on to new shores i thought. And new and uncharted they are ....
So most of my stuff (and stuff in general i guess because i did not change a lot) in a Poser content library is sorted in Folders like
- "Nice Hair"
- "Color1"
- "Color2"
- ...
So what happend after i searched for "Nice Hair" in "Poses" .... nothing. I dont know why Daz does not like folder names but i could not figure out a decent way to get my stuff. Short of creating a whole lot of Products and Categories. Dont get me wrong those are fine but i have a lot stuff already and dont want to write Product describtions for stuff i did not make and dont know when i will need it.
But i'm a programmer so when i see a problem i write a program to solve it ... yes even if it takes longer than doing it by hand!
Given the nice scripting IDE in 4.8 it and the discovery of searchable Metadata it was a lot easier then i thought.
// DAZ Studio version 4.8.0.59 filetype DAZ Scriptfunction tagAssetsRec(start){ var assets = start.getAssets(); var asset,meta; for( var i = 0; i < assets.length; i += 1 ){ // Get the 'current' asset asset = assets[ i ]; // Get the metadata for the asset meta = asset.getMetadata(); if( meta.userKeywords != start.getContainerName()){ // Mark the item as 'new'ly changed meta.newItem = true; meta.userKeywords = start.getContainerName(); // Propagate the change meta.update(); } } var containers = start.getChildContainers(); var container; for( var i = 0; i < containers.length; i+=1){ container = containers[i]; print(container.getContainerName()); tagAssetsRec(container); }}// Get the pane managervar oPaneMgr = MainWindow.getPaneMgr();// Find the content library panevar oPane = oPaneMgr.findPane( "DzContentLibraryPane" );// If the pane was foundif( oPane ){ // Get the selected container var oContainer = oPane.getSelectedContainer(); // Recursivly add folder name to User Keywords tagAssetsRec(oContainer); // Force a redraw of the assets oPane.updateContainer( oContainer.getIDPath() );}This script will recursivly Add the folder name a item is in to the "user keywords" metadata field. And make it searchable and even autocompletable in the Content Lib.
Just select a FOLDER in the Content Lib (e.g. Poser Formats->Poser 2014->Poses) and execute the script, from the IDE or make a custom action. Give it a few seconds/minutes depending on the amount of stuff. Now searching for "Nice Hair" brings up "Color1" and "Color2"!
As i mentioned im new and maybe this is totaly silly or there is a better way, if so plz enlighten me. I just thought i leave this here because searching for a solution just turned up "it's not possible" stuff from this forum and now maybe someone will be more lucky than me.
