I've been putting together a maxscript syntax file and have run into a couple of problems:
Folding of functions is tricky; so far it either ends at the 1st close-bracket ')' or not at all.
Also the 'on events show up in the methods part of the code explorer as 'do(' instead of 'on button pressed do('.
Any help most appreciated.
Syntax file is attached...
Code: Select all
function striplastnums str = (
astr = str
nn = (trimright astr "1234567890")
fp = ""
if nn.count != str.count do(
stl = nn.count
if stl != 0 do(
fp = (replace str 1 stl "")
)
)
return #(nn, fp)
)
on button pressed do(
p = striplastnums alist.selected
alist.items[alist.selection] = p[1]
)