<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/3.3.3" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>= undefined</title>
		<link>http://oferz.com/blog////blog4.php</link>
		<atom:link rel="self" type="application/rss+xml" href="http://oferz.com/blog////blog4.php?tempskin=_rss2" />
		<description></description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=3.3.3"/>
		<ttl>60</ttl>
				<item>
			<title>Initializing a struct in maxscript</title>
			<link>http://oferz.com/blog////blog4.php/2008/09/05/initializing-a-struct-in-maxscript</link>
			<pubDate>Sat, 06 Sep 2008 04:18:23 +0000</pubDate>			<dc:creator>Ofer</dc:creator>
			<category domain="main">Maxscript</category>			<guid isPermaLink="false">26@http://oferz.com/blog////</guid>
						<description>&lt;p&gt;Here's a quick tip on how to initialize a struct in maxscript, when an instance of the struct is created:&lt;/p&gt;&lt;p&gt;(&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;-- This is just a sample of a struct that will be initialized &lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;-- when an instance of it will be created.&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;-- For this demo, we'll populate the someArray variable with &lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;-- some random numbers.&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;struct s_InitializableStruct (&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;someArray = #(), &amp;#160;&amp;#160; &amp;#160;-- The default value is an empty array.&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;-- The init function is the function that determines what will&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;-- be initilized.&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;fn init =&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;(&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;someArray = for i = 1 to 10 collect (random 0 1000)&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;),&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;-- And this is the trick: use another variable, and assign to it&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;-- the &amp;quot;result&amp;quot; of the init function.&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&amp;#160;&amp;#160; &amp;#160;_init = init()&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;)&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;-- Create an instance of the struct&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;local structInstance = s_InitializableStruct()&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;-- Print the value of someArray&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;format &amp;quot;%\n&amp;quot; structInstance.someArray&lt;br /&gt;&amp;#160;&amp;#160; &amp;#160;-- As you can see, the someArray variable has been initialized with 10 random numbers&lt;br /&gt;)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://oferz.com/blog////blog4.php/2008/09/05/initializing-a-struct-in-maxscript&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Here's a quick tip on how to initialize a struct in maxscript, when an instance of the struct is created:</p><p>(<br />&#160;&#160; &#160;-- This is just a sample of a struct that will be initialized <br />&#160;&#160; &#160;-- when an instance of it will be created.<br />&#160;&#160; &#160;-- For this demo, we'll populate the someArray variable with <br />&#160;&#160; &#160;-- some random numbers.<br />&#160;&#160; &#160;struct s_InitializableStruct (<br />&#160;&#160; &#160;&#160;&#160; &#160;someArray = #(), &#160;&#160; &#160;-- The default value is an empty array.<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;-- The init function is the function that determines what will<br />&#160;&#160; &#160;&#160;&#160; &#160;-- be initilized.<br />&#160;&#160; &#160;&#160;&#160; &#160;fn init =<br />&#160;&#160; &#160;&#160;&#160; &#160;(<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;someArray = for i = 1 to 10 collect (random 0 1000)<br />&#160;&#160; &#160;&#160;&#160; &#160;),<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;-- And this is the trick: use another variable, and assign to it<br />&#160;&#160; &#160;&#160;&#160; &#160;-- the &quot;result&quot; of the init function.<br />&#160;&#160; &#160;&#160;&#160; &#160;_init = init()<br />&#160;&#160; &#160;)<br />&#160;&#160; &#160;<br />&#160;&#160; &#160;-- Create an instance of the struct<br />&#160;&#160; &#160;local structInstance = s_InitializableStruct()<br />&#160;&#160; &#160;-- Print the value of someArray<br />&#160;&#160; &#160;format &quot;%\n&quot; structInstance.someArray<br />&#160;&#160; &#160;-- As you can see, the someArray variable has been initialized with 10 random numbers<br />)</p><p>&nbsp;</p><p>&nbsp;</p><div class="item_footer"><p><small><a href="http://oferz.com/blog////blog4.php/2008/09/05/initializing-a-struct-in-maxscript">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://oferz.com/blog////blog4.php/2008/09/05/initializing-a-struct-in-maxscript#comments</comments>
			<wfw:commentRss>http://oferz.com/blog////blog4.php?tempskin=_rss2&#38;disp=comments&#38;p=26</wfw:commentRss>
		</item>
				<item>
			<title>Creating multiple masks with Renderman</title>
			<link>http://oferz.com/blog////blog4.php/2008/08/31/creating-multiple-masks-with-renderman</link>
			<pubDate>Sun, 31 Aug 2008 17:43:52 +0000</pubDate>			<dc:creator>Ofer</dc:creator>
			<category domain="alt">Maya</category>
<category domain="alt">Renderman</category>
<category domain="main">RSL</category>			<guid isPermaLink="false">25@http://oferz.com/blog////</guid>
						<description>&lt;p&gt;&amp;#160;This tip describes how to create multiple masks with Renderman. This technique comes to expand the simple RGBA as masks technique.&lt;br /&gt;
The problem with masks is usually anti-aliasing. If you use an object channel, it can only have a discreet value for each pixel, meaning the each pixel can hold only one object id value (as demonstrated in the image below,) and this means no anti-aliasing.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://oferz.com/blog////blog4.php/2008/08/31/creating-multiple-masks-with-renderman#more25&quot;&gt;Read more &amp;raquo;&lt;/a&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://oferz.com/blog////blog4.php/2008/08/31/creating-multiple-masks-with-renderman&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>&#160;This tip describes how to create multiple masks with Renderman. This technique comes to expand the simple RGBA as masks technique.<br />
The problem with masks is usually anti-aliasing. If you use an object channel, it can only have a discreet value for each pixel, meaning the each pixel can hold only one object id value (as demonstrated in the image below,) and this means no anti-aliasing.</p><p><a href="http://oferz.com/blog////blog4.php/2008/08/31/creating-multiple-masks-with-renderman#more25">Read more &raquo;</a><div class="item_footer"><p><small><a href="http://oferz.com/blog////blog4.php/2008/08/31/creating-multiple-masks-with-renderman">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://oferz.com/blog////blog4.php/2008/08/31/creating-multiple-masks-with-renderman#comments</comments>
			<wfw:commentRss>http://oferz.com/blog////blog4.php?tempskin=_rss2&#38;disp=comments&#38;p=25</wfw:commentRss>
		</item>
				<item>
			<title>Dynamic UI in Maya using Python</title>
			<link>http://oferz.com/blog////blog4.php/2008/08/25/dynamic-ui-in-maya-using-python</link>
			<pubDate>Mon, 25 Aug 2008 14:25:23 +0000</pubDate>			<dc:creator>Ofer</dc:creator>
			<category domain="main">Maya</category>
<category domain="alt">Python</category>			<guid isPermaLink="false">24@http://oferz.com/blog////</guid>
						<description>&lt;p&gt;In a recent job, I needed to create a dynamic user interface in Maya. I don't really like MEL, so I decided to go with Python. This was the first time I really used Python for anything.&lt;br /&gt;
One of the reasons I don't like MEL, is it kind of forces you to use global variables (using local ones becomes a pain if not impossible at some point.)&lt;br /&gt;
So, on I went and wrote something like this:&lt;/p&gt;
&lt;a href=&quot;http://oferz.com/blog////blog4.php/2008/08/25/dynamic-ui-in-maya-using-python#more24&quot;&gt;Read more &amp;raquo;&lt;/a&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://oferz.com/blog////blog4.php/2008/08/25/dynamic-ui-in-maya-using-python&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>In a recent job, I needed to create a dynamic user interface in Maya. I don't really like MEL, so I decided to go with Python. This was the first time I really used Python for anything.<br />
One of the reasons I don't like MEL, is it kind of forces you to use global variables (using local ones becomes a pain if not impossible at some point.)<br />
So, on I went and wrote something like this:</p>
<a href="http://oferz.com/blog////blog4.php/2008/08/25/dynamic-ui-in-maya-using-python#more24">Read more &raquo;</a><div class="item_footer"><p><small><a href="http://oferz.com/blog////blog4.php/2008/08/25/dynamic-ui-in-maya-using-python">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://oferz.com/blog////blog4.php/2008/08/25/dynamic-ui-in-maya-using-python#comments</comments>
			<wfw:commentRss>http://oferz.com/blog////blog4.php?tempskin=_rss2&#38;disp=comments&#38;p=24</wfw:commentRss>
		</item>
				<item>
			<title>My shiny new blog</title>
			<link>http://oferz.com/blog////blog4.php/2008/08/23/my-shiny-new-blob</link>
			<pubDate>Sun, 24 Aug 2008 01:47:14 +0000</pubDate>			<dc:creator>Ofer</dc:creator>
			<category domain="main">Uncategorized</category>			<guid isPermaLink="false">23@http://oferz.com/blog////</guid>
						<description>&lt;p&gt;OK, so I finally got me a blog.&lt;br /&gt;
I have to admit I didn't really see the point in me having a blog until now, and I hope I'll find time to update it on a regular basis. What caused the change of heart was a recommendation on &lt;a href=&quot;http://tech-artists.org/forum/showthread.php?t=87&quot;&gt;this thread&lt;/a&gt; on tech-artists.org.&lt;br /&gt;
In addition to that, recently, while researching stuff for a couple of jobs, I found some information that I thought others might find useful, but I was too lazy to start formatting a web page, uploading it and linking to it from my main site. &lt;br /&gt;
So I decided to blogging might be the way to go. We'll see how it goes.&lt;/p&gt;

&lt;p&gt;I hope you'll find some useful stuff in here. Enjoy your stay.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://oferz.com/blog////blog4.php/2008/08/23/my-shiny-new-blob&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>OK, so I finally got me a blog.<br />
I have to admit I didn't really see the point in me having a blog until now, and I hope I'll find time to update it on a regular basis. What caused the change of heart was a recommendation on <a href="http://tech-artists.org/forum/showthread.php?t=87">this thread</a> on tech-artists.org.<br />
In addition to that, recently, while researching stuff for a couple of jobs, I found some information that I thought others might find useful, but I was too lazy to start formatting a web page, uploading it and linking to it from my main site. <br />
So I decided to blogging might be the way to go. We'll see how it goes.</p>

<p>I hope you'll find some useful stuff in here. Enjoy your stay.</p><div class="item_footer"><p><small><a href="http://oferz.com/blog////blog4.php/2008/08/23/my-shiny-new-blob">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://oferz.com/blog////blog4.php/2008/08/23/my-shiny-new-blob#comments</comments>
			<wfw:commentRss>http://oferz.com/blog////blog4.php?tempskin=_rss2&#38;disp=comments&#38;p=23</wfw:commentRss>
		</item>
			</channel>
</rss>
