<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>technical architecture. &#187; asset management</title>
	<atom:link href="http://buchhofer.com/tag/asset-management/feed/" rel="self" type="application/rss+xml" />
	<link>http://buchhofer.com</link>
	<description>Maxscript, Architecture, 3D, 3DSMax, Unity3D</description>
	<lastBuildDate>Sat, 14 Jan 2012 14:12:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Recursive file size listing output to excel</title>
		<link>http://buchhofer.com/2009/12/recursive-file-size-listing-output-to-excel/</link>
		<comments>http://buchhofer.com/2009/12/recursive-file-size-listing-output-to-excel/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 19:18:23 +0000</pubDate>
		<dc:creator>Dave Buchhofer</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Batching]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[vbscript]]></category>
		<category><![CDATA[asset management]]></category>
		<category><![CDATA[Gallery]]></category>
		<category><![CDATA[utility]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://buchhofer.com/?p=226</guid>
		<description><![CDATA[Today I had to find all JPG files over a certain size in a large directory tree of a few thousand images, to find some poorly compressed jpg&#8217;s, fix the compression, and replace them on a website. Todays cavaet, the CMS is pretty weak and only lets you update 1 image at a time, so [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to find all JPG files over a certain size in a large directory tree of a few thousand images, to find some poorly compressed jpg&#8217;s, fix the compression, and replace them on a website. Todays cavaet, the CMS is pretty weak and only lets you update 1 image at a time, so you can&#8217;t just blindly resave everything and reupload, todays Second cavaet, I dont have server level access to said website, so all the normal automated ways are out of luck.</p>
<p>joy.</p>
<p>So I found a little <a href="http://www.tek-tips.com/faqs.cfm?fid=6716">snip of code</a> online, and threw a pretty simple hack job together to narrow the scope some. (PS: If you do end up doing any vbscript, I&#8217;d suggest <a href="http://www.vbsedit.com/">VbsEdit </a> for an IDE) </p>
<p>Anyway! the code:</p>
<p>It searches through a directory tree of your choosing<br />
for any file matching the filetype: &#8220;jpg&#8221;<br />
that is above a size threshold: fileSizeThreshold (In this case, 2kb.. so essentially everything)<br />
and outputs it into an excell sheet with full path and size information<br />
so that you can easily Sort, Filter, Delegate, or use as data for further automating!</p>

<div class="wp_syntax"><div class="code"><pre class="vbscript" style="font-family:monospace;">' // **************************************
' //    ComputerHighGuys recursive search
' //     
' //    Date Created: 20 Aug 07
' //	http://www.tek-tips.com/faqs.cfm?fid=6716
' //
' //	Adjusted to a jpg file search and 
' //	added excel output for easy sorting/filtering
' //	
' // **************************************
&nbsp;
' // If we'd like to save the output into an excel sheet
WriteExcel = &quot;True&quot;
&nbsp;
Dim objexcel
excelRow=2
&nbsp;
' // value the filesize needs to exceed to be visible in the output
fileSizeThreshold=2
&nbsp;
If WriteExcel = &quot;True&quot; Then
	' // Create the Excel sheet to drop the information into
	Set objExcel = createobject(&quot;Excel.application&quot;)   
	objexcel.Workbooks.add
	objexcel.Cells(1, 1).Value = &quot;Folder Name&quot;
	objexcel.Cells(1, 2).Value = &quot;Filename&quot;
	objexcel.Cells(1, 3).Value = &quot;Filesize&quot;
	objexcel.Cells(1, 4).Value = &quot;Filesize Unit&quot;
	objexcel.Visible = True
	Wscript.Sleep 300
End If
&nbsp;
' // Directory to search
searchDir = &quot;C:\&quot;
&nbsp;
set objFSO=CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set objFolder = objFSO.GetFolder(searchDir)
Set colFiles = objFolder.Files
&nbsp;
' // Launch the function
ScanSubFolders(objFolder)
&nbsp;
' // recursive function that will search through all subfolders for a specified
' // filetype and output some information about the files to an Excel Sheel
Sub scanSubFolders(objFolder)
	' // Grab sub folders    
    Set colFolders = objFolder.SubFolders
&nbsp;
    For Each objSubFolder In colFolders
&nbsp;
    	' // the files to search
        Set colFiles = objSubFolder.Files
        For Each objFile in colFiles
&nbsp;
            ' // the extension of the filetype to search for  
            If lcase(Right(objFile.Name,3)) = &quot;jpg&quot; Then
&nbsp;
                ' // Getting File size in KB
                If round(objFile.Size/1024,1) &gt; fileSizeThreshold Then
&nbsp;
                	' // echo the files to the console
                	WScript.Echo objSubFolder.Path &amp; &quot;  &quot; &amp; objFile.Name &amp; &quot;  &quot; &amp; round(objFile.Size/1024,1)  &amp; &quot;KB&quot;
&nbsp;
					' // write various shit to excel~                    
                    If WriteExcel = &quot;True&quot; then
                        wscript.Echo objSubFolder.Path &amp; &quot;  &quot; &amp; objFile.Name &amp; &quot;  &quot; &amp; round(objFile.Size/1024,1)  &amp; &quot;KB&quot;
                    	objexcel.Cells(excelRow, 1).Value = objSubFolder.Path
    					objexcel.Cells(excelRow, 2).Value = objFile.Name
    					objexcel.Cells(excelRow, 3).Value =  round(objFile.Size/1024,1)
    					objexcel.Cells(excelRow, 4).Value =  &quot;KB&quot; 
    					excelRow=excelRow+1    
                    End If
                End if    
            End If
        Next
        ScanSubFolders(objSubFolder)
    Next
End Sub</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://buchhofer.com/2009/12/recursive-file-size-listing-output-to-excel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>working :)</title>
		<link>http://buchhofer.com/2008/10/working/</link>
		<comments>http://buchhofer.com/2008/10/working/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 14:19:34 +0000</pubDate>
		<dc:creator>Dave Buchhofer</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[utility]]></category>
		<category><![CDATA[asset management]]></category>

		<guid isPermaLink="false">http://buchhofer.com/?p=72</guid>
		<description><![CDATA[yay, all the right clickies work.]]></description>
			<content:encoded><![CDATA[<p><a href="http://buchhofer.com/wp-content/uploads/2008/10/pyassetbrowser1.jpg"><img class="alignnone size-medium wp-image-76" title="pyassetbrowser1" src="http://buchhofer.com/wp-content/uploads/2008/10/pyassetbrowser1-300x147.jpg" alt="" width="300" height="147" /></a></p>
<p>yay, all the right clickies work.</p>
]]></content:encoded>
			<wfw:commentRss>http://buchhofer.com/2008/10/working/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Diving into Python.</title>
		<link>http://buchhofer.com/2008/09/diving-into-python/</link>
		<comments>http://buchhofer.com/2008/09/diving-into-python/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 02:38:50 +0000</pubDate>
		<dc:creator>Dave Buchhofer</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[asset management]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[thumbnails]]></category>

		<guid isPermaLink="false">http://buchhofer.com/?p=65</guid>
		<description><![CDATA[So I got a few hours over this last week to start poking my nose into this Python thing that everyone seems so up in arms about. And I must say, its pretty damn neat so far! from a suggestion on the tech-artists.org forum I took a look into the Wing IDE to help get [...]]]></description>
			<content:encoded><![CDATA[<p>So I got a few hours over this last week to start poking my nose into this Python thing that everyone seems so up in arms about. And I must say, its pretty damn neat so far!</p>
<p>from a suggestion on the <a href="http://tech-artists.org/">tech-artists.org</a> forum I took a look into the <a href="https://wingware.com/">Wing IDE</a> to help get started and its very very nice. its a bit pricey however, so I&#8217;m going to poke through a couple different IDE&#8217;s after my trial expires and see what all the fuss is about all around.</p>
<p>So! I decided a good thing to do would be to go for a speedier version of my asset browser maxscript, as in maxscript it takes ~20 seconds to parse through a fair sized directory structure, and I had to build my own caching mechanisms and data structures to even speed that up to 5seconds at startup. Another problem was the generation of the dynamic webpage when you change directory views could take up a few seconds each click also. all this to essentially pass a filename to max? Pssh!</p>
<p>Well, I&#8217;ve got a start going in python by using a slight modification of the <a href="http://wiki.wxpython.org/TreeControls#head-21017a515ed8a07d3b528f4ef75be5d4bda1fdaa">Lazy Evaluation Directory Treeview</a> sample found on the <a href="http://wiki.wxpython.org/FrontPage">wxPyWiki</a>. combined with the <a href="http://xoomer.alice.it/infinity77/main/freeware.html#thumbnailctrl">ThumbnailCtrl </a>from <a href="http://xoomer.alice.it/infinity77/index.html">Andrea Gavana</a>. And its <strong>blazing fast</strong> in terms of thumbnail generation from even very large images and directory structures.!</p>
<p>combine those with the fun <a href="http://www.volition-inc.com/gdc">examples of using the COM classes</a> to talk to max from Adam, and lets see how this turns out!</p>
<div class="wp-caption alignnone" style="width: 710px"><a href="http://buchhofer.com/wp-content/uploads/2008/09/pyassetbrowser.jpg"><img title="pyAssetBrowser.py" src="http://buchhofer.com/wp-content/uploads/2008/09/pyassetbrowser.jpg" alt="pyAssetBrowser.py" width="700" height="614" /></a><p class="wp-caption-text">pyAssetBrowser.py</p></div>
<p>Not bad for a night.. Now to finish it off and connect it to max.. someday when i get more free time <img src='http://buchhofer.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://buchhofer.com/2008/09/diving-into-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maxscript: So Many Assets, so little cataloging.</title>
		<link>http://buchhofer.com/2008/08/maxscript-so-many-assets-so-little-cataloging/</link>
		<comments>http://buchhofer.com/2008/08/maxscript-so-many-assets-so-little-cataloging/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 21:59:16 +0000</pubDate>
		<dc:creator>Dave Buchhofer</dc:creator>
				<category><![CDATA[maxscript]]></category>
		<category><![CDATA[asset management]]></category>

		<guid isPermaLink="false">http://buchhofer.com/?p=47</guid>
		<description><![CDATA[So, today I took up the fun job of building some sort of asset management tool. so obviously the first thing is to figure out what kind of assets you have so that you can sort them! now we&#8217;ve collected many many models over the years, from useful, to complete shite. so the not so [...]]]></description>
			<content:encoded><![CDATA[<p>So, today I took up the fun job of building some sort of asset management tool. so obviously the first thing is to figure out what kind of assets you have so that you can sort them! now we&#8217;ve collected many many models over the years, from useful, to complete shite. so the not so fun part becomes to sort through all of these we need to see what they are obviously!</p>
<p>so using <a href="http://paulneale.com/">Paul&#8217;s</a> excellent batching script &#8216;<a href="http://paulneale.com/scripts/batchItMax/batchItMax.htm">Batch it Max</a>&#8216;</p>
<p>combined with a little <a href="http://www.buchhofer.com/upload/files/Scripts/render_thumbnail.ms">Thumbnail rendering script</a> i cooked up that will render an Isometric view of the maxfile&#8217;s contents, ignore all scene lights, and render with a basic skylight, include a polycount on the render. there are also options in the script whether to use a default skylight lighting scheme, or whether to render the scene using an Ambient Occlusion override material</p>
<p>I made the thumbnail script based partially off of <a href="http://plugins.angstraum.at/">Marc Lorenz&#8217;s</a> (also useful) <a href="http://plugins.angstraum.at/vrayao/index.htm">Ambient Occlusion</a> script.</p>
<p>So. the computer behind me is happily cataloging our whole mess.</p>
<p>I wonder if it&#8217;ll be done by morning? <img src='http://buchhofer.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://buchhofer.com/2008/08/maxscript-so-many-assets-so-little-cataloging/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

