<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>XSIBlog</title>
	
	<link>http://www.xsi-blog.com</link>
	<description>People and thoughts behind XSI in production...</description>
	<pubDate>Mon, 07 Jul 2008 07:32:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/xsi-blog/content" type="application/rss+xml" /><item>
		<title>Previewing Shadowmaps</title>
		<link>http://feeds.feedburner.com/~r/xsi-blog/content/~3/328090526/269</link>
		<comments>http://www.xsi-blog.com/archives/269#comments</comments>
		<pubDate>Sun, 06 Jul 2008 14:30:21 +0000</pubDate>
		<dc:creator>Stefano Jannuzzo</dc:creator>
		
		<category><![CDATA[Rendering]]></category>

		<category><![CDATA[.zt]]></category>

		<category><![CDATA[imf_disp]]></category>

		<category><![CDATA[mentalray]]></category>

		<category><![CDATA[mi2]]></category>

		<category><![CDATA[ray3]]></category>

		<category><![CDATA[shadowmaps]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=269</guid>
		<description><![CDATA[It is sometimes desirable to be able to check the shadow maps look.
Since XSI does not allow for shadow maps paths, this is how you can do (a ray3 standalone license is required).
After setting up a shadow mapped light, export a single frame archive (mi2) ascii file.
Edit the file with a text editor, and look [...]]]></description>
			<content:encoded><![CDATA[<p>It is sometimes desirable to be able to check the shadow maps look.</p>
<p>Since XSI does not allow for shadow maps paths, this is how you can do (a ray3 standalone license is required).</p>
<p>After setting up a shadow mapped light, export a single frame archive (mi2) ascii file.</p>
<p>Edit the file with a text editor, and look for the light options section. There you find the shadowmap settings.</p>
<p>To have the map written, just add a line with the &#8220;shadowmap file&#8221; statement, followed by the path for the file (.zt format mandatory).</p>
<pre>light "Spot_Root/Spot/Light" = "Spot_Root/Spot/Light/soft_light"
origin 0 0 0
direction 0 0 -1
spread 0.866025
shadowmap on
shadowmap resolution 500
shadowmap softness 0.002
shadowmap samples 20
#the following line added
shadowmap file "C:\temp\sm.zt"
energy 7500 7500.01 7500
...
end light
</pre>
<p>Save the file and render it with ray3.</p>
<p>To just render the shadow map and not the image, you can use the handy &#8220;-shadowmap only&#8221; option. In my case, being the archive file named C:\temp\out.mi2, I run</p>
<pre>ray3 C:\temp\out.mi2 -shadowmap only -verbose on</pre>
<p>Once finished, you should find the map on disk (C:\temp\sm.zt in my case), and view it by</p>
<pre>imf_disp C:\temp\sm.zt</pre>
<p>This is a simple sphere over a grid</p>
<p><a href="http://www.xsi-blog.com/userContent/upload/2008/07/sm.jpg" ><img class="alignnone size-medium wp-image-270" title="Shadow Maped Sphere" src="http://www.xsi-blog.com/userContent/upload/2008/07/sm-276x300.jpg" alt="Shadow Maped Sphere" width="276" height="300" /></a></p>
<p>The grid does not show up, not being a shadow caster itself.</p>
<p>So you can now check the shadow map extent, which is particularly interesting for infinite lights, being determined by the extent of the parts of the scene that cast shadows (for spot light sources, only the cone spread parameter matters).</p>
<p>Also, by left clicking on the image, you can read the z value for each pixel, and finally (maybe) understand the obscure bias option ;).</p>

<p><a href="http://feeds.feedburner.com/~a/xsi-blog/content?a=WO8PXd"><img src="http://feeds.feedburner.com/~a/xsi-blog/content?i=WO8PXd" border="0"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=feEi1j"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=feEi1j" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=wQC3rJ"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=wQC3rJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=LAMvFJ"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=LAMvFJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=8Vx3hJ"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=8Vx3hJ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/xsi-blog/content/~4/328090526" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xsi-blog.com/archives/269/feed</wfw:commentRss>
		<feedburner:origLink>http://www.xsi-blog.com/archives/269</feedburner:origLink></item>
		<item>
		<title>Slickening up the build cycle for compiled plugins</title>
		<link>http://feeds.feedburner.com/~r/xsi-blog/content/~3/315350046/268</link>
		<comments>http://www.xsi-blog.com/archives/268#comments</comments>
		<pubDate>Thu, 19 Jun 2008 11:16:24 +0000</pubDate>
		<dc:creator>Kim Aldis</dc:creator>
		
		<category><![CDATA[C++]]></category>

		<category><![CDATA[Programming / Scripting]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=268</guid>
		<description><![CDATA[1. compile with copy, 2. oops, error, file in use, 3. switch to XSI, 4. dig down and unload plugin, 5. switch to VS, 6. compile &#8230;&#8230;. yaddda &#8230;.. you know the drill. 
For years I&#8217;ve been doing this and for years I&#8217;ve been meaning to get around to making it slicker but somehow there [...]]]></description>
			<content:encoded><![CDATA[<p>1. compile with copy, 2. oops, error, file in use, 3. switch to XSI, 4. dig down and unload plugin, 5. switch to VS, 6. compile &#8230;&#8230;. yaddda &#8230;.. you know the drill. </p>
<p>For years I&#8217;ve been doing this and for years I&#8217;ve been meaning to get around to making it slicker but somehow there was never time. So the other day it rained - fit to burst - and I had a day inside with nothing else to do and this is what I ended up with.</p>
<p>Earlier attempts ended up in a puddle on the floor because for some reason the only links I could find to VSS command line building pointed me at VCBuild.exe, which is just a plain old mess. This time, though, I found a link to a list of command line options for devenv.exe - what you run to bring up the VS IDE - at the excelent <a href="http://www.codeproject.com/KB/dotnet/builditemincontextmenu.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.codeproject.com');">codeproject.com</a> and these are much more straightforward.</p>
<p>The process is fairly simple: </p>
<p>1. unload the plugin.<br />
2. run a command line build using system()<br />
3. copy over the dll (my build has this built in)<br />
4. reload the plugin.<br />
5. test<br />
6. package</p>
<p>Step 2 involves a little bit of wrastling with .bat command line, um, features but really the code (at the end of this article) is quite simple. Because it&#8217;s scripted you can build entire plugin sets and package them in one go. The whole process takes only seconds because it&#8217;s self contained and it&#8217;s dead easy to stuff in some test code. You can easily slip back to the IDE when you need it and it makes working with a preferred text editor easier if that&#8217;s your bag.</p>
<p>There&#8217;s also the advantage that the build inherits the paths to libraries from the XSI version you&#8217;re working with. No more .bat file wrappers. Neat!</p>
<p>This example code is just a list of functions:</p>
<p>Build( solutionName, PluginName, forceRebuild   ); // do the actual build.<br />
GetConfig(); //gets the platform type (32/64)<br />
Package(  PluginName );  // package. Output name is hard coded in the example. </p>
<p>I stuff the plugin names in an array so I can build a bunch of them in one.</p>
<p>I also have a custom property I use with a dropdown list of my main projects along with build and package buttons.</p>
<p>And finally, I figure I might, next time it rains, get this working alongside package location. Who knows.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
</pre></td><td class="code"><pre class="javascript"><span style="color: #003366; font-weight: bold;">var</span> sPlugins <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;TinyCurveExtrude&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;TinyCap&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> slnName <span style="color: #339933;">=</span> sPlugins<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> sPluginName <span style="color: #339933;">=</span> slnName <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;Plugin&quot;</span><span style="color: #339933;">;</span>
&nbsp;
Build<span style="color: #009900;">&#40;</span> slnName<span style="color: #339933;">,</span> sPluginName<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">Package</span><span style="color: #009900;">&#40;</span> sPluginName <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// build the solution. doRebuild is a boolean, forces a complete compile and build if true.</span>
<span style="color: #006600; font-style: italic;">//</span>
<span style="color: #003366; font-weight: bold;">function</span> Build<span style="color: #009900;">&#40;</span> slnName<span style="color: #339933;">,</span> sPluginName<span style="color: #339933;">,</span> doRebuild <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> oPlugin <span style="color: #339933;">=</span> Application.<span style="color: #006600;">Plugins</span><span style="color: #009900;">&#40;</span> sPluginName <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> sPluginFileName <span style="color: #339933;">=</span> oPlugin.<span style="color: #006600;">FileName</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>oPlugin <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		logmessage<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;Can't find plugin to unload: &quot;</span> <span style="color: #339933;">+</span> sPluginName<span style="color: #339933;">,</span> siError <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	Logmessage<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;Unloading Plugin &quot;</span> <span style="color: #339933;">+</span> sPluginFileName <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
	Application.<span style="color: #006600;">UnloadPlugin</span><span style="color: #009900;">&#40;</span> sPluginFileName <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> Cmd <span style="color: #339933;">=</span> BuildCmdRoot<span style="color: #009900;">&#40;</span> slnName <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> sConfig <span style="color: #339933;">=</span> GetConfig<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> sOpt <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>doRebuild<span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #3366CC;">&quot; /rebuild &quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot; /build &quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> sConfig <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		system<span style="color: #009900;">&#40;</span> Cmd <span style="color: #339933;">+</span> sOpt <span style="color: #339933;">+</span> sConfig <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; &amp;amp; pause&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
		Logmessage<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;Build Failed&quot;</span><span style="color: #339933;">,</span> siError <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	LogMessage<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;ReLoading Plugin: &quot;</span> <span style="color: #339933;">+</span> sPluginFileName <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	Application.<span style="color: #006600;">LoadPlugin</span><span style="color: #009900;">&#40;</span> sPluginFileName <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span> 
<span style="color: #006600; font-style: italic;">// get the platform type, 32 or 64 bit. Release is hard coded</span>
<span style="color: #006600; font-style: italic;">//</span>
<span style="color: #003366; font-weight: bold;">function</span> GetConfig<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> sPlatform <span style="color: #339933;">=</span> Application.<span style="color: #006600;">Platform</span><span style="color: #339933;">;</span>
	Logmessage<span style="color: #009900;">&#40;</span> sPlatform <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> sPlatform.<span style="color: #006600;">match</span><span style="color: #009900;">&#40;</span> <span style="color: #009966; font-style: italic;">/win64/i</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>Release x64|x64<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> sPlatform.<span style="color: #006600;">match</span><span style="color: #009900;">&#40;</span> <span style="color: #009966; font-style: italic;">/win32/i</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>Release|Win32<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	Logmessage<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;Unsupported Platform: &quot;</span> <span style="color: #339933;">+</span> sPlatform<span style="color: #339933;">,</span> siError <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// build the devenv.ex command line</span>
<span style="color: #006600; font-style: italic;">// NOTE: this is set to work on a 64 bit system. Take out the (x86) and spaces </span>
<span style="color: #006600; font-style: italic;">// for 32 bit. Cross compile works well enough but you'll need the 64 bit libs</span>
<span style="color: #003366; font-weight: bold;">function</span> BuildCmdRoot<span style="color: #009900;">&#40;</span> sTargetName <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> slnRoot <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>fatty<span style="color: #000099; font-weight: bold;">\\</span>DEV<span style="color: #000099; font-weight: bold;">\\</span>CPP&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> vcVars <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;call <span style="color: #000099; font-weight: bold;">\&quot;</span>C:<span style="color: #000099; font-weight: bold;">\\</span>Program Files (x86)<span style="color: #000099; font-weight: bold;">\\</span>Microsoft Visual Studio 8<span style="color: #000099; font-weight: bold;">\\</span>VC<span style="color: #000099; font-weight: bold;">\\</span>vcvarsall.bat<span style="color: #000099; font-weight: bold;">\&quot;</span> x86&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> slnPath <span style="color: #339933;">=</span> slnRoot <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>&quot; + sTargetName + &quot;</span>\\<span style="color: #3366CC;">&quot; + sTargetName + &quot;</span>.<span style="color: #006600;">sln</span><span style="color: #3366CC;">&quot;
	var Cmd = vcVars + &quot;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span> devenv <span style="color: #3366CC;">&quot; + slnPath;
	return Cmd;
}
&nbsp;
// Package.
// ToDo: rebuild for package location.
//
function Package( sPluginName ) {
	logmessage( &quot;</span>Packaging ... <span style="color: #3366CC;">&quot; );
&nbsp;
	var sOutputPath = &quot;</span>C<span style="color: #339933;">:/</span>Fatty<span style="color: #339933;">/</span>Dev<span style="color: #339933;">/</span>CPP<span style="color: #339933;">/</span>Release<span style="color: #3366CC;">&quot;
&nbsp;
	var sPlatform = Application.Platform;
&nbsp;
	var oPlugin = Application.Plugins( sPluginName );
	var sPluginFileName = oPlugin.FileName;
&nbsp;
	var oAddOn = Application.CreateAddon();
&nbsp;
	oAddOn.AddItem( siPluginAddonItemType, oPlugin.FileName );
&nbsp;
	oAddOn.DefaultInstallationPath = siUserAddonPath;
	oAddOn.SubDirectory = sPluginName;
&nbsp;
	var sPluginFileName = sOutputPath + &quot;</span><span style="color: #339933;">/</span><span style="color: #3366CC;">&quot; + sPluginName + &quot;</span>_<span style="color: #3366CC;">&quot; + sPlatform + &quot;</span>.<span style="color: #006600;">xsiaddon</span><span style="color: #3366CC;">&quot;
&nbsp;
	oAddOn.Save( sPluginFileName );
&nbsp;
	logmessage( &quot;</span>Packaged to<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot; + sPluginFileName  );
}
</span</pre></td></tr></table></div>


<p><a href="http://feeds.feedburner.com/~a/xsi-blog/content?a=Dlb8dF"><img src="http://feeds.feedburner.com/~a/xsi-blog/content?i=Dlb8dF" border="0"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=HiJSzi"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=HiJSzi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=jZbvwI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=jZbvwI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=0DRtyI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=0DRtyI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=Bw39EI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=Bw39EI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/xsi-blog/content/~4/315350046" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xsi-blog.com/archives/268/feed</wfw:commentRss>
		<feedburner:origLink>http://www.xsi-blog.com/archives/268</feedburner:origLink></item>
		<item>
		<title>Vista Trick : Symbolic Links</title>
		<link>http://feeds.feedburner.com/~r/xsi-blog/content/~3/313989148/267</link>
		<comments>http://www.xsi-blog.com/archives/267#comments</comments>
		<pubDate>Tue, 17 Jun 2008 18:07:52 +0000</pubDate>
		<dc:creator>Luc-Eric</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[Vista]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=267</guid>
		<description><![CDATA[It&#8217;s possible to create symbolic links in Windows Vista just like in Unix. This is helpful if you need to make a directory or file appear to be in different location. In a command prompt:
  mklink /D d:\alias_location  d:\actual\location\of\directory
The /D stands for directory link, because file links are also supported.  Even better, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s possible to <a href="http://technet2.microsoft.com/windowsserver2008/en/library/0ce4df22-2dbc-48fc-9c16-b721ae85f8571033.mspx?mfr=true" onclick="javascript:pageTracker._trackPageview('/outbound/article/technet2.microsoft.com');">create symbolic links</a> in Windows Vista just like in Unix. This is helpful if you need to make a directory or file appear to be in different location. In a command prompt:</p>
<pre>  mklink /D d:\alias_location  d:\actual\location\of\directory</pre>
<p>The /D stands for directory link, because file links are also supported.  Even better, the link can be to a remote location.</p>
<pre>  mklink /D d:\alias_location  \\server\share</pre>
<p>Naturally, if you only wanted a drive letter shortcut, the old &#8216;<a href="http://technet.microsoft.com/en-us/library/bb491006.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/technet.microsoft.com');">subst</a>&#8216; command still works.</p>

<p><a href="http://feeds.feedburner.com/~a/xsi-blog/content?a=Lq25bC"><img src="http://feeds.feedburner.com/~a/xsi-blog/content?i=Lq25bC" border="0"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=vFG23i"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=vFG23i" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=tsTOoI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=tsTOoI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=jSy5KI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=jSy5KI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=qTSXzI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=qTSXzI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/xsi-blog/content/~4/313989148" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xsi-blog.com/archives/267/feed</wfw:commentRss>
		<feedburner:origLink>http://www.xsi-blog.com/archives/267</feedburner:origLink></item>
		<item>
		<title>Dynamic Callbacks In Plugins</title>
		<link>http://feeds.feedburner.com/~r/xsi-blog/content/~3/310052763/265</link>
		<comments>http://www.xsi-blog.com/archives/265#comments</comments>
		<pubDate>Thu, 12 Jun 2008 01:12:46 +0000</pubDate>
		<dc:creator>Patrick Boucher</dc:creator>
		
		<category><![CDATA[Plugins]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=265</guid>
		<description><![CDATA[I really like applications that provide rich SDKs for it&#8217;s users to play around with. I also like event based systems and callbacks. These are all things that make me absolutely love writing up plugins inside XSI. But there is one small problem, I find, with XSI&#8217;s callbacks.
Callbacks in XSI plugins are functions in the [...]]]></description>
			<content:encoded><![CDATA[<p>I really like applications that provide rich SDKs for it&#8217;s users to play around with. I also like event based systems and callbacks. These are all things that make me absolutely love writing up plugins inside XSI. But there is one small problem, I find, with XSI&#8217;s callbacks.</p>
<p>Callbacks in XSI plugins are functions in the global scope who&#8217;s name must be defined exactly the way XSI expects to find them.</p>
<p>I would have preferred callbacks to be supplied by the user in a way that allows them to have any name and in a way that allows them to be changed on the fly. In all fairness, Softimage probably has some very good reasons for the way they did things.</p>
<p>So this is where we, as users, exploit the power that has been given to us and take things into our own hands. Here is my implementation of dynamic, interchangeable, replaceable callbacks.</p>
<p><span id="more-265"></span><strong>Code Time!</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
</pre></td><td class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">import</span> win32com.<span style="color: black;">client</span>
<span style="color: #ff7700;font-weight:bold;">from</span> win32com.<span style="color: black;">client</span> <span style="color: #ff7700;font-weight:bold;">import</span> constants as c
<span style="color: #ff7700;font-weight:bold;">from</span> vg.<span style="color: black;">xsi</span>.<span style="color: black;">dynamic</span> <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #66cc66;">*</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> XSILoadPlugin<span style="color: black;">&#40;</span> in_reg <span style="color: black;">&#41;</span>:
	in_reg.<span style="color: black;">Author</span> = <span style="color: #483d8b;">&quot;Patrick Boucher&quot;</span>
	in_reg.<span style="color: black;">Name</span> = <span style="color: #483d8b;">&quot;dynCbCommandPlugin&quot;</span>
	in_reg.<span style="color: black;">Major</span> = <span style="color: #ff4500;">1</span>
	in_reg.<span style="color: black;">Minor</span> = <span style="color: #ff4500;">0</span>
	in_reg.<span style="color: black;">RegisterCommand</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;dynCbCommand&quot;</span>, <span style="color: #483d8b;">&quot;dynCbCommand&quot;</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> XSIUnloadPlugin<span style="color: black;">&#40;</span> in_reg <span style="color: black;">&#41;</span>:
	strPluginName = in_reg.<span style="color: black;">Name</span>
	Application.<span style="color: black;">LogMessage</span><span style="color: black;">&#40;</span><span style="color: #008000;">str</span><span style="color: black;">&#40;</span>strPluginName<span style="color: black;">&#41;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot; has been unloaded.&quot;</span><span style="color: black;">&#41;</span>,c.<span style="color: black;">siVerbose</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> dynCbCommand_Init<span style="color: black;">&#40;</span> in_ctxt <span style="color: black;">&#41;</span>:
	oCmd = in_ctxt.<span style="color: black;">Source</span>
	oCmd.<span style="color: black;">Description</span> = <span style="color: #483d8b;">&quot;&quot;</span>
	oCmd.<span style="color: black;">ReturnValue</span> = <span style="color: #008000;">True</span>
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>
&nbsp;
@dynamic
<span style="color: #ff7700;font-weight:bold;">def</span> dynCbCommand_Execute<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
	Application.<span style="color: black;">LogMessage</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'In original callback!'</span><span style="color: black;">&#41;</span>
	setCallback<span style="color: black;">&#40;</span>dynCbCommand_Execute, callbackTwo<span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> callbackTwo<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
	Application.<span style="color: black;">LogMessage</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'In %s!'</span> <span style="color: #66cc66;">%</span> callback<span style="color: black;">&#40;</span>dynCbCommand_Execute<span style="color: black;">&#41;</span>.<span style="color: black;">func_name</span><span style="color: black;">&#41;</span>
	setCallback<span style="color: black;">&#40;</span>dynCbCommand_Execute, callbackThree<span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>	
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> callbackThree<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
	Application.<span style="color: black;">LogMessage</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'In callback three!'</span><span style="color: black;">&#41;</span>
	restoreCallback<span style="color: black;">&#40;</span><span style="color: #483d8b;">'dynCbCommand_Execute'</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>	
&nbsp;
setCallback<span style="color: black;">&#40;</span>dynCbCommand_Execute, callbackTwo<span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>The first time you run this command it will run the code in <code>callbackTwo</code> and switch itself to new code. The next time it will run <code>callbackThree</code> and the next time it will run the original callback code. It will then, with each consecutive invocation of the command, continue on in this loop. This plugin, as you have guessed, is just a demo of the dynamic callbacks.</p>
<p>The lines you have to concentrate on are the following:</p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">from</span> vg.<span style="color: black;">xsi</span>.<span style="color: black;">dynamic</span> <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #66cc66;">*</span></pre></div></div>

<p>and</p>

<div class="wp_syntax"><div class="code"><pre class="python">@dynamic</pre></div></div>

<p>These are the lines that provide the core of the functionality which is imported from the <code>vg.xsi.dynamic</code> module. Here it is&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
</pre></td><td class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
&nbsp;
__all__ = <span style="color: black;">&#91;</span><span style="color: #483d8b;">'dynamic'</span>, <span style="color: #483d8b;">'setCallback'</span>, <span style="color: #483d8b;">'callback'</span>, <span style="color: #483d8b;">'restoreCallback'</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Wrapper<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, cb<span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.__defaultCb = cb
        <span style="color: #008000;">self</span>.__cb = cb
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> call<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, <span style="color: #66cc66;">*</span>args, <span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.__cb<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>args, <span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> setCallback<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, newCb<span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.__cb = newCb
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> callback<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.__cb
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> restoreCallback<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.__cb = <span style="color: #008000;">self</span>.__defaultCb
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> dynamic<span style="color: black;">&#40;</span>func<span style="color: black;">&#41;</span>:
    cbWrap = Wrapper<span style="color: black;">&#40;</span>func<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> cbWrap.<span style="color: black;">call</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> setCallback<span style="color: black;">&#40;</span>bound, newCb<span style="color: black;">&#41;</span>:
    bound = _getCallable<span style="color: black;">&#40;</span>bound<span style="color: black;">&#41;</span>
    newCb = _getCallable<span style="color: black;">&#40;</span>newCb<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> bound.<span style="color: black;">im_self</span>.<span style="color: black;">setCallback</span><span style="color: black;">&#40;</span>newCb<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> callback<span style="color: black;">&#40;</span>bound<span style="color: black;">&#41;</span>:
    bound = _getCallable<span style="color: black;">&#40;</span>bound<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> bound.<span style="color: black;">im_self</span>.<span style="color: black;">callback</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> restoreCallback<span style="color: black;">&#40;</span>bound<span style="color: black;">&#41;</span>:
    bound = _getCallable<span style="color: black;">&#40;</span>bound<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> bound.<span style="color: black;">im_self</span>.<span style="color: black;">restoreCallback</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> _getCallable<span style="color: black;">&#40;</span>req<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">callable</span><span style="color: black;">&#40;</span>req<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> req
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">type</span><span style="color: black;">&#40;</span>req<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">is</span> <span style="color: #008000;">str</span>:
        g = <span style="color: #dc143c;">sys</span>._getframe<span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>.<span style="color: black;">f_globals</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> g<span style="color: black;">&#91;</span>req<span style="color: black;">&#93;</span></pre></td></tr></table></div>

<p>I&#8217;ve removed any comments or docstrings for the sake of brevity.</p>
<p><strong>About Decorators</strong></p>
<p>The import line I said was of particular interest. Well it is but only in the sense that it will allow you to use the module in which the features are implemented&#8230; Moving on quickly.</p>
<p>The real fun is with the <code>@dynamic</code> decorator. What is a decorator and what happens when we use one (or this one in particular)? Before we look at what a decorator is and does, let&#8217;s look at what happens when we define a function.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">def</span> func<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">pass</span></pre></td></tr></table></div>

<p>When a function is defined, what is happening is that an identifier is created in your current scope and this identifier is given the name of your function. Now let&#8217;s add the decorator. A decorator is just a simple function, but a function who&#8217;s purpose is very specific and a function that must return a callable (another function most of the time).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="python">@myDecorator
<span style="color: #ff7700;font-weight:bold;">def</span> func<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">pass</span></pre></td></tr></table></div>

<p>What happens here is that the identifier <code>func</code> is still created but what lies &#8216;in&#8217; this identifier is not the function itself but the result of passing said function to <code>myDecorator</code>. To help you visualize, the above code could just as easily been written like so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">def</span> func<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">pass</span>
func = myDecorator<span style="color: black;">&#40;</span>func<span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p><strong>Let&#8217;s Get Specific</strong></p>
<p>The decorator <code>@dynamic</code> takes your callback and wraps it inside a <code>Wrapper</code> object and returns the <code>call</code> method of this new object. When XSI tries to call what it thinks is just a simple callback it is actually calling the <code>call</code> method of an object that in turn calls your original callback. Whew!</p>
<p>This means that you now have the liberty of querying and editing the <em>callback object</em> and telling it to call something different depending on context. This functionality is provided by the <code>setCallback</code>, <code>callback</code> and <code>restoreCallback</code> functions.</p>
<p>These three functions either take the callback function objects or the callback&#8217;s names (as a string) as arguments.</p>
<p>There are some more particularities to this code such as the use of <code>sys._getframe</code>, the <code>im_self</code> attribute or the use of the <code>call</code> method on the <code>Wrapper</code> object instead of implementing <code>__call__</code> but I think they might be outside the scope of this article. If there are requests for it I can expand in the comments or another post.</p>
<p>Meanwhile you can <a href='http://www.xsi-blog.com/userContent/upload/2008/06/dynamiccallbacks.zip'>download the example</a>. Drop the plugin into a plugin folder (user, factory or workgroup) and drop the <em>vg</em> folder somewhere in your Python path.</p>
<p>Cheers!</p>

<p><a href="http://feeds.feedburner.com/~a/xsi-blog/content?a=XLwsN4"><img src="http://feeds.feedburner.com/~a/xsi-blog/content?i=XLwsN4" border="0"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=PSgCci"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=PSgCci" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=TnvMlI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=TnvMlI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=QZI63I"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=QZI63I" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=hIpeEI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=hIpeEI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/xsi-blog/content/~4/310052763" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xsi-blog.com/archives/265/feed</wfw:commentRss>
		<feedburner:origLink>http://www.xsi-blog.com/archives/265</feedburner:origLink></item>
		<item>
		<title>Proxy Select And Anticipating A User’s Needs</title>
		<link>http://feeds.feedburner.com/~r/xsi-blog/content/~3/307501680/263</link>
		<comments>http://www.xsi-blog.com/archives/263#comments</comments>
		<pubDate>Sun, 08 Jun 2008 19:09:41 +0000</pubDate>
		<dc:creator>Patrick Boucher</dc:creator>
		
		<category><![CDATA[Plugins]]></category>

		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=263</guid>
		<description><![CDATA[Two weeks ago Bryan Blevins, CG Supervisor at Wild Canary, asked a question on the Softimage&#124;Net community about the possibility of doing proxy selects.
You all remember the idea of a proxy parameter where editing a parameter in a custom PPG (lets call this one the source) will in fact be changing another elsewhere in the [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago Bryan Blevins, CG Supervisor at <a title="Wild Canary" href="http://www.wildcanary.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.wildcanary.com');" target="_blank">Wild Canary</a>, asked a question on the <a title="Softimage|Net" href="http://community.softimage.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/community.softimage.com');" target="_blank">Softimage|Net</a> community about the <a href="http://community.softimage.com/showthread.php?t=1361" onclick="javascript:pageTracker._trackPageview('/outbound/article/community.softimage.com');" target="_blank">possibility of doing proxy selects</a>.</p>
<p>You all remember the idea of a proxy parameter where editing a parameter in a custom PPG (lets call this one the source) will in fact be changing another elsewhere in the scene (this one we will call the target). Extend this idea to a selection where selecting a source will in fact &#8216;transfer&#8217; the selection to another object. This could be useful, among other cases, in a rigging scenario.</p>
<p>As it was suggested in the thread, there are many use cases for a functionality like this that can be addressed with native XSI tools and methodologies but nonetheless, I felt like there might be some cases where an actual proxy select could be useful. So I cooked one up for Bryan, and <a title="Proxy Select" href="http://www.xsi-blog.com/userContent/upload/2008/06/proxyselect.zip" onclick="javascript:pageTracker._trackPageview('/downloads/userContent/upload/2008/06/proxyselect.zip');">here it is</a>.</p>
<p>Select one or more targets and then go to Get -&gt; Property -&gt; Proxy Select and then pick one or more source objects. From then on whenever you select a source object, it will unselect itself and select the targets instead. There is some sanity checking in there to try and avoid dependency loops and the like, just in case.</p>
<p>There are also three menu items in the MCP Select menu that will toggle proxy select functionality in six different ways.</p>
<ul>
<li>Toggle on proxy select for all objects - when nothing is selected</li>
<li>Toggle off proxy select for all objects - when nothing is selected</li>
<li>Toggle/Inverse proxy select state for all objects - when nothing is selected</li>
<li>Toggle on proxy select for selected objects</li>
<li>Toggle off proxy select for selected objects</li>
<li>Toggle/Inverse proxy select state for selected objects</li>
</ul>
<p>I can already hear you asking: &#8220;How can I select a proxy select source to toggle it&#8217;s functionality if it is already on and automatically transfers it&#8217;s selection?&#8221;</p>
<p>Well,</p>
<ul>
<li>If it is only one object you wish to toggle you can go directly to it&#8217;s Proxy Select custom property.</li>
<li>If you wish to act on multiple objects with these toggle menus, you can multi select the objects and toggle them all together. When multiple objects are selected, no selection transfer takes place.</li>
<li>This also means that you can multi select a proxy select source with any other object and then use the menu items, any object that isn&#8217;t a proxy select source will be safely ignored.</li>
</ul>
<p><strong>And then came Thiago</strong></p>
<p>One of the people involved in the thread was Thiago Costa from <a href="http://www.nervo.tv/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.nervo.tv');" target="_blank">Nervo.tv</a>. He is actually the one who suggested an approach for creating the Proxy Select plugin in the first place. Well, about the same time I had sent Bryan my first draft Thiago posted <a href="http://community.softimage.com/showthread.php?p=5744#poststop" onclick="javascript:pageTracker._trackPageview('/outbound/article/community.softimage.com');" target="_blank">his version</a>. I said it in the thread and I will say it again, it is very nicely executed.</p>
<p>One of the things he did is that he anticipated the user&#8217;s needs and thought for a second about what you would like to do with the resulting select.</p>
<p>Something that happens to often (well for me anyway), and especially in the heat of production, is that we fail to properly establish requirements.</p>
<p><em>These requirement will inevitably change.<br />
</em></p>
<p>When the first wave of requirements is put down on paper some time should be spent trying to anticipate the user&#8217;s needs as well as possible future requirements. Even if these extra features aren&#8217;t initially implemented, having this foresight will allow the resulting code to better accomodate change.</p>
<p><strong>Downloads</strong></p>
<p>Check out the <a href="http://community.softimage.com/showthread.php?p=5744#poststop" onclick="javascript:pageTracker._trackPageview('/outbound/article/community.softimage.com');" target="_blank">thread at Softimage|Net</a> for Thiago&#8217;s version.</p>
<p>Download my version from <a href="http://www.xsi-blog.com/userContent/upload/2008/06/proxyselect.zip" onclick="javascript:pageTracker._trackPageview('/downloads/userContent/upload/2008/06/proxyselect.zip');">here</a>.</p>

<p><a href="http://feeds.feedburner.com/~a/xsi-blog/content?a=Kwx1Bu"><img src="http://feeds.feedburner.com/~a/xsi-blog/content?i=Kwx1Bu" border="0"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=amxiJi"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=amxiJi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=ZlscVI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=ZlscVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=GRZCcI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=GRZCcI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=O5yyTI"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=O5yyTI" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/xsi-blog/content/~4/307501680" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xsi-blog.com/archives/263/feed</wfw:commentRss>
		<feedburner:origLink>http://www.xsi-blog.com/archives/263</feedburner:origLink></item>
		<item>
		<title>Bump Filtering in the Rendertree</title>
		<link>http://feeds.feedburner.com/~r/xsi-blog/content/~3/297321684/262</link>
		<comments>http://www.xsi-blog.com/archives/262#comments</comments>
		<pubDate>Sat, 24 May 2008 17:48:40 +0000</pubDate>
		<dc:creator>Stefano Jannuzzo</dc:creator>
		
		<category><![CDATA[Texturing]]></category>

		<category><![CDATA[aliasing]]></category>

		<category><![CDATA[bump]]></category>

		<category><![CDATA[filter]]></category>

		<category><![CDATA[normal]]></category>

		<category><![CDATA[texture]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=262</guid>
		<description><![CDATA[The current bump node (formerly known as zbump) became very popular for its simplicity, and for its ability to get procedural textures as inputs.
However, it has some limitations, for instance not supporting texture pre-filtering, and the fact that its spacing is expressed in world coordinates instead of uv coordinates like the old node. This leads [...]]]></description>
			<content:encoded><![CDATA[<p>The current bump node (formerly known as zbump) became very popular for its simplicity, and for its ability to get procedural textures as inputs.</p>
<p>However, it has some limitations, for instance not supporting texture pre-filtering, and the fact that its spacing is expressed in world coordinates instead of uv coordinates like the old node. This leads to frequent aliasing problems, that can sometimes be limited by texturing the spacing based on the object&#8217;s distance from the camera.</p>
<p>Another way of fixing the aliasing is to filter the high frequencies of the input texture. The primary way to achieve this filtering is to do it on the image in an editing program like Photoshop, but this is harder to do with procedural nodes.</p>
<p>However, by using a few nodes in the rendertree, it is possible to do it there also.</p>
<p><span id="more-262"></span>The bump node outputs the new normal (N&#8217;), after having bent the original one (N) based on the texture gradient at the current point.</p>
<p>So, we can compare N to N&#8217; by subtracting them and getting the length (L) of this difference vector (D). Since N and N&#8217; are normalized, and the maximum bump angle is 90 degrees, D ranges from 0 (no bump) to 1.41, ie the hypotenuse of a right triangle with unit catheti.</p>
<p>We can then set a maximum length for D, and re-arrange N&#8217; in order not to exceed it, so to filter off the high frequencies and limit the aliasing.</p>
<p>In this first rendertree, we simply want to check the &#8220;dangerous&#8221; zones. We take the length (L) of the normal&#8217;s difference (D) and check it against a maximum scalar. If this scalar is exceeded red is returned or green otherwise.</p>
<p>In this example the scalar is set to 1, we are seeing in red the parts where the bending angle exceeds 60 degrees.</p>
<p><a href="http://www.xsi-blog.com/userContent/sjannuzzo/2008/05/bf.1.jpg" ><img src='http://www.xsi-blog.com/userContent/sjannuzzo/2008/05/bf.1.jpg' alt='' class='alignnone' /></a></p>
<p>To output the filtered normal, we do the same test as above, but connected to a scalar switch.<br />
The switcher outputs the maximum between Max Displacement and L. This value is used to set the new length of D (VectorNormalize + VectorSetLength).</p>
<p>This vector is then added to the original normal N and normalized. This is our new, filtered normal.</p>
<p><a href="http://www.xsi-blog.com/userContent/sjannuzzo/2008/05/bf.2.jpg" ><img src='http://www.xsi-blog.com/userContent/sjannuzzo/2008/05/bf.2.jpg' alt='' class='alignnone' /></a></p>
<p>Of course this is a very basic filter, more complex ones can easily be built to fit your needs.</p>
<p>You can <a href="http://www.xsi-blog.com/userContent/sjannuzzo/2008/05/BumpFiltering.scn.zip" onclick="javascript:pageTracker._trackPageview('/downloads/userContent/sjannuzzo/2008/05/BumpFiltering.scn.zip');">grab the scene</a> if you want. The red and green subtree is also included, connected to the shadow port.</p>

<p><a href="http://feeds.feedburner.com/~a/xsi-blog/content?a=EhXNLL"><img src="http://feeds.feedburner.com/~a/xsi-blog/content?i=EhXNLL" border="0"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=PPqHqh"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=PPqHqh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=ZlJu5H"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=ZlJu5H" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=moRKaH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=moRKaH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=H8CrPH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=H8CrPH" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/xsi-blog/content/~4/297321684" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xsi-blog.com/archives/262/feed</wfw:commentRss>
		<feedburner:origLink>http://www.xsi-blog.com/archives/262</feedburner:origLink></item>
		<item>
		<title>Object oriented programming, once again.</title>
		<link>http://feeds.feedburner.com/~r/xsi-blog/content/~3/294305901/260</link>
		<comments>http://www.xsi-blog.com/archives/260#comments</comments>
		<pubDate>Tue, 20 May 2008 14:32:24 +0000</pubDate>
		<dc:creator>Helge Mathee</dc:creator>
		
		<category><![CDATA[JScript]]></category>

		<category><![CDATA[Modeling]]></category>

		<category><![CDATA[Programming / Scripting]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=260</guid>
		<description><![CDATA[So the keen folks at the german XSI forum (http://www.xsiforum.de) discussed the topic of generating separate objects out of all of the polygon islands making up a polygonmesh. Even though this doesn&#8217;t seem to be a too tricky scripting problem, using commands to achieve this split-up can slow down XSI quite alot, especially if the [...]]]></description>
			<content:encoded><![CDATA[<p>So the keen folks at the german XSI forum (<a href="http://www.xsiforum.de" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.xsiforum.de');">http://www.xsiforum.de</a>) discussed the topic of generating separate objects out of all of the polygon islands making up a polygonmesh. Even though this doesn&#8217;t seem to be a too tricky scripting problem, using commands to achieve this split-up can slow down XSI quite alot, especially if the source mesh contains a huge amount of polygon islands. Therefore I tried to come up with a object oriented solution, and here it is.<br />
<span id="more-260"></span></p>
<p>I put some effort into commenting the script accordingly, so that it may be used for learning purposes.</p>
<p>cheers!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
</pre></td><td class="code"><pre class="javascript"><span style="color: #006600; font-style: italic;">// query the geometry data</span>
<span style="color: #003366; font-weight: bold;">var</span> obj <span style="color: #339933;">=</span> selection<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> geo <span style="color: #339933;">=</span> obj.<span style="color: #006600;">Activeprimitive</span>.<span style="color: #006600;">Geometry</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> polygons <span style="color: #339933;">=</span> geo.<span style="color: #006600;">Polygons</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// create an array to track which polygon has been visited</span>
<span style="color: #003366; font-weight: bold;">var</span> polygonVisited <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> polygonsLeft <span style="color: #339933;">=</span> polygons.<span style="color: #006600;">Count</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// fill up the array to say: &quot;no polygon has been visited yet&quot;</span>
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>polygons .<span style="color: #006600;">count</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	polygonVisited<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// create some helper variables</span>
<span style="color: #003366; font-weight: bold;">var</span> clusterIndices <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> currentRow <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// log the start of the process</span>
logmessage<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Starting with &quot;</span><span style="color: #339933;">+</span>polygonsLeft<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot; polygons...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// loop until there are no polygons left</span>
<span style="color: #006600; font-style: italic;">// or there are still items in the cluster array</span>
<span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>polygonsLeft <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">||</span> clusterIndices.<span style="color: #006600;">length</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// if there are no items in the next row...</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>currentRow.<span style="color: #006600;">length</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">// if there are items in the cluster index array</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>clusterIndices.<span style="color: #006600;">length</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #006600; font-style: italic;">// log the creation of the cluster</span>
			logmessage<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Creating cluster with &quot;</span><span style="color: #339933;">+</span>clusterIndices.<span style="color: #006600;">length</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot; elements...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #006600; font-style: italic;">// create a new mesh containing all of these polygons</span>
			<span style="color: #006600; font-style: italic;">// first, create an array containing all pointindices</span>
			<span style="color: #006600; font-style: italic;">// and two additional point hash arrays</span>
			<span style="color: #006600; font-style: italic;">// of which one is used to determine if a point is already used</span>
			<span style="color: #006600; font-style: italic;">// and the second one is used to map the original index to the new one</span>
			<span style="color: #003366; font-weight: bold;">var</span> pointIndices <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> pointUsed <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> pointNewIndex <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>clusterIndices.<span style="color: #006600;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #003366; font-weight: bold;">var</span> poly <span style="color: #339933;">=</span> polygons.<span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#40;</span>clusterIndices<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #003366; font-weight: bold;">var</span> pointIndexArray <span style="color: #339933;">=</span> poly.<span style="color: #006600;">points</span>.<span style="color: #006600;">indexArray</span>.<span style="color: #006600;">toArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//(VBS to JScript conversion)</span>
&nbsp;
				<span style="color: #006600; font-style: italic;">// loop through all points and check if it they are used</span>
				<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> j<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>j<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>pointIndexArray.<span style="color: #006600;">length</span><span style="color: #339933;">;</span>j<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					<span style="color: #003366; font-weight: bold;">var</span> index <span style="color: #339933;">=</span> pointIndexArray<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>pointUsed<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
					<span style="color: #009900;">&#123;</span>
						pointNewIndex<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> pointIndices.<span style="color: #006600;">length</span><span style="color: #339933;">;</span>
						pointIndices.<span style="color: #006600;">push</span><span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						pointUsed<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>	
					<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #006600; font-style: italic;">// now, create the array of the positions of all points of this island</span>
			<span style="color: #003366; font-weight: bold;">var</span> islandPos <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>pointIndices.<span style="color: #006600;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #003366; font-weight: bold;">var</span> point <span style="color: #339933;">=</span> geo.<span style="color: #006600;">points</span>.<span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#40;</span>pointIndices<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				islandPos.<span style="color: #006600;">push</span><span style="color: #009900;">&#40;</span>point.<span style="color: #006600;">position</span>.<span style="color: #006600;">x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				islandPos.<span style="color: #006600;">push</span><span style="color: #009900;">&#40;</span>point.<span style="color: #006600;">position</span>.<span style="color: #006600;">y</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				islandPos.<span style="color: #006600;">push</span><span style="color: #009900;">&#40;</span>point.<span style="color: #006600;">position</span>.<span style="color: #006600;">z</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #006600; font-style: italic;">// now we need to create the description of the polygons</span>
			<span style="color: #003366; font-weight: bold;">var</span> islandPoly <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #006600; font-style: italic;">// for that we loop over the polygons of the island again</span>
			<span style="color: #006600; font-style: italic;">// and record their pointindices, well, actually the remapped</span>
			<span style="color: #006600; font-style: italic;">// indices (given by the pointNewIndex hash array)</span>
			<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>clusterIndices.<span style="color: #006600;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #003366; font-weight: bold;">var</span> poly <span style="color: #339933;">=</span> polygons.<span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#40;</span>clusterIndices<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #003366; font-weight: bold;">var</span> pointIndexArray <span style="color: #339933;">=</span> poly.<span style="color: #006600;">points</span>.<span style="color: #006600;">indexArray</span>.<span style="color: #006600;">toArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//(VBS to JScript conversion)</span>
&nbsp;
				<span style="color: #006600; font-style: italic;">// first add the number of points of this polygon </span>
				<span style="color: #006600; font-style: italic;">// to this polygon's description</span>
				islandPoly.<span style="color: #006600;">push</span><span style="color: #009900;">&#40;</span>pointIndexArray.<span style="color: #006600;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #006600; font-style: italic;">// now add the remapped index for each point to the description</span>
				<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> j<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>j<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>pointIndexArray.<span style="color: #006600;">length</span><span style="color: #339933;">;</span>j<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					<span style="color: #003366; font-weight: bold;">var</span> index <span style="color: #339933;">=</span> pointIndexArray<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
					islandPoly.<span style="color: #006600;">push</span><span style="color: #009900;">&#40;</span>pointNewIndex<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			obj.<span style="color: #006600;">Parent</span>.<span style="color: #006600;">AddPolygonMesh</span><span style="color: #009900;">&#40;</span>islandPos<span style="color: #339933;">,</span>islandPoly<span style="color: #339933;">,</span>obj.<span style="color: #000066;">name</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;_island&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			clusterIndices <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #006600; font-style: italic;">// if there are no polyons left we can stop now</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>polygonsLeft <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
				<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// loop over the polygons and try to find </span>
		<span style="color: #006600; font-style: italic;">// one which hasn't been visited yet</span>
		<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>polygons.<span style="color: #006600;">Count</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>polygonVisited<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				currentRow.<span style="color: #006600;">push</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				clusterIndices.<span style="color: #006600;">push</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				polygonVisited<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
				polygonsLeft<span style="color: #339933;">--;</span>
				<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// define the nextrow after the current row</span>
	<span style="color: #003366; font-weight: bold;">var</span> nextRow <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// loop over all items in the current row</span>
	<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>currentRow.<span style="color: #006600;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> polygon <span style="color: #339933;">=</span> polygons.<span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#40;</span>currentRow<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> neighbors <span style="color: #339933;">=</span> polygon.<span style="color: #006600;">NeighborPolygons</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// loop through all of the neighbors and add them to the nextRow</span>
		<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> j<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>j<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>neighbors.<span style="color: #006600;">count</span><span style="color: #339933;">;</span>j<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #006600; font-style: italic;">// check if the neighbor has been</span>
			<span style="color: #006600; font-style: italic;">// visited yet</span>
			<span style="color: #003366; font-weight: bold;">var</span> neighbor <span style="color: #339933;">=</span> neighbors.<span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#40;</span>j<span style="color: #009900;">&#41;</span>.<span style="color: #006600;">index</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>polygonVisited<span style="color: #009900;">&#91;</span>neighbor<span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #006600; font-style: italic;">// add the neighbor to the next row</span>
				nextRow.<span style="color: #006600;">push</span><span style="color: #009900;">&#40;</span>neighbor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				clusterIndices.<span style="color: #006600;">push</span><span style="color: #009900;">&#40;</span>neighbor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				polygonVisited<span style="color: #009900;">&#91;</span>neighbor<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
				polygonsLeft<span style="color: #339933;">--;</span>
				<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	currentRow <span style="color: #339933;">=</span> nextRow<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
selection.<span style="color: #006600;">SetAsText</span><span style="color: #009900;">&#40;</span>obj.<span style="color: #000066;">name</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;_island*&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>


<p><a href="http://feeds.feedburner.com/~a/xsi-blog/content?a=LxAUiK"><img src="http://feeds.feedburner.com/~a/xsi-blog/content?i=LxAUiK" border="0"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=pTWCdh"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=pTWCdh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=BAOInH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=BAOInH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=xMnXmH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=xMnXmH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=lHILTH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=lHILTH" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/xsi-blog/content/~4/294305901" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xsi-blog.com/archives/260/feed</wfw:commentRss>
		<feedburner:origLink>http://www.xsi-blog.com/archives/260</feedburner:origLink></item>
		<item>
		<title>An alternative to XSI’s tail spring op</title>
		<link>http://feeds.feedburner.com/~r/xsi-blog/content/~3/286026447/259</link>
		<comments>http://www.xsi-blog.com/archives/259#comments</comments>
		<pubDate>Thu, 08 May 2008 11:05:55 +0000</pubDate>
		<dc:creator>Helge Mathee</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=259</guid>
		<description><![CDATA[Hey gang,
working on some characters with secondary motion I came up with a pretty simple spring op including some caching / plotting functionality and thought I&#8217;d share it.


It is a very basic radial spring, which comes with a DisplayInfo to control all parameters through the viewport. Additionally the objects created are put in groups for [...]]]></description>
			<content:encoded><![CDATA[<p>Hey gang,</p>
<p>working on some characters with secondary motion I came up with a pretty simple spring op including some caching / plotting functionality and thought I&#8217;d share it.<br />
<span id="more-259"></span></p>
<p><img src="http://217.160.138.15/helge/rigtut/mt_spring.jpg"/></p>
<p>It is a very basic radial spring, which comes with a DisplayInfo to control all parameters through the viewport. Additionally the objects created are put in groups for your convenience.</p>
<p>Here&#8217;s a video demonstrating the addon:<br />
<a href="http://217.160.138.15/helge/rigtut/mt_spring.avi" onclick="javascript:pageTracker._trackPageview('/outbound/article/217.160.138.15');">http://217.160.138.15/helge/rigtut/mt_spring.avi (Encoded in Techsmith Camtasia, 51 MB)</a></p>
<p>And finally, here&#8217;s the link to the addon:<br />
<a href="http://217.160.138.15/helge/rigtut/mt_spring_addon.zip" onclick="javascript:pageTracker._trackPageview('/outbound/article/217.160.138.15');">http://217.160.138.15/helge/rigtut/mt_spring_addon.zip</a></p>

<p><a href="http://feeds.feedburner.com/~a/xsi-blog/content?a=W82a60"><img src="http://feeds.feedburner.com/~a/xsi-blog/content?i=W82a60" border="0"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=g2yLCh"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=g2yLCh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=WuHCfH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=WuHCfH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=znsHPH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=znsHPH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=02H5QH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=02H5QH" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/xsi-blog/content/~4/286026447" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xsi-blog.com/archives/259/feed</wfw:commentRss>
<enclosure url="http://217.160.138.15/helge/rigtut/mt_spring.avi" length="51641344" type="video/x-msvideo" />
		<feedburner:origLink>http://www.xsi-blog.com/archives/259</feedburner:origLink></item>
		<item>
		<title>Technological Choices</title>
		<link>http://feeds.feedburner.com/~r/xsi-blog/content/~3/274446847/258</link>
		<comments>http://www.xsi-blog.com/archives/258#comments</comments>
		<pubDate>Mon, 21 Apr 2008 04:32:02 +0000</pubDate>
		<dc:creator>Patrick Boucher</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=258</guid>
		<description><![CDATA[When you start building new tools or a new pipeline you have to answer quite a few artist-centric questions such as what you want these tools to do and how they will fit into the workflow. You also have to answer a few technical questions unless you might wind up in a quagmire consisting of [...]]]></description>
			<content:encoded><![CDATA[<p>When you start building new tools or a new pipeline you have to answer quite a few artist-centric questions such as what you want these tools to do and how they will fit into the workflow. You also have to answer a few technical questions unless you might wind up in a quagmire consisting of disparate tools, unmaintainable code and longer than necessary development times.</p>
<p>Some of the choices that need to be addressed are the technological choices of tools, systems, libraries and techniques.</p>
<p>Which tools and technologies should you use and why? I won&#8217;t pretend to be suggesting the holy grail of tool chests. I just felt like sharing the choices I&#8217;ve made and why I made them. Please don&#8217;t hesitate and comment if you think I&#8217;m off base, you have questions or would like to suggest other alternatives that you use. I&#8217;d love to hear, and learn, from you!</p>
<p><span id="more-258"></span><strong>Core Tools and Systems</strong></p>
<p>My preferred programming language as you may (or may not) have noticed, is <a title="Python" href="http://www.python.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.python.org');">Python</a>. It has clean and concise syntax, an object oriented approach second to none in dynamic languages, and a standard library that provides most of the functionality you&#8217;ll ever need. It has almost become the defacto language in our industry with support in XSI, Maya, Houdini and RealFlow just to name a few. With Python you can code system tools, CG application plugins and scripts, standalone applications, web applications as well as custom libraries to back all of these up. The language is evolving and has strong community and industry support. Need I say more?</p>
<p>On the server I run Linux. Wouldn&#8217;t have it any other way. Actually, right now I&#8217;ve been forced into running a pipeline off a Windows box and I hate it to death! I can already hear you asking: &#8220;Which linux distribution?&#8221; On the server, honestly, I don&#8217;t really care. I&#8217;ve often built all my applications from scratch according to a technique a friend has taught me. This guy was, at one point or another in his career, senior systems administrator for the likes of Hydro-Quebec and Teleglobe - I tend to trust him in IT matters.</p>
<p>On top of the OS I like to run <a href="http://httpd.apache.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/httpd.apache.org');">Apache</a> with <a href="http://www.modpython.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.modpython.org');">mod_python</a> for all my web serving needs and <a title="MySQL" href="http://www.mysql.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mysql.com');">MySQL</a> for database needs. Apache is by far the most versatile web server I&#8217;ve worked with and with a few cnames in your DNS and virtual hosts in Apache you can be very organized in your web applications. As far as MySQL goes, it is free, well hooked into a multitude of languages, and very stable. Until recently it didn&#8217;t have any stored procedures but that&#8217;s the kind of stuff I like to keep in my application logic anyway. To make easy MySQL management even easier I&#8217;ll also build a vhost in my apache dedicated to serving <a title="PHPMyAdmin" href="http://www.phpmyadmin.net/home_page/index.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.phpmyadmin.net');">phpMyAdmin</a>, by far the best web front end for MySQL.</p>
<p><em>Note</em>: With the purchase of MySQL by Sun and after a few discussions with a friend, I think I&#8217;ll be looking heavily into <a title="PostgreSQL" href="http://www.postgresql.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.postgresql.org');">PostgreSQL</a>.</p>
<p>The last thing I usually install onto the system is <a title="Subversion" href="http://subversion.tigris.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/subversion.tigris.org');">Subversion</a>. Even if you&#8217;re a lone developer I think source code control is invaluable in helping you track not only code changes but also release cycles and versions. Also look at installing Subversion and/or <a title="TortoiseSVN" href="http://tortoisesvn.tigris.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/tortoisesvn.tigris.org');">TortoiseSVN</a> on your development station to make interfacing with the server easier.</p>
<p><strong>Libraries</strong></p>
<p>To help build the web applications you&#8217;re probably going to be needing, look into <a title="Django" href="http://www.djangoproject.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.djangoproject.com');">Django</a>. It&#8217;s biggest assets for me are it&#8217;s Model and Object Relational Mapper (ORM) as well as it&#8217;s template language. Django is also built in such a modular fashion that you can use the template language in standalone applications that need to build static HTML pages or you can use it&#8217;s ORM in XSI tools that need to access a Database. This means you can build a whole lot of application logic in such a way that it is highly decoupled from either the database or the ui. Django can really break out from the web, this shouldn&#8217;t be forgotten. <a title="SQLAlchemy" href="http://www.sqlalchemy.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sqlalchemy.org');">SQLAlchemy</a> also exists as far as ORM layers go but it doesn&#8217;t jive as well with me and obviously doesn&#8217;t offer an end to end solution if you&#8217;re building a web app.</p>
<p>On the networking side, I&#8217;ve started tinkering with <a title="Twisted" href="http://twistedmatrix.com/trac/" onclick="javascript:pageTracker._trackPageview('/outbound/article/twistedmatrix.com');">Twisted</a>. Wow. This is definitely going to be a part of my standard set of tools. When building more complex systems that need to interact over the network Twisted&#8217;s protocol building facilities are simply wicked! Some of it&#8217;s constructs needed a bit of getting used to for me, see the deferred, but once I got a handle on them I saw how they can get quite powerful.</p>
<p>Finally, on the UI side for standalone applications, I&#8217;ve fallen in love with <a title="Trolltech" href="http://trolltech.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/trolltech.com');">QT</a>. I had used <a title="Perl/Tk" href="http://www.perltk.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.perltk.org');">Tk</a> and <a title="WxWidgets" href="http://www.wxwidgets.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.wxwidgets.org');">WxWidgets</a> in the past but they definitely don&#8217;t compare to QT. And QT is much more than UI, it is also networking, OpenGL, threading, etc&#8230; To get QT and Python working together you&#8217;ll need <a title="PyQT" href="http://www.riverbankcomputing.co.uk/pyqt/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.riverbankcomputing.co.uk');">PyQT</a> whose latest version includes everything you need to get started, including QT itself. I know that from the UI perspective XSI allready offers much of what we need in its PPGs but if you are in a mixed pipeline, think Maya and XSI, there is some merit in using a UI toolkit that you can run in both applications to cut down on the amount of code you&#8217;ll be doing.</p>
<p><strong>Techniques</strong></p>
<p>One of my self imposed rules is the maximum length of a function or method. If I can&#8217;t fit it into a single screen it is probably too long and I should rethink it and split it up.</p>
<p>I am also trying to better my documentation. I like self documentation through variable names so you&#8217;ll often find rather verbose symbol names in my code. With a proper IDE that does name completion the burden on typing isn&#8217;t so big. I also try to do a first draft of my functions or methods in pure comment form. This gets my ideas out quickly while they are fresh without bogging me down in details. The comments also wind up being present in the final code thus helping out comprehension of the program. Finally I try, and often fail miserably ;), to use Python&#8217;s docstrings to document public interfaces.</p>
<p>One of the latest things I want to impose upon myself is unit testing. Especially for my libraries. Some detractors of dynamic languages will gripe about type safety and they would be right. That&#8217;s why you test. And testing not only helps with types but also algorithms, refactoring, logic, etc&#8230; If your application breaks in one way or another, proper testing can help find the break sooner than later. On the subject of unit testing libraries check out <a title="Unit testing lib roundup." href="http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-3-pytest-tool.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/agiletesting.blogspot.com');">this nice roundup</a>. I&#8217;m currently leaning towards py.test.</p>
<p><strong>Bored yet?</strong></p>
<p>I hope you&#8217;re not bored out of your mind yet! Were you really expecting me not to totally geek out in an article entitled &#8220;Technological Choices&#8221;?</p>
<p>Cheers!</p>

<p><a href="http://feeds.feedburner.com/~a/xsi-blog/content?a=0sxTSc"><img src="http://feeds.feedburner.com/~a/xsi-blog/content?i=0sxTSc" border="0"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=9dp8Yh"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=9dp8Yh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=gspC7H"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=gspC7H" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=WXuYYH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=WXuYYH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=hTOTxH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=hTOTxH" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/xsi-blog/content/~4/274446847" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xsi-blog.com/archives/258/feed</wfw:commentRss>
		<feedburner:origLink>http://www.xsi-blog.com/archives/258</feedburner:origLink></item>
		<item>
		<title>XSIBlog, meet Feedburner</title>
		<link>http://feeds.feedburner.com/~r/xsi-blog/content/~3/274092781/257</link>
		<comments>http://www.xsi-blog.com/archives/257#comments</comments>
		<pubDate>Sun, 20 Apr 2008 14:18:26 +0000</pubDate>
		<dc:creator>Patrick Boucher</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=257</guid>
		<description><![CDATA[I&#8217;ve finally decided to pipe the site&#8217;s RSS Feeds through Feedburner.
Update your subscriptions if you wish. The links can be found in the footer, entries to the left and comments to the right.
Cheers!
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally decided to pipe the site&#8217;s RSS Feeds through <a title="Feedburner" href="http://www.feedburner.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.feedburner.com');">Feedburner</a>.</p>
<p>Update your subscriptions if you wish. The links can be found in the footer, <a title="XSIBlog article feed" href="http://feeds.feedburner.com/xsi-blog/content" onclick="javascript:pageTracker._trackPageview('/outbound/article/feeds.feedburner.com');">entries</a> to the left and <a title="XSIBlog comment feed" href="http://feeds.feedburner.com/xsi-blog/comments" onclick="javascript:pageTracker._trackPageview('/outbound/article/feeds.feedburner.com');">comments</a> to the right.</p>
<p>Cheers!</p>

<p><a href="http://feeds.feedburner.com/~a/xsi-blog/content?a=HQHixd"><img src="http://feeds.feedburner.com/~a/xsi-blog/content?i=HQHixd" border="0"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=ADegYh"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=ADegYh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=34bbNH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=34bbNH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=GuOl4H"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=GuOl4H" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/xsi-blog/content?a=73p6pH"><img src="http://feeds.feedburner.com/~f/xsi-blog/content?i=73p6pH" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/xsi-blog/content/~4/274092781" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xsi-blog.com/archives/257/feed</wfw:commentRss>
		<feedburner:origLink>http://www.xsi-blog.com/archives/257</feedburner:origLink></item>
	</channel>
</rss>
