SciExtLexer.dll

36 votes

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

Video URL: 
AttachmentSize
SciExtLexer.zip70.64 KB
SciExtLexer_src.zip524.82 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Mike Biddlecombe's picture

Right now you can only

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())
*/

MarTroYx's picture

ok , it does work with the

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

MarTroYx's picture

doesn't seam to work in 2010

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's picture

in comment I mean because ,

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

MarTroYx's picture

Thank, look very usefull

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 :-)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.