RSS FEED

Progress Info

The built-in progress bar in max status bar is not suited for every task, and as I have found myself writing quite similar lines of code to print debug info to the prompt and trying to prevent max window from 'not responding' over and over again, I whipped up a little struct to make it easier.

Read more »

Persistent values in rollout (across one session)

Sometimes it is desirable for rollout controls to keep their values when you close the dialog and open it again. There are many ways to achieve that, one of the easiest is using locals declared in a macroscript body and using its on execute handler to initialize the rollout. When a regular script is used instead, a global struct or a global set of values can be used, but there is also another method which might be more suitable in many cases.

Read more »

Unique random wirecolor

As I've indicated in my previous retrospective that there's a skeleton in my closet, a bulk of code waiting to be commented. Let's now have a look at a piece of code from almost a year ago (original question at Stack Overflow: Give each object in scene a unique wirecolor?).

Read more »

Array shuffling gotchas

Shuffling an array is a fairly common task in the world of maxscript, and even if you don't do it quite right it's still okay for most of the tasks it's used for. However when unique array elements get dropped in the process and other are repeated, it's definitely not the expected outcome.

Read more »
Return to top