-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
746a4b1
commit 4fbdd2f
Showing
19 changed files
with
573 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Prism.languages.maxscript = { | ||
'comment': { | ||
pattern: /\/\*[\s\S]*?(?:\*\/|$)|--.*/, | ||
greedy: true | ||
}, | ||
'string': { | ||
pattern: /(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/, | ||
lookbehind: true, | ||
greedy: true | ||
}, | ||
'path': { | ||
pattern: /\$(?:[\w/\\.*?]|'[^']*')*/, | ||
greedy: true, | ||
alias: 'string' | ||
}, | ||
|
||
'function-definition': { | ||
pattern: /(\b(?:function|fn)\s+)\w+\b/, | ||
lookbehind: true, | ||
alias: 'function' | ||
}, | ||
|
||
'argument': { | ||
pattern: /\b[a-z_]\w*(?=:)/i, | ||
alias: 'attr-name' | ||
}, | ||
|
||
'keyword': /\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i, | ||
'boolean': /\b(?:true|false|on|off)\b/, | ||
|
||
'time': { | ||
pattern: /(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/, | ||
lookbehind: true, | ||
alias: 'number' | ||
}, | ||
'number': [ | ||
{ | ||
pattern: /(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/, | ||
lookbehind: true | ||
}, | ||
/\b(?:e|pi)\b/ | ||
], | ||
|
||
'constant': /\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/, | ||
'color': { | ||
pattern: /\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/i, | ||
alias: 'constant' | ||
}, | ||
|
||
'operator': /[-+*/<>=!]=?|[&^]|#(?!\()/, | ||
'punctuation': /[()\[\]{}.:,;]|#(?=\()|\\$/m | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<h2>Strings</h2> | ||
<pre><code>-- Source: https://help.autodesk.com/view/MAXDEV/2022/ENU/?guid=GUID-5E5E1A71-24E2-4605-9720-2178B941DECC | ||
|
||
plugin RenderEffect MonoChrome | ||
name:"MonoChrome" | ||
classID:#(0x9e6e9e77, 0xbe815df4) | ||
( | ||
rollout about_rollout "About..." | ||
( | ||
label about_label "MonoChrome Filter" | ||
) | ||
on apply r_image progressCB: do | ||
( | ||
progressCB.setTitle "MonoChrome Effect" | ||
local oldEscapeEnable = escapeEnable | ||
escapeEnable = false | ||
bmp_w = r_image.width | ||
bmp_h = r_image.height | ||
for y = 0 to bmp_h-1 do | ||
( | ||
if progressCB.progress y (bmp_h-1) then exit | ||
pixel_line = getPixels r_image [0,y] bmp_w | ||
for x = 1 to bmp_w do | ||
( | ||
p_v = pixel_line[x].value | ||
pixel_line[x] = color p_v p_v p_v pixel_line[x].alpha | ||
)--end x loop | ||
setPixels r_image [0,y] pixel_line | ||
)--end y loop | ||
escapeEnable = oldEscapeEnable | ||
)--end on apply | ||
)--end plugin | ||
</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
true false | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["boolean", "true"], ["boolean", "false"] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
black | ||
blue | ||
brown | ||
gray | ||
green | ||
orange | ||
red | ||
white | ||
yellow | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["constant", "black"], | ||
["constant", "blue"], | ||
["constant", "brown"], | ||
["constant", "gray"], | ||
["constant", "green"], | ||
["constant", "orange"], | ||
["constant", "red"], | ||
["constant", "white"], | ||
["constant", "yellow"] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* this is a long comment | ||
blah blah | ||
print "debug 1" -- code commented out | ||
more comments | ||
*/ | ||
|
||
for i in 1 to 10 do(/* messageBox "in loop"; */frabulate i ) | ||
|
||
-- comment | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["comment", "/* this is a long comment\r\nblah blah\r\nprint \"debug 1\" -- code commented out\r\nmore comments\r\n*/"], | ||
|
||
["keyword", "for"], | ||
" i ", | ||
["keyword", "in"], | ||
["number", "1"], | ||
["keyword", "to"], | ||
["number", "10"], | ||
["keyword", "do"], | ||
["punctuation", "("], | ||
["comment", "/* messageBox \"in loop\"; */"], | ||
"frabulate i ", | ||
["punctuation", ")"], | ||
|
||
["comment", "-- comment"] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
dontcollect | ||
ok | ||
silentValue | ||
undefined | ||
unsupplied | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["color", "dontcollect"], | ||
["color", "ok"], | ||
["color", "silentValue"], | ||
["color", "undefined"], | ||
["color", "unsupplied"] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
function my_add a b = a + b | ||
|
||
fn factorial n = if n <= 0 then 1 else n * factorial (n - 1) | ||
|
||
mapped function rand_color x = | ||
x.wireColor = random (color 0 0 0) (color 255 255 255) | ||
|
||
fn starfield count extent:[200,200,200] pos:[0,0,0] = | ||
( | ||
-- something | ||
) | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "function"], | ||
["function-definition", "my_add"], | ||
" a b ", | ||
["operator", "="], | ||
" a ", | ||
["operator", "+"], | ||
" b\r\n\r\n", | ||
|
||
["keyword", "fn"], | ||
["function-definition", "factorial"], | ||
" n ", | ||
["operator", "="], | ||
["keyword", "if"], | ||
" n ", | ||
["operator", "<="], | ||
["number", "0"], | ||
["keyword", "then"], | ||
["number", "1"], | ||
["keyword", "else"], | ||
" n ", | ||
["operator", "*"], | ||
" factorial ", | ||
["punctuation", "("], | ||
"n ", | ||
["operator", "-"], | ||
["number", "1"], | ||
["punctuation", ")"], | ||
|
||
["keyword", "mapped"], | ||
["keyword", "function"], | ||
["function-definition", "rand_color"], | ||
" x ", | ||
["operator", "="], | ||
|
||
"\r\n x", | ||
["punctuation", "."], | ||
"wireColor ", | ||
["operator", "="], | ||
" random ", | ||
["punctuation", "("], | ||
"color ", | ||
["number", "0"], | ||
["number", "0"], | ||
["number", "0"], | ||
["punctuation", ")"], | ||
["punctuation", "("], | ||
"color ", | ||
["number", "255"], | ||
["number", "255"], | ||
["number", "255"], | ||
["punctuation", ")"], | ||
|
||
["keyword", "fn"], | ||
["function-definition", "starfield"], | ||
" count ", | ||
["argument", "extent"], | ||
["punctuation", ":"], | ||
["punctuation", "["], | ||
["number", "200"], | ||
["punctuation", ","], | ||
["number", "200"], | ||
["punctuation", ","], | ||
["number", "200"], | ||
["punctuation", "]"], | ||
["argument", "pos"], | ||
["punctuation", ":"], | ||
["punctuation", "["], | ||
["number", "0"], | ||
["punctuation", ","], | ||
["number", "0"], | ||
["punctuation", ","], | ||
["number", "0"], | ||
["punctuation", "]"], | ||
["operator", "="], | ||
|
||
["punctuation", "("], | ||
|
||
["comment", "-- something"], | ||
|
||
["punctuation", ")"] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
about; | ||
and; | ||
animate; | ||
as; | ||
at; | ||
attributes; | ||
by; | ||
case; | ||
catch; | ||
collect; | ||
continue; | ||
coordsys; | ||
do; | ||
else; | ||
exit; | ||
fn; | ||
for; | ||
from; | ||
function; | ||
global; | ||
if; | ||
in; | ||
local; | ||
macroscript; | ||
mapped; | ||
max; | ||
not; | ||
of; | ||
off; | ||
on; | ||
or; | ||
parameters; | ||
persistent; | ||
plugin; | ||
rcmenu; | ||
return; | ||
rollout; | ||
set; | ||
struct; | ||
then; | ||
throw; | ||
to; | ||
tool; | ||
try; | ||
undo; | ||
utility; | ||
when; | ||
where; | ||
while; | ||
with; | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "about"], ["punctuation", ";"], | ||
["keyword", "and"], ["punctuation", ";"], | ||
["keyword", "animate"], ["punctuation", ";"], | ||
["keyword", "as"], ["punctuation", ";"], | ||
["keyword", "at"], ["punctuation", ";"], | ||
["keyword", "attributes"], ["punctuation", ";"], | ||
["keyword", "by"], ["punctuation", ";"], | ||
["keyword", "case"], ["punctuation", ";"], | ||
["keyword", "catch"], ["punctuation", ";"], | ||
["keyword", "collect"], ["punctuation", ";"], | ||
["keyword", "continue"], ["punctuation", ";"], | ||
["keyword", "coordsys"], ["punctuation", ";"], | ||
["keyword", "do"], ["punctuation", ";"], | ||
["keyword", "else"], ["punctuation", ";"], | ||
["keyword", "exit"], ["punctuation", ";"], | ||
["keyword", "fn"], ["punctuation", ";"], | ||
["keyword", "for"], ["punctuation", ";"], | ||
["keyword", "from"], ["punctuation", ";"], | ||
["keyword", "function"], ["punctuation", ";"], | ||
["keyword", "global"], ["punctuation", ";"], | ||
["keyword", "if"], ["punctuation", ";"], | ||
["keyword", "in"], ["punctuation", ";"], | ||
["keyword", "local"], ["punctuation", ";"], | ||
["keyword", "macroscript"], ["punctuation", ";"], | ||
["keyword", "mapped"], ["punctuation", ";"], | ||
["keyword", "max"], ["punctuation", ";"], | ||
["keyword", "not"], ["punctuation", ";"], | ||
["keyword", "of"], ["punctuation", ";"], | ||
["keyword", "off"], ["punctuation", ";"], | ||
["keyword", "on"], ["punctuation", ";"], | ||
["keyword", "or"], ["punctuation", ";"], | ||
["keyword", "parameters"], ["punctuation", ";"], | ||
["keyword", "persistent"], ["punctuation", ";"], | ||
["keyword", "plugin"], ["punctuation", ";"], | ||
["keyword", "rcmenu"], ["punctuation", ";"], | ||
["keyword", "return"], ["punctuation", ";"], | ||
["keyword", "rollout"], ["punctuation", ";"], | ||
["keyword", "set"], ["punctuation", ";"], | ||
["keyword", "struct"], ["punctuation", ";"], | ||
["keyword", "then"], ["punctuation", ";"], | ||
["keyword", "throw"], ["punctuation", ";"], | ||
["keyword", "to"], ["punctuation", ";"], | ||
["keyword", "tool"], ["punctuation", ";"], | ||
["keyword", "try"], ["punctuation", ";"], | ||
["keyword", "undo"], ["punctuation", ";"], | ||
["keyword", "utility"], ["punctuation", ";"], | ||
["keyword", "when"], ["punctuation", ";"], | ||
["keyword", "where"], ["punctuation", ";"], | ||
["keyword", "while"], ["punctuation", ";"], | ||
["keyword", "with"], ["punctuation", ";"] | ||
] |
Oops, something went wrong.