ScriptSpot

Plugin

SciExtLexer.dll

By Mike Biddlecombe · 2009-12-18

Votes
36
Description

This is an external lexer for the scintilla based maxscript editor that ships with 3dsmax 2008 and later.

It adds syntax highlighting for C++, C#, Python and Ruby source code to the editor. This comes in handy if you are doing just-in-time compilation of external source through .NET.

Follow the included readme.rtf file to install it and configure your MXS_Editor.properties file.

The attached source code consists of a stripped down version of the full Scintilla code base (get the full version at www.scintilla.org) All I've added is a front end that wraps the internal lexer for each language (the ExtLex.cxx file under the vcbuild folder)

It should be trivial to add/recover support for additional languages.

Hope you find this helpful.

.biddle

biddle at mail dot com

NOTE: My original submission had a broken 32bit dll. It should be fixed now

Attachments

Tags: editor, python, maxscript, syntax highlight, scintilla, code, csharp, c#, ruby, c++

Comments (5)

MarTroYx · 2009-12-18

ok , it does work with the sample file :-)

MarTroYx · 2009-12-18

doesn't seam to work in 2010 x64 ...I'm pretty sure I get your install step right ...but still I don't see the new choice from open file ???

MarTroYx · 2009-12-18

in comment I mean because , I sometime comment C# snippet and it would make so much readable :-)

MarTroYx · 2009-12-18

Thank, look very usefull ...do you think it could be possible to do something like mixed language using custom preprocess directive ex:

some maxscript
...
...
...
--:begin C#
...
...
--:end C#

that would be sooo cool :-)

Mike Biddlecombe · 2009-12-18

Right now you can only highlight it as MXS or C# you can't have both at the same time. You can use the language menu to flip back and for between the two though.

Nothing is keeping you from having a block of MXS code inside a C# file. I leverage this trick by placing my cursor on a comment in the .cs file that actually contains mxs launch code and running it. Something like:

/*
--Use shift-enter (or numpad-enter) to execute this:
myCompileCSharpFunc (getSourceFileName())
*/