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

Set Content Library Container help

$
0
0

I tried this script a year ago and gave up in frustration. But in my current project, I have to continually drill down into a Poser folder to get stuff.

http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/specific_ui/set_content_library_container/start?do=export_code&codeblock=1

Here's what baffles me. I *think* this is the section I need to change, but have no idea how.

// Set the base to the first mapped Poser formats directory
			var sBase = String("%1/Runtime/Libraries").arg( oContentMgr.getPoserDirectoryPath( 0 ) );
 
			// Set the first value to the id of the top-level container,
			// set the second value to the base path within that container
			var aIdPath = [ oAssetMgr.getPoserDirID(), sBase ];
			// Split the relative path into its individual parts
			var aRelativeParts = sPath.split( "/" );
			// Iterate over each part in the relative path,
			for( var i = 0; i < aRelativeParts.length; i += 1 ){
				// Push the full path of the "current" part onto the id path array
				aIdPath.push( String("%1/%2")
					.arg( sBase )
					.arg( aRelativeParts.slice(0, i + 1).join( "/" ) ) );

 

var aIdPath = [ oAssetMgr.getPoserDirID(), sBase to what?

and

var aRelativeParts = sPath.split( "/" ); to what?

Can anyone help out here? I'd certainly appreciate it.

I'd appreciate it even more if we could just right-click a folder and choose 'Add to Favorites' but my feature request for that went nowhere.


Viewing all articles
Browse latest Browse all 1067

Trending Articles



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