<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: djFileSwitchRamp.mel &amp; djPopulateSingleSwitch.mel</title>
	<atom:link href="http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/</link>
	<description>more serious than before (in a good way)</description>
	<lastBuildDate>Sat, 17 Jul 2010 03:58:27 +1000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: agenesis</title>
		<link>http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/comment-page-1/#comment-10442</link>
		<dc:creator>agenesis</dc:creator>
		<pubDate>Fri, 04 Dec 2009 06:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.djx.com.au/blog/?p=150#comment-10442</guid>
		<description>Hi David,

Sorry I did not get back to you with my thanks earlier ... I just checked back in now.

Your original script came in handy big time over the summer, thanks a million for that, and also for looking into the instancing scenario.  I&#039;m grabbing a copy of it now and will test it out as soon as I can.

As usual your blog is awesome.  I look forward to seeing more soon.

Best Regards,

Matt</description>
		<content:encoded><![CDATA[<p>Hi David,</p>
<p>Sorry I did not get back to you with my thanks earlier ... I just checked back in now.</p>
<p>Your original script came in handy big time over the summer, thanks a million for that, and also for looking into the instancing scenario.  I'm grabbing a copy of it now and will test it out as soon as I can.</p>
<p>As usual your blog is awesome.  I look forward to seeing more soon.</p>
<p>Best Regards,</p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: agenesis</title>
		<link>http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/comment-page-1/#comment-10443</link>
		<dc:creator>agenesis</dc:creator>
		<pubDate>Fri, 04 Dec 2009 06:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.djx.com.au/blog/?p=150#comment-10443</guid>
		<description>Hi David,

Sorry I did not get back to you with my thanks earlier ... I just checked back in now.

Your original script came in handy big time over the summer, thanks a million for that, and also for looking into the instancing scenario.  I&#039;m grabbing a copy of it now and will test it out as soon as I can.

As usual your blog is awesome.  I look forward to seeing more soon.

Best Regards,

Matt</description>
		<content:encoded><![CDATA[<p>Hi David,</p>
<p>Sorry I did not get back to you with my thanks earlier ... I just checked back in now.</p>
<p>Your original script came in handy big time over the summer, thanks a million for that, and also for looking into the instancing scenario.  I'm grabbing a copy of it now and will test it out as soon as I can.</p>
<p>As usual your blog is awesome.  I look forward to seeing more soon.</p>
<p>Best Regards,</p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/comment-page-1/#comment-10425</link>
		<dc:creator>david</dc:creator>
		<pubDate>Mon, 07 Sep 2009 15:01:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.djx.com.au/blog/?p=150#comment-10425</guid>
		<description>agenesis: I finally got some time to look into the instance question. I have added an extra script to the rar download that seems to work. I have not had time to test it fully. Eventually I may combine the two scripts into one and add proper error checking, but this will have to do for now.</description>
		<content:encoded><![CDATA[<p>agenesis: I finally got some time to look into the instance question. I have added an extra script to the rar download that seems to work. I have not had time to test it fully. Eventually I may combine the two scripts into one and add proper error checking, but this will have to do for now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/comment-page-1/#comment-10413</link>
		<dc:creator>david</dc:creator>
		<pubDate>Sun, 16 Aug 2009 13:42:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.djx.com.au/blog/?p=150#comment-10413</guid>
		<description>agenesis: It took me a while to be able to look into your question. In the populateSingleSwitch script objects are assumed to be transformNodes above a single shapeNode, and this assumption breaks when instances are involved. The technique can certainly work with instances, but the script would need some modifications. I will try to find time to do this in the next week or so.</description>
		<content:encoded><![CDATA[<p>agenesis: It took me a while to be able to look into your question. In the populateSingleSwitch script objects are assumed to be transformNodes above a single shapeNode, and this assumption breaks when instances are involved. The technique can certainly work with instances, but the script would need some modifications. I will try to find time to do this in the next week or so.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/comment-page-1/#comment-10408</link>
		<dc:creator>david</dc:creator>
		<pubDate>Thu, 13 Aug 2009 14:26:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.djx.com.au/blog/?p=150#comment-10408</guid>
		<description>To assign random id numbers to s selection of objects, you could select your objects and execute the following mel in the script editor, after changing the rand() statement to an appropriate range (in this example it will set a random integer between 0 and 100):

{
string $sel[] = `ls -sl`;
	for ($s in $sel) {
		int $rnd = rand(0,100);
		setAttr ($s +&quot;.id&quot;) $rnd;
	}
}

It gets a bit more complicated if you need to deal out the numbers randomly, but like a deck of cards, where each number will only be used once. Let me know if that&#039;s what you needed.

As for instances... I&#039;m not sure. If I get some time I&#039;ll give it a try and let you know.</description>
		<content:encoded><![CDATA[<p>To assign random id numbers to s selection of objects, you could select your objects and execute the following mel in the script editor, after changing the rand() statement to an appropriate range (in this example it will set a random integer between 0 and 100):</p>
<p>{<br />
string $sel[] = `ls -sl`;<br />
	for ($s in $sel) {<br />
		int $rnd = rand(0,100);<br />
		setAttr ($s +".id") $rnd;<br />
	}<br />
}</p>
<p>It gets a bit more complicated if you need to deal out the numbers randomly, but like a deck of cards, where each number will only be used once. Let me know if that's what you needed.</p>
<p>As for instances... I'm not sure. If I get some time I'll give it a try and let you know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: agenesis</title>
		<link>http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/comment-page-1/#comment-10407</link>
		<dc:creator>agenesis</dc:creator>
		<pubDate>Wed, 12 Aug 2009 20:28:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.djx.com.au/blog/?p=150#comment-10407</guid>
		<description>is there a way to get this to work with instances?</description>
		<content:encoded><![CDATA[<p>is there a way to get this to work with instances?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: agenesis</title>
		<link>http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/comment-page-1/#comment-10402</link>
		<dc:creator>agenesis</dc:creator>
		<pubDate>Tue, 11 Aug 2009 22:35:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.djx.com.au/blog/?p=150#comment-10402</guid>
		<description>Hi David,

Awesome script!  I&#039;m new to MEL, do you know how to randomly assign a selection of objects different ID nodes, so that the assignment of all the file textures through the switch node and onto the geo is chosen randomly?</description>
		<content:encoded><![CDATA[<p>Hi David,</p>
<p>Awesome script!  I'm new to MEL, do you know how to randomly assign a selection of objects different ID nodes, so that the assignment of all the file textures through the switch node and onto the geo is chosen randomly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rusty</title>
		<link>http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/comment-page-1/#comment-10397</link>
		<dc:creator>rusty</dc:creator>
		<pubDate>Thu, 06 Aug 2009 18:18:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.djx.com.au/blog/?p=150#comment-10397</guid>
		<description>Nice work david,

We&#039;ve used this method to assign random leaf textures to a forest we&#039;ve made. Hundreds of leaves - one shader. Awesome.</description>
		<content:encoded><![CDATA[<p>Nice work david,</p>
<p>We've used this method to assign random leaf textures to a forest we've made. Hundreds of leaves - one shader. Awesome.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: medooch</title>
		<link>http://www.djx.com.au/blog/2009/06/07/djfileswitchrampmel-djpopulatesingleswitchmel/comment-page-1/#comment-10391</link>
		<dc:creator>medooch</dc:creator>
		<pubDate>Mon, 03 Aug 2009 11:35:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.djx.com.au/blog/?p=150#comment-10391</guid>
		<description>Hey David,

This post saved me a bunch of work on a recent project...

Thanks a lot!

Oryan</description>
		<content:encoded><![CDATA[<p>Hey David,</p>
<p>This post saved me a bunch of work on a recent project...</p>
<p>Thanks a lot!</p>
<p>Oryan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
