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

<channel>
	<title>duber&#039;s blog &#187; technical</title>
	<atom:link href="http://blog.duber.cz/category/technical/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.duber.cz</link>
	<description>the blog of duber studio™</description>
	<lastBuildDate>Wed, 01 Feb 2012 11:31:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Calling Shotgun API v3.0.8 from IronPython</title>
		<link>http://blog.duber.cz/software/calling-shotgun-api-v3-0-8-from-ironpython</link>
		<comments>http://blog.duber.cz/software/calling-shotgun-api-v3-0-8-from-ironpython#comments</comments>
		<pubDate>Wed, 01 Feb 2012 11:15:54 +0000</pubDate>
		<dc:creator>loocas</dc:creator>
				<category><![CDATA[dotNET]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.duber.cz/?p=993</guid>
		<description><![CDATA[As you might know there has been a significant change in the latest Shotgun API that&#8217;s somehow transparent to the CPython users, but presents a rather significant roadblock for IronPython users (including our duberPython bridge, that is based on the IronPython engine). First, let&#8217;s discuss what&#8217;s changed in the API so dramatically that it breaks [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.duber.cz/wp-content/uploads/ipy_shotgun_banner.png" alt="IronPython and Shotgun" title="IronPython and Shotgun" width="560" height="300" class="alignnone size-full wp-image-996" /></p>
<p>As you might know there has been a significant change in the latest Shotgun API that&#8217;s somehow transparent to the CPython users, but presents a rather significant roadblock for IronPython users (including our <a href="http://blog.duber.cz/?s=duberpython">duberPython</a> bridge, that is based on the IronPython engine).</p>
<p>First, let&#8217;s discuss what&#8217;s changed in the API so dramatically that it breaks IronPython compatibility. It&#8217;s the introduction of a JSON formatting that requires a few specific CPython libraries that are not available in IronPython. The effect it has on CPython users is a faster data transfer to/from Shotgun, but other than that, the API looks to be unchanged from a user point of view. You still keep calling the same methods and you&#8217;re getting back the same objects. From IronPython point of view, you&#8217;ll hit a roadblock as there are a few modifications you&#8217;ll have to make to the Shotgun modules in order to make them run in IPy without issues.</p>
<p><span id="more-993"></span></p>
<p>With huge thanks to the Shotgun Software support, I was able to work around the few limitations and start using the latest API without issues inside IronPython. Here&#8217;s what you have to do, in order to make this happen:</p>
<ul>
<li>First and foremost, <a href="https://github.com/shotgunsoftware/python-api/downloads">download the latest Shotgun API from the github site</a>. Place it some place you&#8217;d like to use it from, most likely in the Lib\site-packages folder, though my folder structure is completely different and based on different rules.</li>
</ul>
<p>Now if you try to instantiate the Shotgun class, you&#8217;ll get tons of errors, so, allow me to save you a few minutes (hours in my case, to be honest) searching and working around them. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ul>
<li>The first thing you have to overcome the &#8220;<a href="http://en.wikipedia.org/wiki/Internationalized_domain_name">IDNA</a>&#8221; encoding, which isn&#8217;t supported directly in IronPython. This isn&#8217;t as clean and easy as it could be, though the workaround is rather trivial, but bear in mind you might break something potentially doing this. I haven&#8217;t come across any issues yet, so, I&#8217;d consider this modification safe. Find the <strong>iri2uri.py</strong> module in the <strong>httplib2</strong> folder, open it and change line 71 from <em>authority = authority.encode(&#8216;idna&#8217;)</em> to <em>authority = authority.encode(&#8216;utf-8&#8242;)</em>. This effectively changes the codec under which you&#8217;ll be dealing with the unicode strings. Again, it&#8217;s not a clean modification and you can potentially run into issues doing this, but in my experience, all seems to have been working fine so far.</li>
</ul>
<ul>
<li>
The next problem will be SSL authentication, which, again, is tripping IronPython&#8217;s SSL module. To fix this, open the <strong>shotgun.py</strong> module and on line 73 change <em>NO_SSL_VALIDATION = False</em> to <em>NO_SSL_VALIDATION = True</em>.
</li>
</ul>
<ul>
<li>Then IronPython will still be complaining about a module called <strong>zlib</strong>, which is a compiled CPython module that cannot be used inside IronPython. Luckily there is a C# variant based on the same code as zlib. Download it from <a href="https://bitbucket.org/jdhardy/ironpythonzlib/downloads">Jeff Hardy&#8217;s bitBucket site</a> and place it somewhere where IronPython can source it (i.e. within your PATH). I put it in a recommended folder called DLLs directly in the IronPython folder. This means that the IPy interpreter will source the DLL automatically, but bear in mind you&#8217;ll have to add a reference to this library manually in your scripts when run outside the shell.</li>
</ul>
<ul>
<li>
The easiest way is to add these two lines in your imports into the shotgun.py module:</p>
<pre>import clr
clr.AddReference("IronPython.Zlib")</pre>
</li>
</ul>
<p>This way you&#8217;ll make sure the zlib module required by some of the shotgun modules is going to be readily available.</p>
<p>That&#8217;s it! Let&#8217;s test it. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Oh, one more thing, I&#8217;ve found these Python variant couples to be perfectly compatible and working in production: IronPython 2.6.2 and CPython 2.6 and for clr4 folks IronPython 2.7.1 and Python 2.7.2.</p>
<p>IronPython 2.7.1:<br />
<a href="http://blog.duber.cz/wp-content/uploads/ipy_271_shotgun_308api.png" rel="lightbox[993]"><img src="http://blog.duber.cz/wp-content/uploads/ipy_271_shotgun_308api_thumbnail.png" alt="IronPython 2.7.1" title="IronPython 2.7.1" width="560" height="248" class="alignnone size-thumbnail wp-image-994" /></a></p>
<p>duberPython (utilizing IronPython engine 2.6.2):<br />
<a href="http://blog.duber.cz/wp-content/uploads/duberPython_shotgun_308api.png" rel="lightbox[993]"><img src="http://blog.duber.cz/wp-content/uploads/duberPython_shotgun_308api_thumbnail.png" alt="duberPython" title="duberPython" width="560" height="149" class="alignnone size-thumbnail wp-image-995" /></a></p>
<p>I hope this helps you out with your IronPython and Shotgun scripting and I&#8217;m certainly looking forward to the new versions of the Shotgun API. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>A huge thank you to the <a href="https://support.shotgunsoftware.com/home">Shotgun Software support</a> team!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.duber.cz/software/calling-shotgun-api-v3-0-8-from-ironpython/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Having fun with Nuke</title>
		<link>http://blog.duber.cz/3ds-max/having-fun-with-nuke</link>
		<comments>http://blog.duber.cz/3ds-max/having-fun-with-nuke#comments</comments>
		<pubDate>Sun, 29 Jan 2012 14:06:45 +0000</pubDate>
		<dc:creator>loocas</dc:creator>
				<category><![CDATA[3ds Max]]></category>
		<category><![CDATA[maxscript]]></category>
		<category><![CDATA[Nuke]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.duber.cz/?p=988</guid>
		<description><![CDATA[As with my previous post, I&#8217;m preparing a few handy tools for 3ds Max artists using Mari and Nuke. This bit is the fun part with Nuke: live communication between 3ds Max and Nuke. Stay tuned!]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.duber.cz/wp-content/uploads/fun_times_with_nuke.png" rel="lightbox[988]"><img src="http://blog.duber.cz/wp-content/uploads/fun_times_with_nuke.png" alt="Nuke" title="Nuke" width="560" height="200" class="alignnone size-full wp-image-989" /></a></p>
<p>As with my <a href="http://blog.duber.cz/3ds-max/having-fun-with-mari">previous post</a>, I&#8217;m preparing a few handy tools for 3ds Max artists using Mari and Nuke. This bit is the fun part with Nuke: live communication between 3ds Max and Nuke.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.duber.cz/3ds-max/having-fun-with-nuke/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Having fun with Mari</title>
		<link>http://blog.duber.cz/3ds-max/having-fun-with-mari</link>
		<comments>http://blog.duber.cz/3ds-max/having-fun-with-mari#comments</comments>
		<pubDate>Sat, 28 Jan 2012 23:14:26 +0000</pubDate>
		<dc:creator>loocas</dc:creator>
				<category><![CDATA[3ds Max]]></category>
		<category><![CDATA[Mari]]></category>
		<category><![CDATA[maxscript]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.duber.cz/?p=984</guid>
		<description><![CDATA[I&#8217;m starting to write a useful set of tools for Mari and 3ds Max users. This is the very beginning &#8211; establishing reliable communication from 3ds Max&#8217;s MAXScript console directly to Mari. I&#8217;ll keep you posted.]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.duber.cz/wp-content/uploads/fun_times_with_mari.png" rel="lightbox[984]"><img src="http://blog.duber.cz/wp-content/uploads/fun_times_with_mari.png" alt="Mari" title="Mari" width="560" height="310" class="alignnone size-full wp-image-985" /></a></p>
<p>I&#8217;m starting to write a useful set of tools for Mari and 3ds Max users. This is the very beginning &#8211; establishing reliable communication from 3ds Max&#8217;s MAXScript console directly to Mari. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ll keep you posted.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.duber.cz/3ds-max/having-fun-with-mari/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The power of regular expressions</title>
		<link>http://blog.duber.cz/3ds-max/the-power-of-regular-expressions</link>
		<comments>http://blog.duber.cz/3ds-max/the-power-of-regular-expressions#comments</comments>
		<pubDate>Tue, 10 Jan 2012 00:47:43 +0000</pubDate>
		<dc:creator>loocas</dc:creator>
				<category><![CDATA[3ds Max]]></category>
		<category><![CDATA[dotNET]]></category>
		<category><![CDATA[maxscript]]></category>
		<category><![CDATA[opinions]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.duber.cz/?p=956</guid>
		<description><![CDATA[I don&#8217;t think I have to praise regular expressions here, however, I wanted to point out one extremely useful case where regular expressions were pretty much the single most useful, fastest and not so obvious choice in my 3ds Max pipeline. The thing with 3ds Max is that regular expressions are foreign to MAXScripters and [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t think I have to praise regular expressions here, however, I wanted to point out one extremely useful case where regular expressions were pretty much the single most useful, fastest and not so obvious choice in my 3ds Max pipeline.</p>
<p>The thing with 3ds Max is that regular expressions are foreign to MAXScripters and they don&#8217;t usually use them. I too am more used to regex in Python or IronPython than MAXScript. However, since we do have access to .NET in MAXScript, we can use its <a href="http://msdn.microsoft.com/en-us/library/6f7hht7k.aspx">Regex class</a> inside MAXScript.</p>
<p>Why I&#8217;m mentioning this and why could it be useful to you? I bumped into a little issue with my pipeline&#8217;s handling of rendered files. They assume to be exactly the same as I set them up in 3ds Max, which is logical and correct. However, since I started using Deadline&#8217;s SMTD script for submitting my files to the render farm, which takes care of handling the path remapping and storing, it also accidentally took care of letter casing. So, in the end, my render files were being saved all upper cased: &#8220;\\SERVER\PROJECT\RENDERS\ABC.EXR&#8221; instead of what I set in the Render Dialog: &#8220;\\SERVER\Project\Renders\ABC.exr&#8221;. The reason was simple, I used simple MAXScript substituteString() method to re-map my local paths to my server, UNC, paths and I converted everything to upper case just in case I got a mismatch:
<pre>substituteString (toUpper srcPath) @"D:" @"\\RAMMSTEIN\__UNMANAGED_PROJECTS__"</pre>
<p><span id="more-956"></span></p>
<p>This wouldn&#8217;t be such an issue in a Windows environment, however, when you start dealing with path and file names in Python and you start mixing up casing, you can easily get burnt.</p>
<p>So, the only option left in Python would be to use the re module and search or replace strings based on regular expression matching. In MAXScript, however, we don&#8217;t natively have a re module and its methods, but luckily for us, we can use .NET, so that the previous method written in MAXScript using regex would look like this:</p>
<pre>regex = dotNetClass "System.Text.RegularExpressions.Regex"
regex.Replace srcPath @"^(D[:])" @"\\RAMMSTEIN\__UNMANAGED_PROJECTS__"</pre>
<p></br>This replaces the capital letter D in the source path <em>srcPath</em> with the UNC server path exactly the same way as the substituteString method above. However, since this is a regular expression engine you&#8217;re using, you can modify the search in order to match any casing, should that be your choice.</p>
<p>There are two ways of doing that. The ultimate way I chose in the end was to modify the search pattern to @&#8221;^([D|d][:])&#8221;, which matches both &#8220;D:&#8221; and &#8220;d:&#8221; in the source path and then replaces it with the UNC path at the end.</p>
<p>The other option you can use, should you choose to, is the <a href="http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regexoptions.aspx">RegexOptions Enumeration</a> argument at the very end of the method call. If you want to ignore casing, just use this:</p>
<pre>regex = dotNetClass "System.Text.RegularExpressions.Regex"
regexOpt = dotNetClass "System.Text.RegularExpressions.RegexOptions"
regex.Replace @"d:\testProject\projFolder\something.exr" @"^(D[:])"
@"\\MyServer\__myProjects__" regexOpt.IgnoreCase</pre>
<p></br>Tadaaa! It&#8217;s as simple as that. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> No path splitting, no case testing, just a single line of a regular expression call (not counting the class call) and you&#8217;re done. Besides you can use this at a much greater scale with far more complex regex search strings for anything you like directly inside MAXScript.</p>
<p>Note that I&#8217;m replacing a D: drive letter in the source paths since that is my projects local drive. You can use whatever you want, hell, you can replace any and all drive letters in one regex call, if you want:
<pre>@"^([A-Z|a-z][:])"</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.duber.cz/3ds-max/the-power-of-regular-expressions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shotgun and 3ds Max, practical example</title>
		<link>http://blog.duber.cz/software/shotgun-and-3ds-max-practical-example</link>
		<comments>http://blog.duber.cz/software/shotgun-and-3ds-max-practical-example#comments</comments>
		<pubDate>Mon, 05 Dec 2011 22:50:24 +0000</pubDate>
		<dc:creator>loocas</dc:creator>
				<category><![CDATA[dotNET]]></category>
		<category><![CDATA[maxscript]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.duber.cz/?p=943</guid>
		<description><![CDATA[Here&#8217;s a video demonstrating the power and practical usage of Shotgun (data) brought over to 3ds Max natively via our Python plugin, duberPython.]]></description>
			<content:encoded><![CDATA[<p><img src="" /></p>
<p>Here&#8217;s a video demonstrating the power and practical usage of Shotgun (data) brought over to 3ds Max natively via our Python plugin, <a href="http://blog.duber.cz/?s=duberpython">duberPython</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.duber.cz/software/shotgun-and-3ds-max-practical-example/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://blog.duber.cz/wp-content/gallery/vids/duberPython_Shotgun_demo.mp4" length="58014303" type="video/mp4" />
		</item>
		<item>
		<title>RVIO in a daily use</title>
		<link>http://blog.duber.cz/software/rvio-in-a-daily-use</link>
		<comments>http://blog.duber.cz/software/rvio-in-a-daily-use#comments</comments>
		<pubDate>Tue, 01 Nov 2011 10:53:06 +0000</pubDate>
		<dc:creator>loocas</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[RV]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.duber.cz/?p=919</guid>
		<description><![CDATA[Every TD knows that command line tools are among the most powerful in their arsenal of tricks and secrets. I want to mention RVIO, as today it saved me quite a lot of time (again), which is absolutely key when a deadline is coming. My client requested a minor tweak of animation (a lip sync, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.duber.cz/wp-content/uploads/rvio_cmd_banner.png" alt="RVIO" title="RVIO" width="560" height="100" class="alignnone size-full wp-image-920" /></p>
<p>Every TD knows that command line tools are among the most powerful in their arsenal of tricks and secrets.</p>
<p>I want to mention <a href="http://www.tweaksoftware.com/products/rvio-sequence-converter">RVIO</a>, as today it saved me quite a lot of time (again), which is absolutely key when a deadline is coming.</p>
<p>My client requested a minor tweak of animation (a lip sync, to be concrete) on an almost finished shot. So, the general approach would be to do the change, have the animation data go through the pipeline and at the end have the finished frames ready to be loaded in an existing edit, which then gets rendered out and the final result gets showed to the client.</p>
<p>All fine, until you realize your render farm is completely full with other shots, so you have to skip the &#8220;beauty&#8221; pass rendering and only present the client with a, somehow, polished preview directly from your 3D package, which isn&#8217;t the <em>safest</em> way, trust me. But this client is great and understands that what he sees is actually only a preview of the animation.</p>
<p>So, the last piece of puzzle to solve is to get the preview assembled with additional layers of information (such as frame number, shot name etc&#8230;), basically a slightly customized overlay. All this sounds nice and simple, you just open up (in my case) Premiere Pro, swap the layers, render out the portion you need and be done with it.</p>
<p>But this certainly isn&#8217;t the <em>TD way</em>. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><span id="more-919"></span></p>
<p>Fortunately for me, I&#8217;d purchased a license of RVIO some time ago, so I have an extremely powerful and versatile tool in my arsenal of VFX software that just <strong>gets the job done</strong>, no matter what.</p>
<p>The problem with the Premiere Pro approach, actually, there are two problems: 1) my lazyness and 2) the time it actually takes to get it done. Besides, this way you are also exposing your project to errors. You might accidently save the project and when you least need it, it&#8217;ll jump back at you and you&#8217;ll have to be dealing with this fuck-up in the least desirable time &#8211; the minute before the deadline.</p>
<p>So, the easiest approach for such a trivial task would be <em>something</em> that allows you to combine an image sequence with your sound file and spits out a movie file with the correct size, color, the whole package, basically.</p>
<p>RVIO is such a tool and it is aimed at TDs and people who aren&#8217;t afraid of using the command line (which you certainly should NOT be as it is the most powerful, fastest and actually easiest way of getting things done, even in 2011). It allows for both simple and extremely complex image, movie and sound file conversions. See the <a href="http://www.tweaksoftware.com/products/rvio-sequence-converter">RVIO site</a> for more info on that.</p>
<p>So, what is the concrete example I&#8217;m talking about? Something as simple as delivering a correct file and presenting it properly to the client can be a complex process in a large pipeline. In my case, as I&#8217;m a fairly small boutique, what I needed to do was to take an image sequence of the fixed animation, place it in an existing timeline (effectively replacing the previous, fully rendered, version), setting up markers for in-out points, setting up the export settings, correct file name, correct video and audio codecs, correct output size etc&#8230; Then have it exported, review the file, upload it to our server and present the link to our proprietary review site for clients to the client.</p>
<p>This entire process isn&#8217;t too difficult to manage in five to ten minutes, but presents a bit of a security threat that I mentioned above and also isn&#8217;t very flexible or comfortable. Sure, for people that can only deal with their software via nice and polished user interfaces, this is the only way to get the job done, but for a TD, there is a much smarter, faster and cooler way. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here come the super-powers of RVIO. It&#8217;s strictly a command line tool. But to perform all (and many more!) tasks that I just mentioned, all you need is this line of code:</p>
<pre>rvio [ "inputFrameSequence_12-125#.tif" "inputSoundFile.wav" ] -codec avc1
-outkeyinterval 20 -outdatarate 1000000 -outgamma 0.85 -outres 1024 576
-audiocodec aac -o "outputMovieFile.mp4"</pre>
<p>That&#8217;s it! See how awesomely simple, fast, effective and cool this is?! <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now, this was just a command line command you execute directly and you get a outputMovieFile.mp4 in the correct format, the correct in and out of the animation, correct sound and everything between. However, imagine what you can do with this! If you know Python, or on Windows, preferrably, IronPython, you can do WONDERS!</p>
<p>I&#8217;ve tied RVIO with <a href="http://www.shotgunsoftware.com/">Shotgun</a> via IronPython so that I can do very easily, effectively and super fast deliveries to our client on a project with about 120+ shots. It&#8217;s not a huge project, though, but the sheer number of shots definitely calls for scripting. There is no way I&#8217;d be sitting at 4am at the computer and manually editing and converting 120+ shots to a desired format for review whenever there is a change in the animation or compositing! That&#8217;d be a suicide and a complete waste of resources.</p>
<p>What I did was calling a loop on all the shot folders where our final comp files were being stored, picked the rendered files and fed them to RVIO with a few parameters set specifically for that project, similar to what I just showed you above, pulling a few variables from <a href="http://www.shotgunsoftware.com/">Shotgun</a>, such as in and out cuts, shot name and other data. Then it automatically takes the resulting movie files and uploads them to our review system via FTP. That was it! With about fifty lines of code I achieved a task that&#8217;d take me at least three hours of intensive file hassling and messing around! All of this then takes about ten minutes to process, which is perfect for a coffee break. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Besides, it&#8217;s recycable, in a sense that when there is something changed in any of the shots and we need to re-deliver, I just run the script again.</p>
<p>This is what I love about my work! The effectivity, productivity and the cool factor, of course. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.duber.cz/software/rvio-in-a-daily-use/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>duberPython runs the latest IronPython 2.7.1 without issues!</title>
		<link>http://blog.duber.cz/3ds-max/duberpython-runs-the-latest-ironpython-2-7-1-without-issues</link>
		<comments>http://blog.duber.cz/3ds-max/duberpython-runs-the-latest-ironpython-2-7-1-without-issues#comments</comments>
		<pubDate>Thu, 27 Oct 2011 17:06:10 +0000</pubDate>
		<dc:creator>loocas</dc:creator>
				<category><![CDATA[3ds Max]]></category>
		<category><![CDATA[maxscript]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[showcase]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.duber.cz/?p=914</guid>
		<description><![CDATA[Just a quick shout about the compatibility of duberPython and the latest and greatest IronPython 2.7.1 release (released a couple of days ago). All working smoothly and quickly, as expected. Should you need more info on duberPython or what we&#8217;re doing with it and Shotgun or Tactic, just drop me a line and I&#8217;ll be [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.duber.cz/wp-content/uploads/envVersion.png" alt="duberPython" title="duberPython" width="560" height="300" class="alignnone size-full wp-image-915" /></p>
<p>Just a quick shout about the compatibility of duberPython and the latest and greatest IronPython 2.7.1 release (released a couple of days ago). All working smoothly and quickly, as expected. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Should you need more info on duberPython or what we&#8217;re doing with it and <a href="http://shotgunsoftware.com/">Shotgun</a> or <a href="http://www.southpawtech.com/">Tactic</a>, just drop me a line and I&#8217;ll be more than happy to show you how cool duberPython is. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.duber.cz/3ds-max/duberpython-runs-the-latest-ironpython-2-7-1-without-issues/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using .NET controls in .NET Forms in MAXScript</title>
		<link>http://blog.duber.cz/3ds-max/using-net-controls-in-net-forms-in-maxscript</link>
		<comments>http://blog.duber.cz/3ds-max/using-net-controls-in-net-forms-in-maxscript#comments</comments>
		<pubDate>Sun, 11 Sep 2011 12:57:25 +0000</pubDate>
		<dc:creator>loocas</dc:creator>
				<category><![CDATA[3ds Max]]></category>
		<category><![CDATA[dotNET]]></category>
		<category><![CDATA[maxscript]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.duber.cz/?p=886</guid>
		<description><![CDATA[If you&#8217;re used to scripting your GUIs in Max with the standard rollouts via &#8220;createDialog &#8230;&#8221;, you might be a little confused and lost when you first try to use a 100% .NET Form object instead. Whatever your reason might be for using .NET Forms instead of standard dialogs, you&#8217;ll still want to: Create the [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re used to scripting your GUIs in Max with the standard rollouts via &#8220;createDialog &#8230;&#8221;, you might be a little confused and lost when you first try to use a 100% .NET Form object instead.</p>
<p>Whatever your reason might be for using .NET Forms instead of standard dialogs, you&#8217;ll still want to:</p>
<ul>
<li>Create the main form and define its properties</li>
<li>Define other UI controls, such as buttons, checkboxes etc&#8230;</li>
<li>Define event handlers for specific control objects</li>
<li>Initialize and display the entire Form with all the controls and functionality tied in</li>
</ul>
<p>All this is done a little differently in the .NET realm than what you&#8217;re used to in MAXScript. But before you start, check out <a href="http://paulneale.com/tutorials/dotNet/dotNet.htm">Paul Neale&#8217;s great .NET tutorials on his site</a>. Paul provides some great info for anyone trying to use .NET controls in their scripts.</p>
<p>Now, there is one thing I bumped into, you can actually use .NET objects in MAXScript rollouts, however, you cannot use regular max controls in .NET Forms! So, trying to assign a standard button to a .NET Form will result in an error.</p>
<p>You might think that this creates a burden on the TD to actually <em>skin</em> and customize the .NET controls to look like native 3ds Max GUI elements. You can do this, of course, but it&#8217;d really be a lot of additional work to hassle around with color classes, HWNDs etc&#8230; you actually don&#8217;t need to worry about this as there is an Assembly available in standard Max installations. It&#8217;s a little .dll, found in the root of Max, called <strong>MaxCustomControls.dll</strong>. This Assembly contains some of the more exotic controls, such as SceneExplorer, but it also contains a complete Form control that has already been modified so it reflects your 3ds Max environment, including all the colors, themes and even an initialization method for showing the control as a part of the max process/window.</p>
<p><span id="more-886"></span></p>
<p>Anyways, back to the topic. You can easily instantiate the MaxForm control as follows:</p>
<p><code>maxForm = dotNetObject "MaxCustomControls.MaxForm"</code></p>
<p>This way you have the System.Windows.Forms Form fully tailored to 3ds Max, without any additional work. Standard methods and properties of the .NET Form control are supported, of course. So, all you need now is to start adding controls to it. This is done differently than what you&#8217;re used to in rollouts. By simply instantiating buttons, checkboxes, or whatever, inside the scope of the script (because there is no rollout scope) isn&#8217;t enough, obviously. For this, there is a Controls property, inherited from the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.controlcollection.aspx">Control.ControlCollection class</a>, that has a few useful methods. The one you&#8217;ll need to add controls to the parent object is, naturally, .Add()</p>
<p>Here&#8217;s a simple example of declaring a .NET Button and adding it to the MaxForm object:</p>
<p><code>myButton = dotNetObject "System.Windows.Forms.Button"<br />
maxForm.controls.Add(myButton)</code></p>
<p>Easy stuff! Especially if you&#8217;re used to C# or even IronPython. The little confusing part comes when you want to actually assign event handlers to your controls. This is done completely differently from regular rollout event handlers, but it&#8217;s also different from C# or IPy. Normally in C# or IPy what you do is assign a method to a event property on individual controls:</p>
<p><code>myButton.Click += doSomething</code></p>
<p>This doesn&#8217;t work in MAXScript, however, so you have to opt for a specifically tailored solution to this issue, which is the <strong>dotNet.addEventHandler</strong> method. It accepts three arguments: the object to which you&#8217;re adding the eventHandler, the name of the event it should respond to and finally the method you&#8217;ll want the object to call when the given event occurs. So, the same example as above in MAXScript looks like this:</p>
<p><code>dotNet.addEventHandler myButton "Click" doSomething</code></p>
<p>The doSomething function has to accept two arguments, the sender and the argument list used inside the function to properly identify what object is calling it and what arguments you used (i.e. right click etc&#8230;)</p>
<p>Now, finally, you have pretty much everything you need to start building rich .NET GUIs for your scripts. The last thing to do now is to call the Form object with all its controls, methods, handlers etc&#8230; and show it. By default, a Form object has a regular Show() method to display the Form, but, this will result in showing an independent window that &#8220;falls behind&#8221; 3ds Max when you click anywhere in Max. This isn&#8217;t desirable for UI controls. Luckily, as I mentioned earlier, the MaxForm object has a special ShowModeless() method that will display the Form and tie it to the 3ds Max handle (HWND). Here&#8217;s the last piece of the puzzle. Please note that I&#8217;ve also added the dotNet.setLifeTimeControl method to show you that it&#8217;s generally a good idea to let the .NET garbage collector take care of the .NET objects, instead of the Max&#8217;s one.</p>
<p><code>maxForm.showModeless()<br />
dotNet.setLifeTimeControl maxForm #dotNet</code></p>
<p>That&#8217;s it for now. Happy scripting with .NET! <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.duber.cz/3ds-max/using-net-controls-in-net-forms-in-maxscript/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripting Deadline Event plugins, tutorial</title>
		<link>http://blog.duber.cz/technical/scripting-deadline-event-plugins-tutorial</link>
		<comments>http://blog.duber.cz/technical/scripting-deadline-event-plugins-tutorial#comments</comments>
		<pubDate>Sun, 24 Jul 2011 19:07:57 +0000</pubDate>
		<dc:creator>loocas</dc:creator>
				<category><![CDATA[deadline]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[videotutorials]]></category>

		<guid isPermaLink="false">http://blog.duber.cz/?p=855</guid>
		<description><![CDATA[People have asked me how to actually write a plugin for Deadline that will automatically submit a Nuke scene (or any other, for that matter), so I put together a quick tutorial showing you just that.]]></description>
			<content:encoded><![CDATA[<p>People have asked me how to actually write a plugin for Deadline that will automatically submit a Nuke scene (or any other, for that matter), so I put together a quick tutorial showing you just that. <img src='http://blog.duber.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.duber.cz/technical/scripting-deadline-event-plugins-tutorial/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://blog.duber.cz/wp-content/gallery/vids/scriptingDeadlineEventPlugins.mp4" length="136176118" type="video/mp4" />
		</item>
		<item>
		<title>How much RAM is &#8220;enough&#8221;?</title>
		<link>http://blog.duber.cz/misc/how-much-ram-is-enough</link>
		<comments>http://blog.duber.cz/misc/how-much-ram-is-enough#comments</comments>
		<pubDate>Mon, 27 Jun 2011 20:33:34 +0000</pubDate>
		<dc:creator>loocas</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[opinions]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.duber.cz/?p=804</guid>
		<description><![CDATA[I&#8217;m actually scared by the fact that even 24GB of RAM isn&#8217;t enough for a high-end workstation these days. And I&#8217;m talking about projects up to a maximum of full HD resolution! I don&#8217;t even consider 2K or, hell, 4K projects at the moment as I primarily work on TV commercials etc&#8230; This is very [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.duber.cz/wp-content/uploads/ram_usage.png" rel="lightbox[804]"><img src="http://blog.duber.cz/wp-content/uploads/ram_usage_thumbnail.png" alt="RAM usage" title="RAM usage" width="560" height="200" class="alignnone size-thumbnail wp-image-806" /></a></p>
<p>I&#8217;m actually scared by the fact that even 24GB of RAM isn&#8217;t enough for a high-end workstation these days. And I&#8217;m talking about projects up to a maximum of full HD resolution! I don&#8217;t even consider 2K or, hell, 4K projects at the moment as I primarily work on TV commercials etc&#8230;</p>
<p>This is very interesting as I remember every time I upgraded the amount of RAM of my workstation, I was very pleased with the performance and the amounts of available memory every time I worked on something. But then, not long after, I started to reach the limits of the system&#8217;s resources.</p>
<p>The thing is, when you reach the cap of your CPU, or GPU for that matter, your renders just take a bit longer to finish. But as soon as you reach the RAM limit, your apps start crashing and the entire system becomes unstable! So, it is a bit of a problem.</p>
<p>I started reaching the limits not long ago when I had tons of apps open at the same time. Especially Nuke, Max, VMWare Workstation and Photoshop. But on recent projects I started reaching the cap with Nuke and Photoshop alone! It&#8217;s terrifying as it suggests that no matter how much RAM I put in the system, it will never be enough!</p>
<p>So, it seems that my next workstation upgrade will, indeed, be a RAM boost. Not sure I&#8217;ll be able to buy the full 96GB of ECC RAM at once, but, I&#8217;m certain I&#8217;ll get there very soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.duber.cz/misc/how-much-ram-is-enough/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

