<?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>sjt</title>
	<atom:link href="http://sjt.is/feed/" rel="self" type="application/rss+xml" />
	<link>http://sjt.is</link>
	<description>[insert clever tagline here]</description>
	<lastBuildDate>Tue, 08 May 2012 23:38:33 +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>coral</title>
		<link>http://sjt.is/2012/05/08/coral/</link>
		<comments>http://sjt.is/2012/05/08/coral/#comments</comments>
		<pubDate>Tue, 08 May 2012 23:38:33 +0000</pubDate>
		<dc:creator>sjt</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[coral]]></category>

		<guid isPermaLink="false">http://sjt.is/?p=368</guid>
		<description><![CDATA[I have recently been looking at a quite cool program called coral. I recommend you take a look at it. Anyway I&#8217;ve put on github a repository of a possibly useful plugin (it&#8217;s the same plugin only one is in python and the other one is a compiled one) that can read pc2 caches. *NOTE* [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently been looking at a quite cool program called <a href="http://code.google.com/p/coral-repo/" title="coral">coral</a>. I recommend you take a look at it. Anyway I&#8217;ve put on github a repository of a possibly useful plugin (it&#8217;s the same plugin only one is in python and the other one is a compiled one) that can read pc2 caches. *NOTE* the python one requires some changes to the coral source that haven&#8217;t made it back to the repo on google code, but that will probably happen at some point. This is mostly there for me version-tracking my code, but you are free to prod at it or *gasp* use it.</p>
<p><a href="https://github.com/svenni/coral_plugins" target="_blank">coral_plugins on github</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sjt.is/2012/05/08/coral/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Batch adventures (or: expanding variables in batch files)</title>
		<link>http://sjt.is/2011/12/14/batch-adventures-or-expanding-variables-in-batch-files/</link>
		<comments>http://sjt.is/2011/12/14/batch-adventures-or-expanding-variables-in-batch-files/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 21:05:21 +0000</pubDate>
		<dc:creator>sjt</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tip]]></category>
		<category><![CDATA[whatilearnedtoday]]></category>

		<guid isPermaLink="false">http://sjt.is/?p=342</guid>
		<description><![CDATA[I was looking into writing a fairly simple batch file to install some stuff and update environment variables. At some point I wanted to do something like this (constructing a string of &#8216;;&#8217; separated paths): set env_vars = \path\to\stuff if x%user%==xsveinbjorn &#40; set env_vars = %env_vars%;\another\path &#41; if x%hostname%==xgefjun &#40; set env_vars = %env_vars%;\whoah\this\is\radical &#41; [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking into writing a fairly simple batch file to install some stuff and update environment variables. At some point I wanted to do something like this (constructing a string of &#8216;;&#8217; separated paths):</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">set env_vars = \path\<span style="color: #800080;">to</span>\stuff
<span style="color: #800080;">if</span> x<span style="color: #66cc66;">%</span>user<span style="color: #66cc66;">%</span>==xsveinbjorn <span style="color: #66cc66;">&#40;</span>
set env_vars = <span style="color: #66cc66;">%</span>env_vars<span style="color: #66cc66;">%</span><span style="color: #008000; font-style: italic;">;\another\path</span>
<span style="color: #66cc66;">&#41;</span>
<span style="color: #800080;">if</span> x<span style="color: #66cc66;">%</span>hostname<span style="color: #66cc66;">%</span>==xgefjun <span style="color: #66cc66;">&#40;</span>
set env_vars = <span style="color: #66cc66;">%</span>env_vars<span style="color: #66cc66;">%</span><span style="color: #008000; font-style: italic;">;\whoah\this\is\radical</span>
<span style="color: #66cc66;">&#41;</span>
echo env_vars</pre></div></div>

<p>When I would run this I would always get</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">\path\<span style="color: #800080;">to</span>\stuff<span style="color: #008000; font-style: italic;">;\whoah\this\is\radical</span></pre></div></div>

<p>(Notice that the second path \another\path is missing from the result)<br />
Being very new to writing batch scripts I found this extremely confusing since this sort of stuff would work like a charm in python. So I started the google machine. </p>
<p>The reason this happens is that variables enclosed in &#8216;%&#8217; are expanded when the script is read, which is quite different from the way python handles this resolving stuff at the last possible time. So when the script is read it will actually look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">set env_vars = \path\<span style="color: #800080;">to</span>\stuff
<span style="color: #800080;">if</span> xsveinbjorn==xsveinbjorn <span style="color: #66cc66;">&#40;</span>
set env_vars = \path\<span style="color: #800080;">to</span>\stuff<span style="color: #008000; font-style: italic;">;\another\path</span>
<span style="color: #66cc66;">&#41;</span>
<span style="color: #800080;">if</span> xgefjun==xgefjun <span style="color: #66cc66;">&#40;</span>
set env_vars = \path\<span style="color: #800080;">to</span>\stuff<span style="color: #008000; font-style: italic;">;\whoah\this\is\radical</span>
<span style="color: #66cc66;">&#41;</span>
echo env_vars</pre></div></div>

<p>(I resolved the variables %user% to &#8216;sveinbjorn&#8217; and %hostname% to &#8216;gefjun&#8217;)<br />
And we can clearly see why we got the result that we got.</p>
<p>So what we have to do is tell the batch file to expand the variables as we go along (something close to how python does things) instead of this expand-it-when-you-read-it nonsense.</p>
<p>To do this we simply have to do three things:</p>
<ol>
<li>Add this line to the top of the code

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">setlocal EnableDelayedExpansion</pre></div></div>

</li>
<li>Add this to the end of it

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">endlocal</pre></div></div>

</li>
<li>Replace the enclosing &#8216;%&#8217; to &#8216;!&#8217; for the variable you want to delay the expansion for.
<pre lang=winbatch">
if x%user%==xsveinbjorn (
set env_vars = !env_vars!;\another\path
)
</pre>
</li>
</ol>
<p>So my original example would look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">setlocal EnableDelayedExpansion
set env_vars = \path\<span style="color: #800080;">to</span>\stuff
<span style="color: #800080;">if</span> xsveinbjorn==xsveinbjorn <span style="color: #66cc66;">&#40;</span>
set env_vars = \path\<span style="color: #800080;">to</span>\stuff<span style="color: #008000; font-style: italic;">;\another\path</span>
<span style="color: #66cc66;">&#41;</span>
<span style="color: #800080;">if</span> xgefjun==xgefjun <span style="color: #66cc66;">&#40;</span>
set env_vars = \path\<span style="color: #800080;">to</span>\stuff<span style="color: #008000; font-style: italic;">;\whoah\this\is\radical</span>
<span style="color: #66cc66;">&#41;</span>
echo env_vars
endlocal</pre></div></div>

<p>Now we get the result we were looking for:</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">\path\<span style="color: #800080;">to</span>\stuff<span style="color: #008000; font-style: italic;">;\another\path;\whoah\this\is\radical</span></pre></div></div>

<p>This also applies to loops and other places where the variable might change between the time you start the batch script and when you actually want to expand it.</p>
]]></content:encoded>
			<wfw:commentRss>http://sjt.is/2011/12/14/batch-adventures-or-expanding-variables-in-batch-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>subprocess.Popen and the env argument</title>
		<link>http://sjt.is/2011/11/30/subprocess-popen-and-the-env-argument/</link>
		<comments>http://sjt.is/2011/11/30/subprocess-popen-and-the-env-argument/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 21:17:41 +0000</pubDate>
		<dc:creator>sjt</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[whatilearnedtoday]]></category>

		<guid isPermaLink="false">http://sjt.is/?p=338</guid>
		<description><![CDATA[Today I was looking at launching programs with some custom environment variables set and if you don&#8217;t want to redefine a whole lot of them for this new environment I&#8217;d recommend is copying the os.environ dictionary and do your changes on the copy, like so: new_env = os.environ.copy&#40;&#41; new_env&#91;'MEGAVARIABLE'&#93; = 'MEGAVALUE' subprocess.Popen&#40;'path', env=new_env&#41; Then you [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was looking at launching programs with some custom environment variables set and if you don&#8217;t want to redefine a whole lot of them for this new environment I&#8217;d recommend is copying the os.environ dictionary and do your changes on the copy, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">new_env = <span style="color: #dc143c;">os</span>.<span style="color: black;">environ</span>.<span style="color: #dc143c;">copy</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
new_env<span style="color: black;">&#91;</span><span style="color: #483d8b;">'MEGAVARIABLE'</span><span style="color: black;">&#93;</span> = <span style="color: #483d8b;">'MEGAVALUE'</span>
<span style="color: #dc143c;">subprocess</span>.<span style="color: black;">Popen</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'path'</span>, env=new_env<span style="color: black;">&#41;</span></pre></div></div>

<p>Then you should have your program launched with all them fancy environment variables set.</p>
]]></content:encoded>
			<wfw:commentRss>http://sjt.is/2011/11/30/subprocess-popen-and-the-env-argument/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XSICollections, python and you</title>
		<link>http://sjt.is/2011/06/24/xsicollections-python-and-you/</link>
		<comments>http://sjt.is/2011/06/24/xsicollections-python-and-you/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 14:06:52 +0000</pubDate>
		<dc:creator>sjt</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[XSI]]></category>

		<guid isPermaLink="false">http://sjt.is/?p=333</guid>
		<description><![CDATA[Have you ever called a some scripting function in Softimage and gotten back an XSICollection and printed that return value only to get a &#8216;None&#8217; value printed to the log? Don&#8217;t worry, you got some data there. Just remember that thats the way python in Softimage prints XSICollections if you would iterate over the collection [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever called a some scripting function in Softimage and gotten back an XSICollection and printed that return value only to get a &#8216;None&#8217; value printed to the log?<br />
Don&#8217;t worry, you got some data there. Just remember that thats the way python in Softimage prints XSICollections if you would iterate over the collection you will find your values:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">for</span> <span style="color: #008000;">object</span> <span style="color: #ff7700;font-weight:bold;">in</span> returnedCollectin:
   <span style="color: #808080; font-style: italic;"># do something with object</span>
   ...</pre></div></div>

<p>I have seen some people who just started scripting in xsi run in to this little issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://sjt.is/2011/06/24/xsicollections-python-and-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sjtCopySkinWeights</title>
		<link>http://sjt.is/2011/03/19/sjtcopyskinweights/</link>
		<comments>http://sjt.is/2011/03/19/sjtcopyskinweights/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 21:05:17 +0000</pubDate>
		<dc:creator>sjt</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://sjt.is/?p=315</guid>
		<description><![CDATA[This is a simple plug-in command to copy skin weights from one object to another with some significant restrictions: Download sjtCopySkinWeights The meshes must be exactly mirrors of each other vertex-number wise. This plugin simply uses the vertex numbers of the mesh so each vertex of object A must have a corresponding vertex on object [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple plug-in command to copy skin weights from one object to another with some significant restrictions:</p>
<p><a href="http://sjt.is/efni/scripts/sjtCopySkinWeights_v1_0.zip">Download sjtCopySkinWeights</a></p>
<ol>
<li>The meshes must be exactly mirrors of each other vertex-number wise.  This plugin simply uses the vertex numbers of the mesh so each vertex of object A must have a corresponding vertex on object B.
</li>
<li>The joint names must be somehow side-differentiated e.g. L_joint and R_joint or left_side_arm_JNT and right_side_arm_JNT or you must somehow be able to map one side of joint names to the other.
</li>
</ol>
<p>This has mostly been useful when dealing with hands, you skin one and then you have to copy the weights over, but sometimes maya does a lousy job. This plug-in is pretty much like going in the component editor and copying each value for each vertex between meshes (which would be insane to do by hand).<br />
<strong>Note:</strong> this is not a very fast script (I was trying to learn the Maya API while writing this) so give it some time to work through dense meshes.</p>
<p>If you have questions or comments just either send me an email or comment below.<br />
&nbsp;</p>
<h3>Usage</h3>
<ol>
<li>Select the object with the correct weights.</li>
<li>Select the object with the incorrect weights.</li>
<li>Run the command e.g. &#8216;sjtCopySkinWeights -s &#8220;L_&#8221; -r &#8220;R_&#8221;&#8216;</li>
</ol>
<h3>Arguments</h3>
<p>This command accepts two arguments -search/-s and -replace/-r and each argument requires a string to follow it that tells the plugin how to map the right joint names to the left ones. Yes it works kind of backwards. The command first constructs a list of all the influences on the first object, then it goes over every vertex on the other object and tries to map it&#8217;s influences to the ones in the influence-list from the first object.</p>
<h3>Example</h3>
<p>On one side the joints are called <em>L_&#8230;.._JNT</em> and the other <em>R_&#8230;&#8230;_JNT</em> the proper arguments for this command to work would be (MEL syntax):</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">sjtCopySkinWeights -s <span style="color: #483d8b;">&quot;L_&quot;</span> -r <span style="color: #483d8b;">&quot;R_&quot;</span></pre></div></div>

<p> (if no arguments are givien, this is the default search pattern)<br />
This would also have worked (since the search strings can be regular expressions):</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">sjtCopySkinWeights -s <span style="color: #483d8b;">&quot;L_&quot;</span> -r <span style="color: #483d8b;">&quot;^[rR]_&quot;</span></pre></div></div>

<p>This would allow the right side joints to be named either <em>R_&#8230;._JNT</em> or <em>r_&#8230;._JNT</em> Just remember the regular expression should go with the -r flag, the -s flag is just used to replace the match from the -r flag with.</p>
<h3>Example file</h3>
<p>To test the command immediately you can load up th test file included in the zip download &#8216;copyWeights_example.ma&#8217;. First  try scrubbing in the timeline to see the difference in weighting. The right side (pCube1) bends in the middle but the left side(pCube2) does not. To copy the weights from pCube1 to pCube2 first load the plugin, select pCube1 then pCube2 and type (MEL syntax):</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">sjtCopySkinWeights</pre></div></div>

<p>into the command line (or script editor) and then the weights will have been copied from pCube1 to pCube2. Voila.</p>
]]></content:encoded>
			<wfw:commentRss>http://sjt.is/2011/03/19/sjtcopyskinweights/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Select constraining object</title>
		<link>http://sjt.is/2011/01/25/select-constraining-object/</link>
		<comments>http://sjt.is/2011/01/25/select-constraining-object/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 21:10:45 +0000</pubDate>
		<dc:creator>sjt</dc:creator>
				<category><![CDATA[Maya]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Snippet]]></category>

		<guid isPermaLink="false">http://sjt.is/?p=296</guid>
		<description><![CDATA[This is a tiny snippet I threw together today to speed up selecting the object that was controlling my selected object. In this case the object that was being controlled was a curve, but the constraining object (controlling the curve) was an invisible transform node, so instead of going through the hypergraph I wrote this: [...]]]></description>
			<content:encoded><![CDATA[<p>This is a tiny snippet I threw together today to speed up selecting the object that was controlling my selected object. In this case the object that was being controlled was a curve, but the constraining object (controlling the curve) was an invisible transform node, so instead of going through the hypergraph I wrote this:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> maya.<span style="color: black;">cmds</span> <span style="color: #ff7700;font-weight:bold;">as</span> mc
selection = mc.<span style="color: black;">ls</span><span style="color: black;">&#40;</span>sl=<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
toSelect = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
<span style="color: #ff7700;font-weight:bold;">for</span> item <span style="color: #ff7700;font-weight:bold;">in</span> selection:
   constraint = mc.<span style="color: black;">listConnections</span><span style="color: black;">&#40;</span> item+<span style="color: #483d8b;">'.parentInverseMatrix[0]'</span>, d=<span style="color: #ff4500;">1</span>, s=<span style="color: #ff4500;">0</span>,<span style="color: #008000;">type</span>=<span style="color: #483d8b;">'constraint'</span><span style="color: black;">&#41;</span>
   <span style="color: #ff7700;font-weight:bold;">if</span> constraint:
      constraint = constraint<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
      src = mc.<span style="color: black;">listConnections</span><span style="color: black;">&#40;</span>constraint+<span style="color: #483d8b;">'.target[0].targetParentMatrix'</span>, d=<span style="color: #ff4500;">0</span>, s=<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
      <span style="color: #ff7700;font-weight:bold;">if</span> src:
         toSelect.<span style="color: black;">extend</span><span style="color: black;">&#40;</span>src<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">try</span>:
   mc.<span style="color: #dc143c;">select</span><span style="color: black;">&#40;</span>toSelect<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">except</span>:
   <span style="color: #ff7700;font-weight:bold;">pass</span></pre></div></div>

<p>Note: this allows you to select multiple constrained objects and this will try and find the driving objects, this does not handle multiple constraints or anything fancy like that. Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://sjt.is/2011/01/25/select-constraining-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What I learned today #5: Quicktime COM object&#8217;s volume range.</title>
		<link>http://sjt.is/2010/11/23/what-i-learned-today-5-quicktime-com-objects-volume-range/</link>
		<comments>http://sjt.is/2010/11/23/what-i-learned-today-5-quicktime-com-objects-volume-range/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 20:54:55 +0000</pubDate>
		<dc:creator>sjt</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[whatilearnedtoday]]></category>

		<guid isPermaLink="false">http://sjt.is/?p=291</guid>
		<description><![CDATA[When setting the volume of a quicktime player through COM please keep in mind that the range is from 0-1 NOT 0-100 as I thought (since there doesn&#8217;t seem to be any good documentation about the QT COM interface). QT allows you to set the volume to 100 and you end up with painfully loud [...]]]></description>
			<content:encoded><![CDATA[<p>When setting the volume of a quicktime player through COM please keep in mind that the range is from 0-1 <strong>NOT</strong> 0-100 as I thought (since there doesn&#8217;t seem to be any good documentation about the QT COM interface). QT allows you to set the volume to 100 and you end up with painfully loud sound. So set your volume to 1 to allow people to enjoy their hearing for a new day.</p>
]]></content:encoded>
			<wfw:commentRss>http://sjt.is/2010/11/23/what-i-learned-today-5-quicktime-com-objects-volume-range/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What I learned today #4:Center Current Frame</title>
		<link>http://sjt.is/2010/10/13/what-i-learned-today-4center-current-frame/</link>
		<comments>http://sjt.is/2010/10/13/what-i-learned-today-4center-current-frame/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 21:43:47 +0000</pubDate>
		<dc:creator>sjt</dc:creator>
				<category><![CDATA[whatilearnedtoday]]></category>

		<guid isPermaLink="false">http://sjt.is/?p=285</guid>
		<description><![CDATA[When using Maya&#8217;s Dope Sheet and Graph Editor you sometimes want to quickly center the editors on the current active frame. You can do this by going &#8216;View&#8217;>'Center Current Frame&#8217; &#8211; or &#8211; you can add these two commands to your hotkey editor and map that functionality to some spiffy hotkeys: For the Graph Editor: [...]]]></description>
			<content:encoded><![CDATA[<p>When using Maya&#8217;s Dope Sheet and Graph Editor you sometimes want to quickly center the editors on the current active frame. You can do this by going &#8216;View&#8217;>'Center Current Frame&#8217; &#8211; or &#8211; you can add these two commands to your hotkey editor and map that functionality to some spiffy hotkeys:</p>
<p>For the Graph Editor:<br />
<code>animCurveEditor -edit -lookAt currentTime graphEditor1GraphEd;</code> </p>
<p>For the Dope Sheet:<br />
<code>dopeSheetEditor -edit -lookAt currentTime dopeSheetPanel1DopeSheetEd;</code> </p>
<p>For those who like this sort of stuff there is <a href="http://fliponline.blogspot.com/2007/04/quick-trick-tap-your-timing.html">Cameron Fielding&#8217;s &#8216;Tap your timing&#8217; &#8211; tip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sjt.is/2010/10/13/what-i-learned-today-4center-current-frame/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What I learned today #3: Wrapping your paths in quotes!</title>
		<link>http://sjt.is/2010/10/06/what-i-learned-today-3-wrapping-your-paths-in-quotes/</link>
		<comments>http://sjt.is/2010/10/06/what-i-learned-today-3-wrapping-your-paths-in-quotes/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 20:16:22 +0000</pubDate>
		<dc:creator>sjt</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[whatilearnedtoday]]></category>

		<guid isPermaLink="false">http://sjt.is/?p=279</guid>
		<description><![CDATA[Always always always remember wrapping your paths in quotes. I keep running into stuff I wrote break because someone saved a file with a space in it and I forgot to wrap the path in quotes. This works: blackwave.exe -d 50 superwave.wav This doesn&#8217;t: blackwave.exe -d 50 super 2.wav (two file arguments, &#8216;super&#8217; and &#8217;2.wav&#8217;) [...]]]></description>
			<content:encoded><![CDATA[<p>Always always always remember wrapping your paths in quotes. I keep running into stuff I wrote break because someone saved a file with a space in it and I forgot to wrap the path in quotes.<br />
This works:<br />
<code>blackwave.exe -d 50 superwave.wav</code><br />
This doesn&#8217;t:<br />
<code>blackwave.exe -d 50 super 2.wav</code> (two file arguments, &#8216;super&#8217; and &#8217;2.wav&#8217;)<br />
To fix this:<br />
<code>blackwave.exe -d 50 "super 2.wav"</code></p>
<p>So remember: whenever you are using path rembemer the<br />
<code>"\""+ variable + "\""</code><br />
(or something else that suits your language)</p>
]]></content:encoded>
			<wfw:commentRss>http://sjt.is/2010/10/06/what-i-learned-today-3-wrapping-your-paths-in-quotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What I learned today #2: Various definitions of TEMP</title>
		<link>http://sjt.is/2010/10/04/what-i-learned-today-2-various-definitions-of-temp/</link>
		<comments>http://sjt.is/2010/10/04/what-i-learned-today-2-various-definitions-of-temp/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 20:10:38 +0000</pubDate>
		<dc:creator>sjt</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[whatilearnedtoday]]></category>
		<category><![CDATA[XSI]]></category>

		<guid isPermaLink="false">http://sjt.is/?p=270</guid>
		<description><![CDATA[In Softimage on Windows, if you fetch the TEMP environment variable e.g. from witihn python (with the os.environ dictionary), you will get a different directory when you get the TEMP variable from outside Softimage. Outside Softimage you get: C:\Users\&#60;username&#62;\some\path\I\cannot\rembemer within it you get: C:\Users\&#60;username&#62;\some\path\I\cannot\rembemer\XSI_temp_### Just in case you wanted to write files to TEMP and [...]]]></description>
			<content:encoded><![CDATA[<p>In Softimage on Windows, if you fetch the <code>TEMP</code> environment variable e.g. from witihn python (with the <code>os.environ</code> dictionary), you will get a different directory when you get the <code>TEMP</code> variable from outside Softimage.<br />
Outside Softimage you get: <br />
<code>C:\Users\&lt;username&gt;\some\path\I\cannot\rembemer</code><br />
within it you get:<br />
<code>C:\Users\&lt;username&gt;\some\path\I\cannot\rembemer\XSI_temp_###</code> </p>
<p>Just in case you wanted to write files to <code>TEMP</code> and read from them later.</p>
]]></content:encoded>
			<wfw:commentRss>http://sjt.is/2010/10/04/what-i-learned-today-2-various-definitions-of-temp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

