Archive for August, 2006

When order of operations goes wrong…

Thursday, August 24th, 2006

Here’s a MaxScript oddity I just discovered.

Evaluate the following script n times.

if (rlt_test != undefined) then (
   destroyDialog rlt_test
)

(
   rollout rlt_test “Test”
   (
   )

   createDialog rlt_test width:100 height:100
)

You’ll get n dialogs stacked on top of each other. The if test at the top of the script is never triggering due to the fact that (rlt_test != undefined) is always incorrectly evaluating to “true”. Now change the first line to remove the parentheses around the if test conditional, so it reads:

if rlt_test != undefined then (

Now re-evaluate the script n times. You’ll only get one dialog. The if test is now evaluating properly. Why does enclosing the boolean used in the if test inside of parentheses cause the test to evaluate incorrectly?

Put the parentheses back and put this line at the very top of the script:

print (rlt_test as string)

and evaluate again. 

On (n > 1) runs of the script you’ll see “Rollout:rlt_test” printed to the listener but the if test will still evaluate to true.

It’s almost as if the parentheses are forcing rlt_test to be declared as a new variable inside of them, local only to that parenthesis block. If that’s the case then putting if test conditionals inside of parenthesis for either order of operations or readability’s sake (Volition’s coding standards state that all if tests should be enclosed in parenthesis) could cause problems if variables are used in the if test. 

The Area != Happy Land

Wednesday, August 23rd, 2006

Granted, I’ve only tried to use the forums over on http://area.autodesk.com for a day but my initial impression is not favorable.

There is no hierarchical navigation from one forum to another. The only way to switch forums is to use the “Discussions” button on the top of the page which takes you back to the forum synopsis page. The problem with the forum synopsis page is that it doesn’t list all of the forums, only five or so from each product category. You have to click the “Show all forums” button in the product category in which you are interested to get a list of forums for that product.

That’s three mouse clicks and an amount of searching to switch forums. On the old forum system changing discussion forums was a one click operation.

Supposedly the Area can be read via RSS and read & posted to via NNTP. I can’t get Sage to recognize the RSS feed information and there’s no page with the pertinent information to set up NNTP access.

The forums on the Area are a step backwards. I hope Autodesk doesn’t fracture the community with this “upgrade”.

Two Positive Comments For The Area

Tuesday, August 22nd, 2006

1) Autodesk carried over the discussion topics from the old boards.

2) The new forums can be read via the web, NNTP, or RSS.

IronPython 1.0-RC2

Monday, August 21st, 2006

http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython

I can only get the download link to work in IE for some reason. For those not in the know Iron Python is Python built against .NET so you have access to the entire .NET class hierarchy, including Windows.Forms, from within Python.

There is a VisualStudio.Net IronPython integration sample at http://blogs.msdn.com/aaronmar/archive/2006/02/16/…

An Era Has Ended

Monday, August 21st, 2006

Yost Group..er Autodesk…er Kinetix..er Discreet..er Autodesk has locked all of the forums over at http://support.discreet.com. This is the final step before they move everything over to http://area.autodesk.com. Area is the new combined AutoCad, Max, Maya, Viz, etc… community portal. Area goes live tomorrow (8/22). I don’t know how long the old support boards will be up for old topic searches.

The old support boards were my main source of information, inspiration, and help when I learned MaxScript. I never met anyone on those forums who wasn’t curteous, friendly, and helpful. Kees, Swami, Bobo, Paul Neale, et. al. were and are the nicest group of industry peers anyone could hope to know.

I’ll kind of miss the old boards. I hope the discussions are as friendly, lively, and helpful over in the new Area.

Job Title Change

Friday, August 18th, 2006

Just found out that I’m now the Product Technical Artist on my project. Not bad for only being here at Volition for three and a half months.