It seems to me like this comparison function should be sufficient: fn fnComparePositionX obj1 obj2 = (in coordsys world obj1.pos).x – (in coordsys …
To begin with I’d say do benchmarks on parts of the algorithm to find out what the bottlenecks are. Something interesting that you could try is build…
You could use forward declaring of either or both functions. So in file A you’d declare a function that is located in file B, without an implementatio…
It’s difficult to explain why this would happen without knowing what kind of parser and interpreter steps are performed when executing maxscript. But …
If you like recursion you should give functional programming a go, for example with Haskell or Erlang. It’s lovely! Maybe you should show the exact…
If you write the code out over multiple lines it may become more clear: fn getRoot node = ( –Check if the node passed to the function is a valid n…
Wouldn’t it be easier to just create a small macroscript with one or more “max export” commands calling the SDK exporter you already have? Or am I mis…
The SDK also provides a function “DebugPrint” allowing easy string formatting, which is nice.
Yeah finding out which color scheme is in use is not a problem. But I find having to register a #colorChanged event and copying new files a bit of a h…
Isn’t it this, or some similar method? virtual BOOL RenderGlobalContext::IntersectWorld ( Ray & ray, int skipID, ISect & hit, ISectList &a…
A small aside, just something I noticed in your code: del_faces = #{} del_faces.count = f_count for i = 1 to f_count do ( del_faces[i] =true ) i…
My guess is that if there is a random function without a seed it uses the system time internally
How about doing something like taking the system time as a seed?
It’s very useful for testing. See this (sort of) unit test I wrote to (regression-)test a struct: It is of course no replacement for try/catch, it’s …