NukeOps. Tools for 3ds Max to Nuke workflow.

loocas | 3ds Max,maxscript,Nuke,software,technical | Sunday, January 2nd, 2011

Get the Flash Player to see this content.

To celebrate a new, fresh year ahead, I sat down and wrote a script that I’ve wanted to write for some time. A simple to use, yet powerful set of tools that’d help out anyone working in 3ds Max and Nuke to get the 3ds Max Cameras and locators (be it geometry, point helpers or anything between) to Nuke, flawlessly and with as little effort as possible.

So I condensed two essential functions into a single-click button in your toolbar. :) Watch the vieo above for a thorough description with examples.

The functionality could be described as Save To File and Copy To Clipboard methods. The first one will take all the selected objects and will generate a .chan file for each of them which can then be imported back in Nuke’s Axis or Camera nodes. The second one is pretty cool and rather powerful. I wrote a set of functions that take the selected objecs and generate a full Nuke script in the memory, which is then stored in the clipboard. A simple Ctrl+V in Nuke’s node editor will then paste in the generated Nuke script with all the Cameras and Axis nodes as they were in 3ds Max’s scene. Very cool, fast and useful for more complex comping in Nuke.

Anyways, the tools are licensed under the Creative Commons License, so, feel free to enhance and share the scripts as you like, as long as you give me credits for it. ;)

DOWNLOAD, install by drag and dropping onto you 3ds Max scene. Don’t forget to copy the import_chan_file.tcl to your Nuke plugins directory.

Enjoy!

EDIT: If you’re having trouble installing the script using the .mzp installer, just open the NukeOps.mzp file with WinRAR or WinZIP (or directly in TotalCommander for example), extract the files and copy them to the appropriate folders of you 3ds Max installation (in my case it’s the C:\Program Files\Autodesk\3ds Max 2011\ folder):

  • duber_NukeOps.mcr to C:\Program Files\Autodesk\3ds Max 2011\ui\usermacros
  • NukeOps.ms to C:\Program Files\Autodesk\3ds Max 2011\Scripts\Startup
  • all the .BMP files to C:\Program Files\Autodesk\3ds Max 2011\ui\usericons

Setting up Environment variables from MAXscript

loocas | 3ds Max,maxscript,technical | Thursday, October 14th, 2010

Just a note on this topic as I just recently needed to set up some Env. variables via MAXScript for certain in-house tools to work correctly and I bumped into a weird behavior of the .NET classes I used. So, for anyone out there with a similar task at hand, read on to save some time figuring it out. :)

Basically, all you need in order to get or set environment variables via .NET are two classes:

  • “System.Environment”
  • “System.EnvironmentVariableTarget”

Then, you simply need to call a method on the “System.Environment” class, called, simply, SetEnvironmentVariable() or GetEnvironmentVariable().

The “System.EnvironmentVariableTarget” class is used to invoke an Enum of:

  • Process – this Enum will get/set the Env. variable for the actual, live, process. The Env. var. will basically die with the process as well.
  • Machine – this one asks for the System Env. variables available to all users and processes
  • User – this one, obviously, only applies to the given user

So, my initial approach was as usual, calling the methods this way:

sysEnv = dotNetClass "System.Environment"
envTarget = dotNetClass "System.EnvironmentVariableTarget"

sysEnv.SetEnvironmentVariable("MyVariable", @"MyValue", envTarget.Machine)



However, this threw an error:

-- Syntax error: at ),, expected 
--  In line: sysEnv.SetEnvironmentVariable("MyVar", @



In such a case, I recommend using the showMethods() method for investigating .NET methods in MAXScript. This partially reveals syntax as well as actual methods available:

showMethods(dotNetClass "System.Environment")
  .[static]<System.Boolean>Equals <System.Object>objA <System.Object>objB
  .[static]Exit <System.Int32>exitCode
  .[static]<System.String>ExpandEnvironmentVariables <System.String>name
  .[static]FailFast <System.String>message
  .[static]<System.String[]>GetCommandLineArgs()
  .[static]<System.String>GetEnvironmentVariable <System.String>variable
  .[static]<System.String>GetEnvironmentVariable
<System.String>variable <System.EnvironmentVariableTarget>target
  .[static]<System.Collections.IDictionary>GetEnvironmentVariables()
  .[static]<System.Collections.IDictionary>GetEnvironmentVariables
<System.EnvironmentVariableTarget>target
  .[static]<System.String>GetFolderPath <System.Environment+SpecialFolder>folder
  .[static]<System.String[]>GetLogicalDrives()
  .[static]<System.Boolean>ReferenceEquals <System.Object>objA <System.Object>objB
  .[static]SetEnvironmentVariable <System.String>variable <System.String>value
  .[static]SetEnvironmentVariable <System.String>variable
<System.String>value <System.EnvironmentVariableTarget>target



So, after doing this, the correct syntax is:

sysEnv = dotNetClass "System.Environment"
envTarget = dotNetClass "System.EnvironmentVariableTarget"

sysEnv.SetEnvironmentVariable "MyVariable" @"MyValue" envTarget.Machine



Hope this helps anyone with similar issues.

duberPython features demonstration!

loocas | 3ds Max,maxscript,Python,software,technical | Thursday, March 4th, 2010

duberPython banner

I’m trhilled to be able to finally showcase, at least, some of our very own Python implementation into 3ds Max!

First off, our primary reason for writing our own, proprietary, Python connection to 3ds Max is Tactic by Southpaw Technology. An awesome asset management system entirely written in Python that I decided to invest in and integrate our tools and software packages into. Another reason for this connection, later came up, was the need for writing much more complex scripts with complex GUIs, since, as you probably know, a few functional lines of code are hardly enough in a modern, efficient, VFX production of today. ;)

The heart of our Python integration is dotNET from Microsoft. I can’t express myself enough how much I appretiate this framework! The brain of our Python integration is IronPython. Also a product from Microsoft, completely open source and free, which are two very important aspects for any pipeline tool in any production facility of any size. Not the price as much as the availability of the software. And with IronPython and Microsoft, I am certain that this piece of software will be around for years!

(more…)

duberPython is coming to life!

loocas | 3ds Max,maxscript,Python,software,technical | Friday, December 11th, 2009

duberPython banner

I am very excited to present a very early development results for our own Python implementation in 3ds Max.

First a bit of an intro. At duber, I’ve setup everything around Python, the most versatile and powerful language I’ve ever seen. I felt in love with Python so much that it even influenced my decision to leave Fusion (my favourite compositing app) and dive into Nuke (my, now, most favourite compositing app). I even invested in a commercial data and asset management system, Tactic, that is entirely written in Python. I run tons of custom Python scripts to tie together programs such as Tactic, Nuke, FrameCycler, Photoshop etc… etc… But the last missing piece to the entire pipeline puzzle was 3ds Max.

(more…)

An interesting concept behind Structs in MAXScript

loocas | 3ds Max,maxscript,technical | Tuesday, December 8th, 2009

I bumped into this issue of referencing values inside of Structs, which is a very elegant solution to using variables across your code, while avoiding global declarations. The issue was pretty much that I wasn’t aware of the implementation design of Structs in MAXscript.

Basically, Structs are these overly simplified custom classes know from such languages as Python (to which I’ll try to compare these). However, Structs are really so simple that they don’t even implement such functionality as inheritance (a pitty by the way), or more advanced functionality known from Python. Structs, rather than classes, could be called groups. That’s what I’ve been using them for mainly. I grouped a bunch of functions and called them via a standard attribute reference paradigm.

(more…)

Python in 3ds Max – FINALLY POSSIBLE!

loocas | 3ds Max,maxscript,opinions,Python,software,technical | Sunday, October 25th, 2009

blurPython Banner

Yes! Once again, Blur studio showed how it’s supposed to be done.

They’ve released, or allowed their Eric Hulser to release, an updated version of their blurPython modules for 32bit and 64bit 3ds Max versions from Max 9 all the way up to 2009! And not only that. They’ve also provided libs and modules for tying up Python, 3ds Max and Qt together! This is massive news as I’ve been trying to get Python (concretely IronPython) work in 3ds Max but I’ve been constantly hitting road blocks until I finally bumped into Blur’s updated blurPython.

(more…)

MAXScript Pro Editor’s automatic indentation drove me nuts!

loocas | 3ds Max,maxscript,technical | Saturday, August 16th, 2008

Auto indentation banner

I’ve gotten sick of the defaultly setup auto-indentation in MAXScript Pro Editor as I’m too used to the old-school MAXScript editor found in Max prior to 3ds Max 2008. Thankfully, since somebody at Autodesk had the brightest idea of implementing a very well-known and well-used Scintilla based text editor, we’re allowed to tweak and change any of the editor’s settings to our liking!

(more…)

Checksums in 3ds Max

loocas | 3ds Max,maxscript,Python,technical | Sunday, August 10th, 2008

After reading a very interesting and helpful article about checksums and how practical they are for comparing large datasets over at Adam Pletcher’s Tech Art Tiki blog, I was immediately interested in such methods as I’m doing some R&D on data management in a larger creative environment and need such a feature. Unfortunately, MAXScript natively doesn’t support MD5 hashes (or any other kinds of hashes), so you’re pretty much stuck with just a few options.

(more…)

Connecting to a MySQL database from CG applications.

loocas | 3ds Max,maxscript,Maya,Python,technical | Saturday, August 9th, 2008

I’ve been recently doing some R&D on MySQL databases and connection through Python in Maya as well as Python in Max (through blurPython library), but I couldn’t seem to have found a way to connect to a MySQL database via ODBC. The problem lied in OLE methods as they’re not both much documented in MAXScript reference and they’re tied to the operating system, not Max directly. But thankfully, I bumped into a solution today, out of a blue :)

(more…)

Dividing matrices is possible and quite useful.

loocas | 3ds Max,maxscript,technical | Saturday, July 12th, 2008

I was trying to solve a problem when I had an object (a point helper) in a scene that was part of a hierarchy (in a rig) but I wanted the object to transform in a different object’s space than was its parent! Essentially, this means transforming objects in “AUX” pivots’ space (if you know MotionBuilder, you know where I’m going with this).

(more…)

« Previous Page | Next Page »

Powered by WordPress | Theme by Roy Tanck