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

Favorites script for 2nd Poser install

$
0
0

I want to set some favorite folders using Rob's script

http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/specific_ui/set_content_library_container/start

I already have them for my DS install and the 1st Poser install, but I can't get a 2nd Poser install path to work.

The relevant section seems to be

// Set the base to the first mapped Poser formats directory
			var sBase = String("%1/%2")
						.arg( oContentMgr.getPoserDirectoryPath( 0 ) )
						.arg( sIntermediate );
 
			// 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( "/" ) ) );
			}

and I've tried all sorts of changes, but it still won't work. I'm pretty sure

.arg( oContentMgr.getPoserDirectoryPath( 0 ) )

should be

.arg( oContentMgr.getPoserDirectoryPath( 1 ) )

but I've also tried

.arg( oContentMgr.getPoserDirectoryPath( 2 ) )

As for the rest, I'm not sure. This baffles me

// Set the first value to the id of the top-level container,
			// set the second value to the base path within that container

because I don't know what values it refers to. No doubt the comments make sense to anyone who knows scripting, but not me.

In my Content Directory Manager, there are 2 entries under Poser Formats. The 1st one works with this script, but when I try to get the 2nd one, it just keeps opening a folder in the 1st install (Yes, there are 2 identically named folders, one in each install)

Any ideas?


Viewing all articles
Browse latest Browse all 1036

Trending Articles



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