Character encoding in MAXScript

loocas | 3ds Max,maxscript,technical | Thursday, April 14th, 2011

Since Max 2008 (I believe) we have the great SciTE MAXScript editor in Max. It’s an awesome IDE. Very flexible, very lightweight, fast and powerful. Sure, there are much more robust or more beefed up IDEs out there, but for an integrated, dedicated, MAXScript IDE, it’s simply awesome. It’s so good I installed SciTE standalone and use it as an IDE for my Python and other scripting tasks.

So, I’ve been trying to unify my code page across the SciTE editors (the standalone and the integrated Max’s editor) and settled on a standard UTF-8 encoding, which seemed to work just great. However, I just bumped into a very strange bug where Deadline reported a “bad syntax” error on my jobs which were using PostLoad scripts to automatically repath all my assets in my scenes.

The worst part was, the scripts were perfectly fine. They worked just fine in my local Max sessions, but they refused to work when run on the farm. I accidentaly discovered that it was related to the file’s encoding. When I resaved the file in Notepad (on my server) using the ANSI character encoding, the jobs suddenly started to work.

So, if you’re using a UTF-8 encoding in your SciTE editors, including and especially in the integrated Pro Editor in 3ds Max, make sure to save the scripts in a different encoding before executing them on the render farm.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress | Theme by Roy Tanck