├── icon.png ├── images ├── variables.gif ├── autocomplete.gif ├── runner_option.png ├── send_to_maya.gif └── syntax_highlight.gif ├── json.d.ts ├── .gitignore ├── .editorconfig ├── .vscodeignore ├── tsconfig.json ├── .vscode ├── tasks.json └── launch.json ├── tslint.json ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── language-configuration.json ├── LICENSE ├── CHANGELOG.md ├── snippets └── mel.json ├── package.json ├── README.md ├── src └── extension.ts └── syntaxes └── mel.tmLanguage.json /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artbycrunk/vscode-maya/HEAD/icon.png -------------------------------------------------------------------------------- /images/variables.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artbycrunk/vscode-maya/HEAD/images/variables.gif -------------------------------------------------------------------------------- /json.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.json' { 2 | const value: any; 3 | export default value; 4 | } 5 | -------------------------------------------------------------------------------- /images/autocomplete.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artbycrunk/vscode-maya/HEAD/images/autocomplete.gif -------------------------------------------------------------------------------- /images/runner_option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artbycrunk/vscode-maya/HEAD/images/runner_option.png -------------------------------------------------------------------------------- /images/send_to_maya.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artbycrunk/vscode-maya/HEAD/images/send_to_maya.gif -------------------------------------------------------------------------------- /images/syntax_highlight.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artbycrunk/vscode-maya/HEAD/images/syntax_highlight.gif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.vsix 3 | TODO 4 | scrap 5 | 6 | .mypy_cache 7 | *.js 8 | *.js.map 9 | 10 | .history 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | charset = utf-8 7 | trim_trailing_whitespace = false 8 | insert_final_newline = false 9 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | .history 5 | .github 6 | vsc-extension-quickstart.md 7 | **/*.ts 8 | **/tsconfig.json 9 | !file.ts 10 | scrap 11 | python 12 | python/maya/.mypy_cache 13 | *.vsix -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "outDir": "out", 6 | "lib": ["es6"], 7 | "sourceMap": true, 8 | "strict": false, 9 | "rootDir": "src", 10 | "forceConsistentCasingInFileNames": true, 11 | "experimentalDecorators": true 12 | }, 13 | "exclude": ["node_modules", ".vscode-test"] 14 | } 15 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "warning", 3 | "extends": [ 4 | "tslint:recommended" 5 | ], 6 | "jsRules": {}, 7 | "rules": { 8 | "semicolon":false, 9 | "no-trailing-whitespace":false, 10 | "curly":false, 11 | "no-console":false, 12 | "one-line":false, 13 | "member-access": false, 14 | "triple-equals":false, 15 | "arrow-parens": false, 16 | "no-consecutive-blank-lines": false, 17 | "only-arrow-functions": false, 18 | "whitespace":false, 19 | "prefer-const":false, 20 | "quotemark":false 21 | }, 22 | "rulesDirectory": [] 23 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": ["--extensionDevelopmentPath=${workspaceFolder}"], 14 | "outFiles": ["${workspaceFolder}/out/**/*.js"], 15 | "preLaunchTask": "npm: compile" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | // symbol used for single line comment. 4 | "lineComment": "//", 5 | // symbols used for start and end a block comment. 6 | "blockComment": ["/*", "*/"] 7 | }, 8 | 9 | // symbols used as brackets 10 | "brackets": [["{", "}"], ["[", "]"], ["(", ")"]], 11 | 12 | // symbols that are auto closed when typing 13 | "autoClosingPairs": [ 14 | { 15 | "open": "{", 16 | "close": "}" 17 | }, 18 | { 19 | "open": "[", 20 | "close": "]" 21 | }, 22 | { 23 | "open": "(", 24 | "close": ")" 25 | }, 26 | { 27 | "open": "\"", 28 | "close": "\"", 29 | "notIn": ["string"] 30 | }, 31 | { 32 | "open": "'", 33 | "close": "'", 34 | "notIn": ["string", "comment"] 35 | }, 36 | { 37 | "open": "`", 38 | "close": "`", 39 | "notIn": ["string", "comment"] 40 | }, 41 | { 42 | "open": "/**", 43 | "close": " */", 44 | "notIn": ["string"] 45 | } 46 | ], 47 | 48 | // symbols that that can be used to surround a selection 49 | "surroundingPairs": [["{", "}"], ["[", "]"], ["(", ")"], ["\"", "\""], ["'", "'"], ["`", "`"]] 50 | } 51 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-2021 Savio Fernandes 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## Version 1.5.0 (October 30, 2021) 4 | * Enhancement: Add support for Maya 2022 with Python 3.7. (@artbycrunk in [issues/25](https://github.com/artbycrunk/vscode-maya/issues/25)) 5 | 6 | ## Version 1.4.0 (May 01, 2020) 7 | * Enhancement: ctrl+shift+o go to symbol support. (@artbycrunk in [issues/11](https://github.com/artbycrunk/vscode-maya/issues/11)) 8 | * Enhancement: Outline support for functions and variables (@artbycrunk in [issues/11](https://github.com/artbycrunk/vscode-maya/issues/12)) 9 | 10 | ## Version 1.3.0 (April 27, 2020) 11 | * Fix: Output line numbers are off by 1 (@artbycrunk in [issues/14](https://github.com/artbycrunk/vscode-maya/issues/14)) 12 | * Enhancement: Added telemetry for basic events 13 | 14 | ## Version 1.2.0 (Dec 21, 2019) 15 | * Add Help on hover, with link to read the documentation online. 16 | * Changed settings title to MayaCode to be in line with api docs 17 | * Added better error msg when cannot connect to maya via commandPort. 18 | 19 | ## Version 1.1.0 (Aug 18, 2019) 20 | * Add autocomplete for MEL variables. [issues/9](https://github.com/artbycrunk/vscode-maya/issues/9) 21 | * Speedup autocomplete processing. 22 | 23 | ## Version 1.0.1 (Jul 06, 2019) 24 | * Fixed issue with non-ascii characters in python code [issues/5](https://github.com/artbycrunk/vscode-maya/issues/5) 25 | 26 | ## Version 1.0.0 (May 15, 2019) 27 | * Rewrite the code to work over a single Maya socket. 28 | * Use temp files to send code between vscode and maya. 29 | * Add support for sending complete files to maya 30 | thanks @Ziriax or the pull request. [pull/1](https://github.com/artbycrunk/vscode-maya/pull/1) 31 | 32 | ## Version 0.0.7 33 | * Fix lookup regex for faster autocompletion. 34 | 35 | ## Version 0.0.6 36 | * Updated Readme with gifs for demo. 37 | 38 | ## Version 0.0.5 39 | * Bugfix for completions not found. 40 | 41 | ## Version 0.0.4 42 | * Added support for autocompletion of MEL commands 43 | 44 | ## Version 0.0.3 45 | * Added status bar indication when maya port is connected. 46 | * Added context option, to select code and right-click, ```Send to Maya``` 47 | 48 | ## Version 0.0.2 49 | * Added commands ```Send to Maya``` via command port. 50 | * Added Snippets for MEL code 51 | * Added support for MEL grammar (Functions, comments, etc) 52 | * Added support MEL language (auto closing pairs, brackets, surrounding pairs) 53 | -------------------------------------------------------------------------------- /snippets/mel.json: -------------------------------------------------------------------------------- 1 | { 2 | "if": { 3 | "prefix": "if", 4 | "body": ["if (${1:expression})", "{", "\t${2:statement};", "}"], 5 | "description": "Code snippet for an if statement" 6 | }, 7 | "if/else": { 8 | "prefix": "if/else", 9 | "body": ["if (${1:expression})", "{", "\t${2:statement};", "}else:", "\t${3:statement};", "}"], 10 | "description": "Code snippet for an if statement with else" 11 | }, 12 | "elseif": { 13 | "prefix": "elseif", 14 | "body": ["else if (${1:expression})", "{", "\t${2:statement};", "}"], 15 | "description": "Code snippet for an else if" 16 | }, 17 | "else": { 18 | "prefix": "else", 19 | "body": ["else{", "\t${1:statement};", "}"], 20 | "description": "Code snippet for an else" 21 | }, 22 | "do/while": { 23 | "prefix": "do/while", 24 | "body": ["do {", "\t${1:statement};", "}", "while(${2:expression})"], 25 | "description": "Code snippet for a do while loop" 26 | }, 27 | "switch/case": { 28 | "prefix": "switch/case", 29 | "body": [ 30 | "switch (${1:expression})", 31 | "{", 32 | "\tcase ${2:value1}:", 33 | "\t\t${3:expression};", 34 | "\t\tbreak;", 35 | "\tcase ${4:value1}:", 36 | "\t\t${5:expression};", 37 | "\t\tbreak;", 38 | "}" 39 | ], 40 | "description": "Code snippet for a switch case" 41 | }, 42 | "proc": { 43 | "prefix": "proc", 44 | "body": [ 45 | "proc ${1:return_type} ${2:procname}(${3:arg_list})", 46 | "{", 47 | "\t${4:statement};", 48 | "\treturn ${5:return};", 49 | "}" 50 | ], 51 | "description": "Code snippet for a procedure" 52 | }, 53 | "proc(global)": { 54 | "prefix": "proc(global)", 55 | "body": [ 56 | "global proc ${1:return_type} ${2:procname}(${3:arg_list})", 57 | "{", 58 | "\t${4:statement};", 59 | "\treturn ${5:return};", 60 | "}" 61 | ], 62 | "description": "Code snippet for a global procedure" 63 | }, 64 | "for/in": { 65 | "prefix": "for/in", 66 | "body": ["for (${1:var} in ${2:array})", "{", "\t${4:statement};", "}"], 67 | "description": "Code snippet for a for loop" 68 | }, 69 | "for": { 70 | "prefix": "for", 71 | "body": ["for (${1:var}=0; ${1:var}<(size(${2:array})-1); ${1:var}++)", "{", "\t${4:statement};", "}"], 72 | "description": "Code snippet for a for loop with counter" 73 | }, 74 | "while": { 75 | "prefix": "while", 76 | "body": ["while (${1:condition})", "{", "\t${2:statement};", "}"], 77 | "description": "Code snippet for a for while loop" 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mayacode", 3 | "displayName": "MayaCode", 4 | "description": "A Visual Studio Code extension with support for coding for Maya.", 5 | "version": "1.5.0", 6 | "publisher": "saviof", 7 | "author": { 8 | "name": "Savio Fernandes" 9 | }, 10 | "license": "MIT", 11 | "homepage": "https://github.com/artbycrunk/vscode-maya", 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/artbycrunk/vscode-maya" 15 | }, 16 | "bugs": { 17 | "url": "https://github.com/artbycrunk/vscode-maya/issues" 18 | }, 19 | "icon": "icon.png", 20 | "engines": { 21 | "vscode": "^1.20.0" 22 | }, 23 | "keywords": [ 24 | "maya", 25 | "mel", 26 | "python", 27 | "autodesk maya" 28 | ], 29 | "categories": [ 30 | "Programming Languages", 31 | "Snippets", 32 | "Other" 33 | ], 34 | "activationEvents": [ 35 | "onLanguage:mel", 36 | "onLanguage:python", 37 | "onCommand:mayacode.sendPythonToMaya", 38 | "onCommand:mayacode.sendMelToMaya" 39 | ], 40 | "main": "./out/extension.js", 41 | "scripts": { 42 | "vscode:prepublish": "npm run compile", 43 | "compile": "tsc -p ./", 44 | "watch": "tsc -watch -p ./" 45 | }, 46 | "devDependencies": { 47 | "@types/node": "^12.12.0", 48 | "@types/vscode": "^1.20.0", 49 | "tslint": "^5.19.0", 50 | "typescript": "^3.8.3", 51 | "vscode-test": "^1.3.0" 52 | }, 53 | "dependencies": { 54 | "vscode-extension-telemetry": "^0.1.7" 55 | }, 56 | "contributes": { 57 | "languages": [ 58 | { 59 | "id": "mel", 60 | "aliases": [ 61 | "Maya MEL", 62 | "MEL", 63 | "Mel", 64 | "mel" 65 | ], 66 | "extensions": [ 67 | ".mel", 68 | ".ma" 69 | ], 70 | "configuration": "./language-configuration.json" 71 | } 72 | ], 73 | "grammars": [ 74 | { 75 | "language": "mel", 76 | "scopeName": "source.mel", 77 | "path": "./syntaxes/mel.tmLanguage.json" 78 | } 79 | ], 80 | "snippets": [ 81 | { 82 | "language": "mel", 83 | "path": "./snippets/mel.json" 84 | } 85 | ], 86 | "commands": [ 87 | { 88 | "command": "mayacode.sendPythonToMaya", 89 | "title": "Send Python Code to Maya", 90 | "category": "Maya" 91 | }, 92 | { 93 | "command": "mayacode.sendMelToMaya", 94 | "title": "Send MEL Code to Maya", 95 | "category": "Maya" 96 | } 97 | ], 98 | "configuration": { 99 | "type": "object", 100 | "title": "MayaCode", 101 | "properties": { 102 | "mayacode.mel.port": { 103 | "type": "integer", 104 | "default": 7001, 105 | "description": "The port over which to send mel commands." 106 | }, 107 | "mayacode.python.port": { 108 | "type": "integer", 109 | "default": 5678, 110 | "description": "The port over which to debug python files (uses ptvsd module)" 111 | }, 112 | "mayacode.hostname": { 113 | "type": "string", 114 | "default": "localhost", 115 | "description": "The hostname of the machine which has a maya instance running." 116 | }, 117 | "mayacode.runner.latest": { 118 | "type": "boolean", 119 | "default": true, 120 | "description": "Run for Maya 2022 and above" 121 | }, 122 | "mayacode.telemetry": { 123 | "type": "boolean", 124 | "default": true 125 | } 126 | } 127 | }, 128 | "keybindings": [ 129 | { 130 | "command": "mayacode.sendPythonToMaya", 131 | "key": "alt+shift+m", 132 | "mac": "ctrl+shift+m", 133 | "when": "editorTextFocus && editorLangId == 'python'" 134 | }, 135 | { 136 | "command": "mayacode.sendMelToMaya", 137 | "key": "alt+shift+m", 138 | "mac": "ctrl+shift+m", 139 | "when": "editorTextFocus && editorLangId == 'mel'" 140 | } 141 | ], 142 | "menus": { 143 | "editor/context": [ 144 | { 145 | "command": "mayacode.sendPythonToMaya", 146 | "when": "editorTextFocus && editorLangId == 'python'", 147 | "group": "navigation" 148 | }, 149 | { 150 | "command": "mayacode.sendMelToMaya", 151 | "when": "editorTextFocus && editorLangId == 'mel'", 152 | "group": "navigation" 153 | } 154 | ], 155 | "explorer/context": [ 156 | { 157 | "command": "mayacode.sendPythonToMaya", 158 | "group": "mayacode" 159 | }, 160 | { 161 | "command": "mayacode.sendMelToMaya", 162 | "group": "mayacode" 163 | } 164 | ] 165 | } 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Maya Extension for Visual Studio Code 2 | 3 | [![Version](https://vsmarketplacebadge.apphb.com/version/saviof.mayacode.svg)](https://marketplace.visualstudio.com/items?itemName=saviof.mayacode) 4 | [![Installs](https://vsmarketplacebadge.apphb.com/installs/saviof.mayacode.svg)](https://marketplace.visualstudio.com/items?itemName=saviof.mayacode) 5 | [![Downloads](https://vsmarketplacebadge.apphb.com/downloads/saviof.mayacode.svg)](https://marketplace.visualstudio.com/items?itemName=saviof.mayacode) 6 | [![Ratings](https://vsmarketplacebadge.apphb.com/rating/saviof.mayacode.svg)](https://marketplace.visualstudio.com/items?itemName=saviof.mayacode) 7 | 8 | [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/artbycrunk/vscode-maya.svg)](https://isitmaintained.com/project/artbycrunk/vscode-maya "Average time to resolve an issue") 9 | [![Percentage of issues still open](https://isitmaintained.com/badge/open/artbycrunk/vscode-maya.svg)](https://isitmaintained.com/project/artbycrunk/vscode-maya "Percentage of issues still open") 10 | 11 | [![](https://img.shields.io/badge/TWITTER-%40artbycrunk-blue.svg?logo=twitter&style=flat)](https://twitter.com/artbycrunk) 12 | [![](https://img.shields.io/badge/gitter-join_chat-1dce73.svg?style=flat&logo=gitter-white)](https://gitter.im/vscode-maya/vscode-maya) 13 | 14 | 15 | A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/items?itemName=saviof.mayacode) with support for coding for Maya. 16 | 17 | ## Features 18 | 19 | * Syntax Highlight MEL scripts. 20 | * Hierarchical document tree in the [outline view](https://code.visualstudio.com/docs/getstarted/userinterface#_outline-view). 21 | * [Breadcrumbs](https://code.visualstudio.com/updates/v1_26#_breadcrumbs) support. 22 | 23 | * Autocomplete MEL commands as you type ( along with flag info ) 24 | 25 | > ![Autocomplete MEL commands as you type](./images/autocomplete.gif "Autocomplete MEL commands as you type") 26 | 27 | * Autocomplete MEL variables as you type 28 | 29 | > ![Autocomplete MEL variables as you type](./images/variables.gif "Autocomplete MEL variables as you type") 30 | 31 | * Send code to Maya via command port (MEL or Python). 32 | 33 | > ![Send code to Maya via command port](./images/send_to_maya.gif "Send code to Maya via command port") 34 | 35 | * Support auto closing brackets, quotes and ticks 36 | 37 | > ![Syntax Highlight MEL scripts](./images/syntax_highlight.gif "Syntax Highlight MEL scripts.") 38 | 39 | 40 | ## Useful commands 41 | 42 | Open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands: 43 | 44 | Command | Description 45 | --- | --- 46 | ```Maya: Send Python Code to Maya``` | Send Python code from current editor in Maya. 47 | ```Maya: Send MEL Code to Maya``` | Send MEL code from current editor in Maya. 48 | 49 | You can also select a block of code in the editor 50 | and ```Right-click -> Send Code to Maya```, this is based on the current working language (Mel or Python). 51 | 52 | ## Update for Maya 2022 and above. 53 | 54 | > ![Option for Maya 2022 and above](./images/runner_option.png "Option for Maya 2022 and above") 55 | 56 | ## Opening the correct ports for Send to Maya Commands. 57 | 58 | To open the correct ports in maya, you can use the following code. 59 | 60 | `Note: If your using a extension version higher than 0.9, then MEL and Python code use the same port in maya.` 61 | 62 | In the Maya script editor MEL Tab. 63 | ``` 64 | commandPort -name "localhost:7001" -sourceType "mel" -echoOutput; 65 | ``` 66 | 67 | ## Snippets 68 | 69 | |Prefixes|Description| 70 | |--------|-----------| 71 | |if|Code snippet for an if statement| 72 | |if/else|Code snippet for an if statement with else| 73 | |elseif|Code snippet for an else if| 74 | |else|Code snippet for an else| 75 | |do/while|Code snippet for a do while loop| 76 | |switch/case|Code snippet for a switch case| 77 | |proc|Code snippet for a procedure| 78 | |proc(global)|Code snippet for a global procedure| 79 | |for/in|Code snippet for a for loop| 80 | |for|Code snippet for a for loop with counter| 81 | |while|Code snippet for a for while loop| 82 | 83 | ## Requirements 84 | 85 | Autodesk Maya tested using Maya 2016 Windows and Linux but should work with all versions. 86 | 87 | ## Issues, feature requests, and contributions 88 | 89 | * If you come across a problem with the extension, please [file an issue](https://github.com/artbycrunk/vscode-maya/issues) 90 | * Contributions are always welcome! 91 | * Any and all feedback is appreciated and welcome! 92 | - If someone has already [filed an issue](https://github.com/artbycrunk/vscode-maya/issues) that encompasses your feedback, please leave a 👍/👎 reaction on the issue 93 | - Otherwise please file a new issue 94 | 95 | ## Release Notes 96 | 97 | See [CHANGELOG.md](./CHANGELOG.md) 98 | 99 | See [Recent Releases](https://github.com/artbycrunk/vscode-maya/releases) 100 | 101 | **Enjoy!** 102 | -------------------------------------------------------------------------------- /src/extension.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import * as vscode from 'vscode'; 4 | import * as data from './completions.json'; 5 | 6 | import { Socket } from 'net'; 7 | import * as os from 'os'; 8 | import * as fs from 'fs'; 9 | import * as path from 'path'; 10 | 11 | var net = require('net'); 12 | import TelemetryReporter from 'vscode-extension-telemetry'; 13 | 14 | let mayaportStatusBar: vscode.StatusBarItem; 15 | let socket_mel: Socket; 16 | let port_mel: string; 17 | let reporter: TelemetryReporter; // telemetry reporter 18 | 19 | // all events will be prefixed with this event name 20 | // extension version will be reported as a property with each event 21 | const extensionId = 'saviof.mayacode'; 22 | const extensionVersion = vscode.extensions.getExtension(extensionId).packageJSON.version; 23 | 24 | // the application insights key (also known as instrumentation key) 25 | const key = '9f14526e-33c3-420b-a5ff-2bdab837dc10'; 26 | 27 | function updateStatusBarItem(langID?: string): void { 28 | let text: string; 29 | if (langID == 'python' || langID == 'mel') { 30 | if (socket_mel instanceof Socket == true && socket_mel.destroyed == false) { 31 | text = `Maya Port : ${port_mel}`; 32 | mayaportStatusBar.text = text; 33 | mayaportStatusBar.show(); 34 | } 35 | } 36 | 37 | if (!text) { 38 | mayaportStatusBar.hide(); 39 | } 40 | } 41 | 42 | export class TimeUtils { 43 | public static getTime(): String { 44 | return new Date() 45 | .toISOString() 46 | .replace(/T/, ' ') 47 | .replace(/\..+/, '') 48 | .split(' ')[1]; 49 | } 50 | } 51 | 52 | export class Logger { 53 | private static _outputPanel; 54 | 55 | public static registerOutputPanel(outputPanel: vscode.OutputChannel) { 56 | this._outputPanel = outputPanel; 57 | } 58 | 59 | public static info(log: string) { 60 | this.typeLog(log, 'INFO'); 61 | } 62 | 63 | public static error(log: string) { 64 | this.typeLog(log, 'ERROR'); 65 | vscode.window.showErrorMessage(log); 66 | } 67 | 68 | public static success(log: String) { 69 | this.typeLog(log, 'SUCCESS'); 70 | } 71 | 72 | public static response(log: String) { 73 | this.typeLog(log, 'RESPONSE'); 74 | } 75 | 76 | private static typeLog(log: String, type: String) { 77 | if (!this._outputPanel) { 78 | return; 79 | } 80 | let util = require('util'); 81 | let time = TimeUtils.getTime(); 82 | if (!log || !log.split) return; 83 | this._outputPanel.appendLine(util.format('MayaCode-%s [%s][%s]\t %s', extensionVersion, time, type, log)); 84 | } 85 | } 86 | 87 | class MelDocumentSymbolProvider implements vscode.DocumentSymbolProvider { 88 | 89 | private getProcRange(ln_start: number, ln_end: number): vscode.Range { 90 | let pos1 = new vscode.Position(ln_start, 0); 91 | let pos2 = new vscode.Position(ln_end, 0); 92 | return new vscode.Range(pos1, pos2); 93 | } 94 | 95 | private getRange(name:string, text:string, ln_num: number): vscode.Range { 96 | let pos = text.indexOf(name) 97 | let pos1 = new vscode.Position(ln_num, pos); 98 | let pos2 = new vscode.Position(ln_num, pos+name.length); 99 | return new vscode.Range(pos1, pos2); 100 | } 101 | 102 | public provideDocumentSymbols( 103 | document: vscode.TextDocument, 104 | token: vscode.CancellationToken): Promise 105 | { 106 | return new Promise((resolve, reject) => 107 | { 108 | let symbols: vscode.DocumentSymbol[] = []; 109 | let nodes = [symbols] 110 | let inside_proc = false 111 | let nested_levels = 0 112 | 113 | let symbolkind_proc = vscode.SymbolKind.Function 114 | let symbolkind_var = vscode.SymbolKind.Variable 115 | 116 | let procTypes = ["string", "string[]"] 117 | 118 | let proc_symbol; 119 | let proc_start_line:number; 120 | 121 | for (var i = 0; i < document.lineCount; i++) { 122 | var line = document.lineAt(i); 123 | let tokens = line.text.split(" ") 124 | 125 | for (var x = 0; x < tokens.length; x++) { 126 | 127 | let cur_token = tokens[x].trim() 128 | 129 | if (cur_token == '{' || cur_token.includes("{")) 130 | {//open 131 | nested_levels += 1} 132 | 133 | // found a proc 134 | if (cur_token == "proc"){ 135 | let proc_name = tokens[x+1] 136 | if(procTypes.includes(proc_name)){ 137 | proc_name = tokens[x+2] 138 | } 139 | 140 | let clean_proc_name = proc_name.split("(")[0] 141 | let proc_range = this.getRange(clean_proc_name, line.text, i); 142 | proc_start_line = i 143 | 144 | proc_symbol = new vscode.DocumentSymbol( 145 | clean_proc_name, 146 | '', 147 | symbolkind_proc, 148 | line.range, proc_range) 149 | 150 | nodes[nodes.length-1].push(proc_symbol) 151 | if (!inside_proc) { 152 | nodes.push(proc_symbol.children) 153 | inside_proc = true 154 | } 155 | } 156 | if (cur_token == "}" || cur_token.includes("}")){ 157 | //closed 158 | nested_levels -= 1 159 | if (inside_proc && nested_levels == 0) { 160 | proc_symbol.range = this.getProcRange(proc_start_line, i) 161 | nodes.pop() 162 | inside_proc = false 163 | } 164 | } 165 | 166 | // found a variable 167 | if (cur_token.startsWith("$")){ 168 | if(tokens[x+1] == "=" || cur_token.includes("=")){ 169 | let clean_var_name = cur_token.split("=")[0] 170 | let var_range = this.getRange(clean_var_name, line.text, i); 171 | let var_symbol = new vscode.DocumentSymbol( 172 | clean_var_name, 173 | '', 174 | symbolkind_var, 175 | var_range, var_range) 176 | 177 | nodes[nodes.length-1].push(var_symbol) 178 | } 179 | } 180 | } 181 | } 182 | resolve(symbols); 183 | }); 184 | } 185 | } 186 | 187 | export function activate(context: vscode.ExtensionContext) { 188 | let outputPanel = vscode.window.createOutputChannel('Maya'); 189 | Logger.registerOutputPanel(outputPanel); 190 | 191 | let cmds: Array = []; 192 | let words: Array = []; 193 | let seen_splits: Array = []; 194 | let completions: Array = []; 195 | let word_completions: Array = []; 196 | let var_completions: Array = []; 197 | let lastStackTrace: string; 198 | const timeOpened = Date.now() 199 | 200 | var config = vscode.workspace.getConfiguration('mayacode'); 201 | 202 | // create telemetry reporter on extension activation 203 | // ensure it gets property disposed 204 | reporter = new TelemetryReporter(extensionId, extensionVersion, key); 205 | context.subscriptions.push(reporter); 206 | reporter.sendTelemetryEvent('start', {}) 207 | 208 | function sendError(error: Error, code: number=0, category='typescript'){ 209 | if(config.get('telemetry')){ 210 | if(error.stack == lastStackTrace) return 211 | Logger.info(`Sending error event`); 212 | reporter.sendTelemetryException(error, { 213 | code: code.toString(), 214 | category, 215 | }) 216 | lastStackTrace = error.stack 217 | } 218 | } 219 | 220 | function sendEvent(event: string, execTime: number=0, fileType:string){ 221 | if(config.get('telemetry')){ 222 | const measurements: {[key: string]: number} = {} 223 | measurements['timeSpent'] = (Date.now() - timeOpened)/1000 224 | measurements['execTime'] = execTime 225 | 226 | const properties: {[key: string]: string} = {} 227 | properties['fileType'] = fileType 228 | 229 | Logger.info(`Sending event`); 230 | reporter.sendTelemetryEvent(event, properties, measurements) 231 | } 232 | } 233 | 234 | function cleanResponse(data: Buffer){ 235 | var dataString = data.toString() 236 | if(dataString.startsWith("Error")){ 237 | dataString = dataString.replace(/MayaCode.py", line (?\d+)/, (...match) => { 238 | let newLineno = match[0].replace(match[1], (+match[1]-1).toString()) 239 | return newLineno; 240 | }) 241 | } 242 | return dataString 243 | } 244 | 245 | function ensureConnection(type: string) { 246 | let socket; 247 | let mayahost: string = config.get('hostname'); 248 | let port: string = config.get('mel.port'); 249 | 250 | socket = socket_mel; 251 | port_mel = port; 252 | 253 | if (socket instanceof Socket == true && socket.destroyed == false) { 254 | Logger.info(`Already active : Port ${port} on Host ${mayahost} for ${type}`); 255 | updateStatusBarItem(type); 256 | } else { 257 | socket = net.createConnection({ port: port, host: mayahost }, () => { 258 | Logger.info(`Connected : Port ${port} on Host ${mayahost} for ${type}`); 259 | updateStatusBarItem(type); 260 | }); 261 | socket.on('error', function(error) { 262 | let errorMsg = `Unable to connect using port ${port} on Host ${mayahost} \nPlease run the below mel command in Maya\`s script editor 263 | 264 | commandPort -n "${mayahost}:${port}" -stp "mel" -echoOutput; 265 | 266 | Error Code : ${error.code}`; 267 | Logger.error(errorMsg); 268 | sendError(error, error.code, 'socket') 269 | }); 270 | 271 | socket.on('data', function(data: Buffer) { 272 | Logger.response(cleanResponse(data)); 273 | }); 274 | 275 | socket.on('end', () => { 276 | Logger.info(`Disconnected from server. ${type} | Port ${port} on Host ${mayahost}`); 277 | updateStatusBarItem(type); 278 | }); 279 | } 280 | return socket; 281 | } 282 | 283 | function send_tmp_file(text: string, type: string) { 284 | let cmd:string, nativePath:string, posixPath:string; 285 | var start = new Date().getTime(); 286 | 287 | if (type == 'python') { 288 | //add encoding http://python.org/dev/peps/pep-0263/ 289 | text = "# -*- coding: utf-8 -*-\n" + text; 290 | nativePath = path.join(os.tmpdir(), "MayaCode.py"); 291 | posixPath = nativePath.replace(/\\/g, "/"); 292 | if(config.get('runner.latest')){ 293 | cmd = `python("exec(open('${posixPath}').read())")`; 294 | }else{ 295 | cmd = `python("execfile('${posixPath}')")`; 296 | } 297 | } 298 | 299 | if (type == 'mel') { 300 | nativePath = path.join(os.tmpdir(), "MayaCode.mel"); 301 | posixPath = nativePath.replace(/\\/g, "/"); 302 | cmd = `source \"${posixPath}\";`; 303 | } 304 | 305 | Logger.info(`Writing text to ${posixPath}...`); 306 | fs.writeFile(nativePath, text, function (err) { 307 | if (err) { 308 | Logger.error(`Failed to write ${type} to temp file ${posixPath}`); 309 | sendError(err, 1, 'filewrite') 310 | } else { 311 | Logger.info(`Executing ${cmd}...`); 312 | send(cmd, type); 313 | var end = new Date().getTime(); 314 | var time = end - start; 315 | sendEvent("send_tmp_file", time, type) 316 | } 317 | }); 318 | } 319 | 320 | function send(text: string, type: string) { 321 | let success: boolean = socket_mel.write(text + '\n'); 322 | // let success: boolean = socket_mel.write(text + '\n', "utf8"); 323 | Logger.info(text); 324 | if (success){ 325 | let successMsg = `Sent ${type} code to Maya...`; 326 | Logger.info(successMsg); 327 | vscode.window.setStatusBarMessage(successMsg); 328 | } 329 | } 330 | 331 | function getText(type: string) { 332 | let editor = vscode.window.activeTextEditor; 333 | let selection = editor.selection; 334 | let text: string; 335 | 336 | if (selection.isEmpty != true) { 337 | Logger.info(`Sending selected ${type} code to maya`); 338 | text = editor.document.getText(selection); 339 | } else { 340 | Logger.info(`Sending all ${type} code to maya`); 341 | text = editor.document.getText(); 342 | } 343 | return text; 344 | } 345 | 346 | function registerDisposables() { 347 | return [ 348 | vscode.window.onDidChangeActiveTextEditor(editor => { 349 | if (mayaportStatusBar !== undefined) { 350 | if (editor !== undefined) { 351 | if (['debug', 'output'].some(part => editor.document.uri.scheme === part)) { 352 | return; 353 | } 354 | } 355 | updateStatusBarItem(editor.document.languageId); 356 | } 357 | }) 358 | ]; 359 | } 360 | 361 | function isNumeric(value) { 362 | return /^-{0,1}\d+$/.test(value); 363 | } 364 | 365 | function process_completions(documentText:string) { 366 | var start = new Date().getTime(); 367 | 368 | if (completions.length == 0) { 369 | Logger.info(`Building command completions`); 370 | 371 | data['completions'].forEach(this_item => { 372 | words.push(this_item['trigger']); 373 | let item = new vscode.CompletionItem(this_item['trigger'], vscode.CompletionItemKind.Function); 374 | item.detail = this_item['trigger']; 375 | item.documentation = this_item['comment']; 376 | completions.push(item); 377 | }); 378 | var end = new Date().getTime(); 379 | var time = end - start; 380 | sendEvent("build-completions", time, "mel") 381 | } 382 | 383 | const _splitTexts = documentText.split(/[^A-Za-z\$1-9]+/); 384 | _splitTexts.forEach(_word => { 385 | if (seen_splits.indexOf(_word) == -1) { 386 | seen_splits.push(_word); 387 | let isVariable = false; 388 | _word = _word.trim(); 389 | if (_word.startsWith('$')) { 390 | isVariable = true; 391 | _word = _word.replace('$', ''); 392 | } 393 | 394 | //negate all numbers and aready added items 395 | if (!isNumeric(_word) && words.indexOf(_word) == -1) { 396 | words.push(_word); 397 | if (isVariable) { 398 | var_completions.push(new vscode.CompletionItem(_word, vscode.CompletionItemKind.Variable)); 399 | } else { 400 | word_completions.push(new vscode.CompletionItem(_word, vscode.CompletionItemKind.Text)); 401 | } 402 | } 403 | } 404 | }); 405 | 406 | var end = new Date().getTime(); 407 | var time = end - start; 408 | Logger.info(`Completion execution time: ${time}`); 409 | } 410 | 411 | function getHoverText(url: string, documentation:string): vscode.MarkdownString { 412 | const text = `${documentation}\n\n[Read Online Help](${url})`; 413 | return new vscode.MarkdownString(text); 414 | } 415 | 416 | let hoverProviderMELdisposable = vscode.languages.registerHoverProvider("mel", { 417 | provideHover(document: vscode.TextDocument, pos: vscode.Position, token: vscode.CancellationToken): vscode.ProviderResult { 418 | 419 | if (cmds.length == 0) { 420 | Logger.info(`Building cmds`); 421 | 422 | data['completions'].forEach(this_item => { 423 | cmds.push(this_item['trigger']); 424 | }); 425 | } 426 | 427 | const range = document.getWordRangeAtPosition(pos); 428 | 429 | if (range === undefined) { 430 | return; 431 | } 432 | 433 | const word = document.getText(range); 434 | 435 | if (cmds.indexOf(word) > -1){ 436 | const helpUrl = `http://help.autodesk.com/cloudhelp/2017/ENU/Maya-Tech-Docs/Commands/${word}.html`; 437 | let documentation = ''; 438 | data['completions'].forEach(this_item => { 439 | if (this_item['trigger'] == word) { 440 | documentation = this_item['comment'].replace(/\n/g, " \n"); 441 | } 442 | }); 443 | return new vscode.Hover(getHoverText(helpUrl, documentation)); 444 | } 445 | 446 | return; 447 | } 448 | } 449 | ); 450 | 451 | context.subscriptions.push(hoverProviderMELdisposable); 452 | 453 | const provider_all = vscode.languages.registerCompletionItemProvider('mel', { 454 | provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token, context) { 455 | 456 | process_completions(document.getText()); 457 | return [...word_completions, ...completions]; 458 | } 459 | }); 460 | 461 | const provider_vars = vscode.languages.registerCompletionItemProvider('mel', { 462 | provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token, context) { 463 | 464 | process_completions(document.getText()); 465 | return [...var_completions]; 466 | } 467 | }, '$'); 468 | 469 | const provider_symbols = vscode.languages.registerDocumentSymbolProvider( 470 | {scheme: "file", language: "mel"}, 471 | new MelDocumentSymbolProvider() 472 | ) 473 | 474 | context.subscriptions.push(provider_symbols); 475 | context.subscriptions.push(provider_all); 476 | context.subscriptions.push(provider_vars); 477 | 478 | const command_mel = vscode.commands.registerCommand('mayacode.sendMelToMaya', function() { 479 | socket_mel = ensureConnection('mel'); 480 | if (!socket_mel.destroyed) { 481 | let text = getText('mel'); 482 | send_tmp_file(text, 'mel'); 483 | } 484 | }); 485 | 486 | context.subscriptions.push(command_mel); 487 | 488 | const command_py = vscode.commands.registerCommand('mayacode.sendPythonToMaya', function() { 489 | socket_mel = ensureConnection('python'); 490 | if (!socket_mel.destroyed) { 491 | let text = getText('python'); 492 | send_tmp_file(text, 'python'); 493 | } 494 | }); 495 | 496 | context.subscriptions.push(command_py); 497 | 498 | mayaportStatusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 100); 499 | context.subscriptions.push(mayaportStatusBar); 500 | 501 | context.subscriptions.push(...registerDisposables()); 502 | } 503 | 504 | export function deactivate(context: vscode.ExtensionContext) { 505 | // This will ensure all pending events get flushed 506 | reporter.dispose(); 507 | } 508 | -------------------------------------------------------------------------------- /syntaxes/mel.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", 3 | "name": "Maya MEL", 4 | "patterns": [ 5 | { 6 | "explanation": "Framework Functions", 7 | "name": "support.function.mel", 8 | "match": "\\b((s(h(ow(ManipCtx|S(hadingGroupAttrEditor|electionInTitle)|H(idden|elp)|Window)|el(f(Button|TabLayout|Layout)|lField)|ading(GeometryRelCtx|Node|Connection|LightRelCtx))|y(s(tem|File)|mbol(Button|CheckBox))|nap(shot|Mode|2to2 |TogetherCtx|Key)|c(ulpt|ene(UIReplacement|Editor)|ale(BrushBrightness |Constraint|Key(Ctx)?)?|r(ipt(Node|Ctx|Table|edPanel(Type)?|Job|EditorInfo)|oll(Field|Layout))|mh)|t(itch(Surface(Points)?|AndExplodeShell )|a(ckTrace|rt(sWith |String ))|r(cmp|i(ng(ToStringArray |Array(Remove(Duplicates | )|C(ount |atenate )|ToString |Intersector))|p )|oke))|i(n(gleProfileBirailSurface)?|ze|gn|mplify)|o(u(nd(Control)?|rce)|ft(Mod(Ctx)?)?|rt)|u(perCtx|rface(S(haderList|ampler))?|b(st(itute(Geometry|AllString )?|ring)|d(M(irror|a(tchTopology|p(SewMove|Cut)))|iv(Crease|DisplaySmoothness)?|C(ollapse|leanTopology)|T(o(Blind|Poly)|ransferUVsToCache)|DuplicateAndConnect|EditUV|ListComponentConversion|AutoProjection)))|p(h(ere|rand)|otLight(PreviewPort)?|aceLocator|r(ing|eadSheetEditor))|e(t(s|MenuMode|Sta(te |rtupMessage|mpDensity )|NodeTypeFlag|ConstraintRestPosition |ToolTo|In(putDeviceMapping|finity)|D(ynamic|efaultShadingGroup|rivenKeyframe)|UITemplate|P(ar(ticleAttr|ent)|roject )|E(scapeCtx|dit(or|Ctx))|Key(Ctx|frame|Path)|F(ocus|luidAttr)|Attr(Mapping)?)|parator|ed|l(ect(Mode|ionConnection|Context|Type|edNodes|Pr(iority|ef)|Key(Ctx)?)?|LoadSettings)|archPathArray )|kin(Cluster|Percent)|q(uareSurface|rt)|w(itchTable|atchDisplayPort)|a(ve(Menu|Shelf|ToolSettings|I(nitialState|mage)|Pref(s|Objects)|Fluid|A(ttrPreset |llShelves))|mpleImage)|rtContext|mooth(step|Curve|TangentSurface))|h(sv_to_rgb|yp(ot|er(Graph|Shade|Panel))|i(tTest|de|lite)|ot(Box|key(Check)?)|ud(Button|Slider(Button)?)|e(lp(Line)?|adsUpDisplay|rmite)|wRe(nder(Load)?|flectionMap)|ard(enPointCurve|ware(RenderPanel)?))|n(o(nLinear|ise|de(Type|IconButton|Outliner|Preset)|rmal(ize |Constraint))|urbs(Boolean|S(elect|quare)|C(opyUVSet|ube)|To(Subdiv|Poly(gonsPref)?)|Plane|ViewDirectionVector )|ew(ton|PanelItems)|ame(space(Info)?|Command|Field))|c(h(oice|dir|eck(Box(Grp)?|DefaultRenderGlobals)|a(n(nelBox|geSubdiv(Region|ComponentDisplayLevel))|racter(Map|OutlineEditor)?))|y(cleCheck|linder)|tx(Completion|Traverse|EditMode|Abort)|irc(ularFillet|le)|o(s|n(str(uctionHistory|ain(Value)?)|nect(ionInfo|Control|Dynamic|Joint|Attr)|t(extInfo|rol)|dition|e|vert(SolidTx|Tessellation|Unit|FromOldLayers |Lightmap)|firmDialog)|py(SkinWeights|Key|Flexor|Array )|l(or(Slider(Grp|ButtonGrp)|Index(SliderGrp)?|Editor|AtPoint)?|umnLayout|lision)|arsenSubdivSelectionList|m(p(onentEditor|utePolysetVolume |actHairSystem )|mand(Port|Echo|Line)))|u(tKey|r(ve(MoveEPCtx|SketchCtx|CVCtx|Intersect|OnSurface|E(ditorCtx|PCtx)|AddPtCtx)?|rent(Ctx|Time(Ctx)?|Unit)))|p(GetSolverAttr|Button|S(olver(Types)?|e(t(SolverAttr|Edit)|am))|C(o(nstraint|llision)|ache)|Tool|P(anel|roperty))|eil|l(ip(Schedule(rOutliner)?|TrimBefore |Editor(CurrentTimeCtx)?)?|ose(Surface|Curve)|uster|ear(Cache)?|amp)|a(n(CreateManip|vas)|tch(Quiet)?|pitalizeString |mera(View)?)|r(oss(Product )?|eate(RenderLayer|MotionField |SubdivRegion|N(ode|ewShelf )|D(isplayLayer|rawCtx)|Editor))|md(Shell|FileOutput))|M(R(ender(ShadowData|Callback|Data|Util|View|Line(Array)?)|ampAttribute)|G(eometryData|lobal)|M(odelMessage|essage|a(nipData|t(erial|rix)))|BoundingBox|S(yntax|ceneMessage|t(atus|ring(Array)?)|imple|pace|elect(ion(Mask|List)|Info)|watchRender(Register|Base))|H(ardwareRenderer|WShaderSwatchGenerator)|NodeMessage|C(o(nditionMessage|lor(Array)?|m(putation|mand(Result|Message)))|ursor|loth(Material|S(ystem|olverRegister)|Con(straint|trol)|Triangle|Particle|Edge|Force)|allbackIdArray)|T(ypeId|ime(r(Message)?|Array)?|oolsInfo|esselationParams|r(imBoundaryArray|ansformationMatrix))|I(ntArray|t(Geometry|Mesh(Polygon|Edge|Vertex|FaceVertex)|S(urfaceCV|electionList)|CurveCV|Instancer|eratorType|D(ependency(Graph|Nodes)|ag)|Keyframe)|k(System|HandleGroup)|mage)|3dView|Object(SetMessage|Handle|Array)?|D(G(M(odifier|essage)|Context)|ynSwept(Triangle|Line)|istance|oubleArray|evice(State|Channel)|a(ta(Block|Handle)|g(M(odifier|essage)|Path(Array)?))|raw(Request(Queue)?|Info|Data|ProcedureBase))|U(serEventMessage|i(nt(Array|64Array)|Message))|P(o(int(Array)?|lyMessage)|lug(Array)?|rogressWindow|x(G(eometry(Iterator|Data)|lBuffer)|M(idiInputDevice|odelEditorCommand|anipContainer)|S(urfaceShape(UI)?|pringNode|electionContext)|HwShaderNode|Node|Co(ntext(Command)?|m(ponentShape|mand))|T(oolCommand|ransform(ationMatrix)?)|IkSolver(Node)?|3dModelView|ObjectSet|D(eformerNode|ata|ragAndDropBehavior)|PolyT(weakUVCommand|rg)|EmitterNode|F(i(eldNode|leTranslator)|luidEmitterNode)|LocatorNode))|E(ulerRotation|vent(Message)?)|ayatomr|Vector(Array)?|Quaternion|F(n(R(otateManip|eflectShader|adialField)|G(e(nericAttribute|ometry(Data|Filter))|ravityField)|M(otionPath|es(sageAttribute|h(Data)?)|a(nip3D|trix(Data|Attribute)))|B(l(innShader|endShapeDeformer)|ase)|S(caleManip|t(ateManip|ring(Data|ArrayData))|ingleIndexedComponent|ubd(Names|Data)?|p(hereData|otLight)|et|kinCluster)|HikEffector|N(on(ExtendedLight|AmbientLight)|u(rbs(Surface(Data)?|Curve(Data)?)|meric(Data|Attribute))|ewtonField)|C(haracter|ircleSweepManip|ompo(nent(ListData)?|undAttribute)|urveSegmentManip|lip|amera)|T(ypedAttribute|oggleManip|urbulenceField|r(ipleIndexedComponent|ansform))|I(ntArrayData|k(Solver|Handle|Joint|Effector))|D(ynSweptGeometryData|i(s(cManip|tanceManip)|rection(Manip|alLight))|ouble(IndexedComponent|ArrayData)|ependencyNode|a(ta|gNode)|ragField)|U(ni(tAttribute|formField)|Int64ArrayData)|P(hong(Shader|EShader)|oint(On(SurfaceManip|CurveManip)|Light|ArrayData)|fxGeometry|lugin(Data)?|arti(cleSystem|tion))|E(numAttribute|xpression)|V(o(lume(Light|AxisField)|rtexField)|ectorArrayData)|KeyframeDelta(Move|B(lockAddRemove|reakdown)|Scale|Tangent|InfType|Weighted|AddRemove)?|F(ield|luid|reePointTriadManip)|W(ireDeformer|eightGeometryFilter)|L(ight(DataAttribute)?|a(yeredShader|ttice(D(eformer|ata))?|mbertShader))|A(ni(sotropyShader|mCurve)|ttribute|irField|r(eaLight|rayAttrsData)|mbientLight))?|ile(IO|Object)|eedbackLine|loat(Matrix|Point(Array)?|Vector(Array)?|Array))|L(i(ghtLinks|brary)|ockMessage)|A(n(im(Message|C(ontrol|urveC(hange|lipboard(Item(Array)?)?))|Util)|gle)|ttribute(Spec(Array)?|Index)|r(rayData(Builder|Handle)|g(Database|Parser|List))))|t(hreePointArcCtx|ime(Control|Port|rX)|o(ol(Button|HasOptions|Collection|Dropped|PropertyWindow)|NativePath |upper|kenize(List )?|l(ower|erance)|rus|ggle(WindowVisibility|Axis)?)|u(rbulence|mble(Ctx)?)|ex(RotateContext|M(oveContext|anipContext)|t(ScrollList|Curves|ure(HairColor |DisplacePlane |PlacementContext|Window)|ToShelf |Field(Grp|ButtonGrp)?)?|S(caleContext|electContext|mudgeUVContext)|WinToolCtx)|woPointArcCtx|a(n(gentConstraint)?|bLayout)|r(im|unc(ate(HairCache|FluidCache))?|a(ns(formLimits|lator)|c(e|k(Ctx)?))))|i(s(olateSelect|Connected|True|Dirty|ParentOf |Valid(String |ObjectName |UiName )|AnimCurve )|n(s(tance(r)?|ert(Joint(Ctx)?|K(not(Surface|Curve)|eyCtx)))|heritTransform|t(S(crollBar|lider(Grp)?)|er(sect|nalVar|ToUI )|Field(Grp)?))|conText(Radio(Button|Collection)|Button|StaticLabel|CheckBox)|temFilter(Render|Type|Attr)?|prEngine|k(S(ystem(Info)?|olver|plineHandleCtx)|Handle(Ctx|DisplayScale)?|fkDisplayMethod)|m(portComposerCurves |fPlugins|age))|o(ceanNurbsPreviewPlane |utliner(Panel|Editor)|p(tion(Menu(Grp)?|Var)|en(GLExtension|MayaPref))|verrideModifier|ffset(Surface|Curve(OnSurface)?)|r(ientConstraint|bit(Ctx)?)|b(soleteProc |j(ect(Center|Type(UI)?|Layer )|Exists)))|d(yn(RelEd(itor|Panel)|Globals|C(ontrol|ache)|P(a(intEditor|rticleCtx)|ref)|Exp(ort|ression)|amicLoad)|i(s(connect(Joint|Attr)|tanceDim(Context|ension)|pla(y(RGBColor|S(tats|urface|moothness)|C(olor|ull)|Pref|LevelOfDetail|Affected)|cementToPoly)|kCache|able)|r(name |ect(ionalLight|KeyCtx)|map)|mWhen)|o(cServer|Blur|t(Product )?|ubleProfileBirailSurface|peSheetEditor|lly(Ctx)?)|uplicate(Surface|Curve)?|e(tach(Surface|Curve|DeviceAttr)|vice(Panel|Editor)|f(ine(DataServer|VirtualDevice)|ormer|ault(Navigation|LightListCheckBox))|l(ete(Sh(elfTab |adingGroupsAndMaterials )|U(nusedBrushes |I)|Attr)?|randstr)|g_to_rad)|agPose|r(opoffLocator|ag(gerContext)?)|g(timer|dirty|Info|eval))|CBG |u(serCtx|n(t(angleUV|rim)|i(t|form)|do(Info)?|loadPlugin|assignInputDevice|group)|iTemplate|p(dateAE |Axis)|v(Snapshot|Link))|joint(C(tx|luster)|DisplayScale|Lattice)?|p(sd(ChannelOutliner|TextureFile|E(ditTextureFile|xport))|close|i(c(ture|kWalk)|xelMove)|o(se|int(MatrixMult |C(onstraint|urveConstraint)|On(Surface|Curve)|Position|Light)|p(upMenu|en)|w|l(y(Reduce|GeoSampler|M(irrorFace|ove(UV|Edge|Vertex|Facet(UV)?)|erge(UV|Edge(Ctx)?|Vertex|Facet(Ctx)?)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|l(indData|endColor))|S(traightenUVBorder|oftEdge|u(perCtx|bdivide(Edge|Facet))|p(her(icalProjection|e)|lit(Ring|Ctx|Edge|Vertex)?)|e(tToFaceNormal|parate|wEdge|lect(Constraint(Monitor)?|EditCtx))|mooth)|Normal(izeUV|PerVertex)?|C(hipOff|ylind(er|ricalProjection)|o(ne|pyUV|l(or(BlindData|Set|PerVertex)|lapse(Edge|Facet)))|u(t(Ctx)?|be)|l(ipboard|oseBorder)|acheMonitor|rea(seEdge|teFacet(Ctx)?))|T(o(Subdiv|rus)|r(iangulate|ansfer))|In(stallAction|fo)|Options|D(uplicate(Edge|AndConnect)|el(Edge|Vertex|Facet))|U(nite|VSet)|P(yramid|oke|lan(e|arProjection)|r(ism|ojection))|E(ditUV|valuate|xtrude(Edge|Facet))|Qu(eryBlindData|ad)|F(orceUV|lip(UV|Edge))|WedgeFace|L(istComponentConversion|ayoutUV)|A(utoProjection|ppend(Vertex|FacetCtx)?|verage(Normal|Vertex)))|eVectorConstraint))|utenv|er(cent|formanceOptions)|fxstrokes|wd|l(uginInfo|a(y(b(last|ackOptions))?|n(e|arSrf)))|a(steKey|ne(l(History|Configuration)?|Layout)|thAnimation|irBlend|use|lettePort|r(ti(cle(RenderInfo|Instancer|Exists)?|tion)|ent(Constraint)?|am(Dim(Context|ension)|Locator)))|r(int|o(j(ect(ion(Manip|Context)|Curve|Tangent)|FileViewer)|pMo(dCtx|ve)|gress(Bar|Window)|mptDialog)|eloadRefEd))|e(n(codeString|d(sWith |String )|v|ableDevice)|dit(RenderLayer(Globals|Members)|or(Template)?|DisplayLayer(Globals|Members)|AttrLimits )|v(ent|al(Deferred|Echo)?)|quivalent(Tol | )|ffector|r(f|ror)|x(clusiveLightCheckBox|t(end(Surface|Curve)|rude)|ists|p(ortComposerCurves |ression(EditorListen)?)?|ec(uteForEachObject )?|actWorldBoundingBox)|mit(ter)?)|v(i(sor|ew(Set|HeadOn|2dToolCtx|C(lipPlane|amera)|Place|Fit|LookAt))|o(lumeAxis|rtex)|e(ctorize|rifyCmd )|alidateShelfName )|key(Tangent|frame(Region(MoveKeyCtx|S(caleKeyCtx|e(tKeyCtx|lectKeyCtx))|CurrentTimeCtx|TrackCtx|InsertKeyCtx|D(irectKeyCtx|ollyCtx))|Stats|Outliner)?)|qu(it|erySubdiv)|f(c(heck|lose)|i(nd(RelatedSkinCluster |MenuItem |er|Keyframe|AllIntersections )|tBspline|l(ter(StudioImport|Curve|Expand)?|e(BrowserDialog|test|Info|Dialog|Extension )?|letCurve)|rstParentOf )|o(ntDialog|pen|rmLayout)|print|eof|flush|write|l(o(or|w|at(S(crollBar|lider(Grp|ButtonGrp|2)?)|Eq |Field(Grp)?))|u(shUndo|id(CacheInfo|Emitter|VoxelInfo))|exor)|r(omNativePath |e(eFormFillet|wind|ad)|ameLayout)|get(word|line)|mod)|w(hatIs|i(ndow(Pref)?|re(Context)?)|orkspace|ebBrowser(Prefs)?|a(itCursor|rning)|ri(nkle(Context)?|teTake))|l(s(T(hroughFilter|ype )|UI)?|i(st(Relatives|MenuAnnotation |Sets|History|NodeTypes|C(onnections|ameras)|Transforms |InputDevice(s|Buttons|Axes)|erEditor|DeviceAttachments|Unselected |A(nimatable|ttr))|n(step|eIntersection )|ght(link|List(Panel|Editor)?))|o(ckNode|okThru|ft|ad(NewShelf |P(lugin|refObjects)|Fluid)|g)|a(ssoContext|y(out|er(Button|ed(ShaderPort|TexturePort)))|ttice(DeformKeyCtx)?|unch(ImageEditor)?))|a(ssign(Command|InputDevice)|n(notate|im(C(one|urveEditor)|Display|View)|gle(Between)?)|tt(ach(Surface|Curve|DeviceAttr)|r(ibute(Menu|Info|Exists|Query)|NavigationControlGrp|Co(ntrolGrp|lorSliderGrp|mpatibility)|PresetEditWin|EnumOptionMenu(Grp)?|Field(Grp|SliderGrp)))|i(r|mConstraint)|d(d(NewShelfTab|Dynamic|PP|Attr(ibuteEditorNodeHelp)?)|vanceToNextDrivenKey)|uto(Place|Keyframe)|pp(endStringArray|l(y(Take|AttrPreset)|icationName))|ffect(s|edNet)|l(i(as(Attr)?|gn(Surface|C(tx|urve))?)|lViewFit)|r(c(len|Len(DimContext|gthDimension))|t(BuildPaintMenu|Se(tPaintCtx|lectCtx)|3dPaintCtx|UserPaintCtx|PuttyCtx|FluidAttrCtx|Attr(SkinPaintCtx|Ctx|PaintVertexCtx))|rayMapper)|mbientLight|b(s|out))|r(igid(Body|Solver)|o(t(at(ionInterpolation|e))?|otOf |undConstantRadius|w(ColumnLayout|Layout)|ll(Ctx)?)|un(up|TimeCommand)|e(s(olutionNode|et(Tool|AE )|ampleFluid)|hash|n(der(GlobalsNode|Manip|ThumbnailUpdate|Info|er|Partition|QualityNode|Window(SelectContext|Editor)|LayerButton)?|ame(SelectionList |UI|Attr)?)|cord(Device|Attr)|target|order(Deformers)?|do|v(olve|erse(Surface|Curve))|quires|f(ineSubdivSelectionList|erence(Edit|Query)?|resh(AE )?)|loadImage|adTake|root|move(MultiInstance|Joint)|build(Surface|Curve))|a(n(d(state|omizeFollicles )?|geControl)|d(i(o(MenuItemCollection|Button(Grp)?|Collection)|al)|_to_deg)|mpColorPort)|gb_to_hsv)|g(o(toBindPose |al)|e(t(M(odifiers|ayaPanelTypes )|Classification|InputDeviceRange|pid|env|DefaultBrush|Pa(nel|rticleAttr)|F(ileList|luidAttr)|A(ttr|pplicationVersionAsFloat ))|ometryConstraint)|l(Render(Editor)?|obalStitch)|a(uss|mma)|r(id(Layout)?|oup(ObjectsByName )?|a(dientControl(NoAttr)?|ph(SelectContext|TrackCtx|DollyCtx)|vity|bColor))|match)|x(pmPicker|form|bmLangPathList )|m(i(n(imizeApp)?|rrorJoint)|o(del(CurrentTimeCtx|Panel|Editor)|use|v(In|e(IKtoFK |VertexAlongDirection|KeyCtx)?|Out))|u(te|ltiProfileBirailSurface)|e(ssageLine|nu(BarLayout|Item(ToShelf )?|Editor)?|mory)|a(nip(Rotate(Context|LimitsCtx)|Move(Context|LimitsCtx)|Scale(Context|LimitsCtx)|Options)|tch|ke(Roll |SingleSurface|TubeOn |Identity|Paintable|bot|Live)|rker|g|x))|b(in(Membership|d(Skin|Pose))|o(neLattice|undary|x(ZoomCtx|DollyCtx))|u(tton(Manip)?|ild(BookmarkMenu|KeyframeMenu)|fferCurve)|e(ssel|vel(Plus)?)|l(indDataType|end(Shape(Panel|Editor)?|2|TwoAttr))|a(sename(Ex | )|tchRender|ke(Results|Simulation|Clip|PartialHistory|FluidShading )))))\\b" 9 | }, 10 | { 11 | "explanation": "Framework Constants", 12 | "name": "support.constant.mel", 13 | "match": "\\b(s(h(ellTessellate|a(d(ing(Map|Engine)|erGlow)|pe))|n(ow|apshot(Shape)?)|c(ulpt|aleConstraint|ript)|t(yleCurve|itch(Srf|AsNurbsShell)|u(cco|dioClearCoat)|encil|roke(Globals)?)|i(ngleShadingSwitch|mpleVolumeShader)|o(ftMod(Manip|Handle)?|lidFractal)|u(rface(Sha(der|pe)|Info|EdManip|VarGroup|Luminance)|b(Surface|d(M(odifier(UV|World)?|ap(SewMove|Cut|pingManip))|B(lindData|ase)|iv(ReverseFaces|SurfaceVarGroup|Co(llapse|mponentId)|To(Nurbs|Poly))?|HierBlind|CleanTopology|Tweak(UV)?|P(lanarProj|rojManip)|LayoutUV|A(ddTopology|utoProj))|Curve))|p(BirailSrf|otLight|ring)|e(tRange|lectionListOperator)|k(inCluster|etchPlane)|quareSrf|ampler(Info)?|m(ooth(Curve|TangentSrf)|ear))|h(svToRgb|yper(GraphInfo|View|Layout)|ik(Solver|Handle|Effector)|oldMatrix|eightField|w(Re(nderGlobals|flectionMap)|Shader)|a(ir(System|Constraint|TubeShader)|rd(enPoint|wareRenderGlobals)))|n(o(n(ExtendedLightShapeNode|Linear|AmbientLightShapeNode)|ise|rmalConstraint)|urbs(Surface|Curve|T(oSubdiv(Proc)?|essellate)|DimShape)|e(twork|wtonField))|c(h(o(ice|oser)|ecker|aracter(Map|Offset)?)|o(n(straint|tr(olPoint|ast)|dition)|py(ColorSet|UVSet))|urve(Range|Shape|Normalizer(Linear|Angle)?|In(tersect|fo)|VarGroup|From(Mesh(CoM|Edge)?|Su(rface(Bnd|CoS|Iso)?|bdiv(Edge|Face)?)))|l(ip(Scheduler|Library)|o(se(stPointOnSurface|Surface|Curve)|th|ud)|uster(Handle)?|amp)|amera(View)?|r(eate(BPManip|ColorSet|UVSet)|ater))|t(ime(ToUnitConversion|Function)?|oo(nLineAttributes|lDrawManip)|urbulenceField|ex(BaseDeformManip|ture(BakeSet|2d|ToGeom|3d|Env)|SmudgeUVManip|LatticeDeformManip)|weak|angentConstraint|r(i(pleShadingSwitch|m(WithBoundaries)?)|ansform(Geometry)?))|i(n(s(tancer|ertKnot(Surface|Curve))|tersectSurface)|k(RPsolver|MCsolver|S(ystem|olver|Csolver|plineSolver)|Handle|PASolver|Effector)|m(plicit(Box|Sphere|Cone)|agePlane))|o(cean(Shader)?|pticalFX|ffset(Surface|C(os|urve))|ldBlindDataBase|rient(Constraint|ationMarker)|bject(RenderFilter|MultiFilter|BinFilter|S(criptFilter|et)|NameFilter|TypeFilter|Filter|AttrFilter))|d(yn(Globals|Base)|i(s(tance(Between|DimShape)|pla(yLayer(Manager)?|cementShader)|kCache)|rect(ionalLight|edDisc)|mensionShape)|o(ubleShadingSwitch|f)|pBirailSrf|e(tach(Surface|Curve)|pendNode|f(orm(Bend|S(ine|quash)|Twist|ableShape|F(unc|lare)|Wave)|ault(RenderUtilityList|ShaderList|TextureList|LightList))|lete(Co(lorSet|mponent)|UVSet))|ag(Node|Pose)|r(opoffLocator|agField))|u(seBackground|n(trim|i(t(Conversion|ToTimeConversion)|formField)|known(Transform|Dag)?)|vChooser)|j(iggle|oint(Cluster|Ffd|Lattice)?)|p(sdFileTex|hong(E)?|o(s(tProcessList|itionMarker)|int(MatrixMult|Constraint|On(SurfaceInfo|CurveInfo)|Emitter|Light)|l(y(Reduce|M(irror|o(difier(UV|World)?|ve(UV|Edge|Vertex|Face(tUV)?))|erge(UV|Edge|Vert|Face)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|lindData|ase)|S(traightenUVBorder|oftEdge|ubd(Edge|Face)|p(h(ere|Proj)|lit(Ring|Edge|Vert)?)|e(parate|wEdge)|mooth(Proxy|Face)?)|Normal(izeUV|PerVertex)?|C(hipOff|yl(inder|Proj)|o(ne|pyUV|l(orPerVertex|lapse(Edge|F)))|u(t(Manip(Container)?)?|be)|loseBorder|rea(seEdge|t(or|eFace)))|T(o(Subdiv|rus)|weak(UV)?|r(iangulate|ansfer))|OptUvs|D(uplicateEdge|el(Edge|Vertex|Facet))|Unite|P(yramid|oke(Manip)?|lan(e|arProj)|r(i(sm|mitive)|oj))|Extrude(Edge|Vertex|Face)|VertexNormalManip|Quad|Flip(UV|Edge)|WedgeFace|LayoutUV|A(utoProj|ppend(Vertex)?|verageVertex))|eVectorConstraint))|fx(Geometry|Hair|Toon)|l(usMinusAverage|a(n(e|arTrimSurface)|ce(2dTexture|3dTexture)))|a(ssMatrix|irBlend|r(ti(cle(SamplerInfo|C(olorMapper|loud)|TranspMapper|IncandMapper|AgeMapper)?|tion)|ent(Constraint|Tessellate)|amDimension))|r(imitive|o(ject(ion|Curve|Tangent)|xyManager)))|e(n(tity|v(Ball|ironmentFog|S(phere|ky)|C(hrome|ube)|Fog))|x(t(end(Surface|Curve)|rude)|p(lodeNurbsShell|ression)))|v(iewManip|o(lume(Shader|Noise|Fog|Light|AxisField)|rtexField)|e(ctor(RenderGlobals|Product)|rtexBakeSet))|quadShadingSwitch|f(i(tBspline|eld|l(ter(Resample|Simplify|ClosestSample|Euler)?|e|letCurve))|o(urByFourMatrix|llicle)|urPointOn(MeshInfo|Subd)|f(BlendSrf(Obsolete)?|d|FilletSrf)|l(ow|uid(S(hape|liceManip)|Texture(2D|3D)|Emitter)|exorShape)|ra(ctal|meCache))|w(tAddMatrix|ire|ood|eightGeometryFilter|ater|rap)|l(ight(Info|Fog|Li(st|nker))?|o(cator|okAt|d(Group|Thresholds)|ft)|uminance|ea(stSquaresModifier|ther)|a(yered(Shader|Texture)|ttice|mbert))|a(n(notationShape|i(sotropic|m(Blend(InOut)?|C(urve(T(T|U|L|A)|U(T|U|L|A))?|lip)))|gleBetween)|tt(ach(Surface|Curve)|rHierarchyTest)|i(rField|mConstraint)|dd(Matrix|DoubleLinear)|udio|vg(SurfacePoints|NurbsSurfacePoints|Curves)|lign(Manip|Surface|Curve)|r(cLengthDimension|tAttrPaintTest|eaLight|rayMapper)|mbientLight|bstractBase(NurbsConversion|Create))|r(igid(Body|Solver|Constraint)|o(ck|undConstantRadius)|e(s(olution|ultCurve(TimeTo(Time|Unitless|Linear|Angular))?)|nder(Rect|Globals(List)?|Box|Sphere|Cone|Quality|L(ight|ayer(Manager)?))|cord|v(olve(dPrimitive)?|erse(Surface|Curve)?)|f(erence|lect)|map(Hsv|Color|Value)|build(Surface|Curve))|a(dialField|mp(Shader)?)|gbToHsv|bfSrf)|g(uide|eo(Connect(or|able)|metry(Shape|Constraint|VarGroup|Filter))|lobal(Stitch|CacheControl)|ammaCorrect|r(id|oup(Id|Parts)|a(nite|vityField)))|Fur(Globals|Description|Feedback|Attractors)|xformManip|m(o(tionPath|untain|vie)|u(te|lt(Matrix|i(plyDivide|listerLight)|DoubleLinear))|pBirailSrf|e(sh(VarGroup)?|ntalray(Texture|IblShape))|a(terialInfo|ke(Group|Nurb(sSquare|Sphere|C(ylinder|ircle|one|ube)|Torus|Plane)|CircularArc|T(hreePointCircularArc|extCurves|woPointCircularArc))|rble))|b(irailSrf|o(neLattice|olean|undary(Base)?)|u(lge|mp(2d|3d))|evel(Plus)?|l(in(n|dDataTemplate)|end(Shape|Color(s|Sets)|TwoAttr|Device|Weighted)?)|a(se(GeometryVarGroup|ShadingSwitch|Lattice)|keSet)|r(ownian|ush)))\\b" 14 | }, 15 | { 16 | "explanation": "Quoted strings (Double)", 17 | "name": "string.quoted.double.mel", 18 | "begin": "\"", 19 | "end": "\"", 20 | "patterns": [ 21 | { 22 | "name": "constant.character.escape.mel", 23 | "match": "\\\\." 24 | } 25 | ] 26 | }, 27 | { 28 | "explanation": "Quoted strings (Single)", 29 | "name": "string.quoted.single.mel", 30 | "begin": "'", 31 | "end": "'", 32 | "patterns": [ 33 | { 34 | "name": "constant.character.escape.mel", 35 | "match": "\\\\." 36 | } 37 | ] 38 | }, 39 | { 40 | "explanation": "Block Comments", 41 | "name": "comment.block.mel", 42 | "begin": "/\\*", 43 | "end": "\\*/", 44 | "captures": { 45 | "0": { 46 | "name": "punctuation.definition.comment.mel" 47 | } 48 | } 49 | }, 50 | { 51 | "explanation": "Inline Comments", 52 | "begin": "(^[ \t]+)?(?=//)", 53 | "end": "(?!\\G)", 54 | "beginCaptures": { 55 | "1": { 56 | "name": "punctuation.whitespace.comment.leading.mel" 57 | } 58 | }, 59 | "patterns": [ 60 | { 61 | "begin": "//", 62 | "end": "(?=\\n)", 63 | "name": "comment.line.double-slash.mel", 64 | "beginCaptures": { 65 | "0": { 66 | "name": "punctuation.definition.comment.mel" 67 | } 68 | } 69 | } 70 | ] 71 | }, 72 | { 73 | "explanation": "Variables", 74 | "name": "variable.other.mel", 75 | "match": "(\\$)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*?\\b", 76 | "captures": { 77 | "1": { 78 | "name": "punctuation.definition.variable.mel" 79 | } 80 | } 81 | }, 82 | { 83 | "explanation": "Keyword (Flow Control)", 84 | "name": "keyword.control.mel", 85 | "match": "\\b(if|in|else|for|while|break|continue|case|default|do|switch|return|switch|case|source|catch|alias)\\b" 86 | }, 87 | { 88 | "explanation": "Keyword (Other)", 89 | "name": "keyword.other.mel", 90 | "match": "\\b(global)\\b" 91 | }, 92 | { 93 | "explanation": "Keyword (Operator)", 94 | "name": "keyword.operator.mel", 95 | "match": "\\b(instanceof)\\b" 96 | }, 97 | { 98 | "explanation": "Constants (Language)", 99 | "name": "constant.language.mel", 100 | "match": "\\b(false|true|yes|no|on|off|null|undefined)\\b" 101 | }, 102 | { 103 | "explanation": "Constants (Numeric)", 104 | "name": "constant.numeric.mel", 105 | "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b" 106 | }, 107 | { 108 | "explanation": "Types", 109 | "match": "\\b(matrix|string|vector|float|int|void)\\b", 110 | "name": "storage.type.mel" 111 | }, 112 | { 113 | "explanation": "Keyword (Operators)", 114 | "name": "keyword.operator.symbolic.mel", 115 | "match": "[-\\!\\%\\&\\*\\+\\=\\/\\?\\:]" 116 | }, 117 | { 118 | "explanation": "Meta (Preprocessor)", 119 | "match": "^[ \\t]*(#)[a-zA-Z]+", 120 | "name": "meta.preprocessor.mel", 121 | "captures": { 122 | "1": { 123 | "name": "punctuation.definition.preprocessor.mel" 124 | } 125 | } 126 | }, 127 | { 128 | "explanation": "Meta (Functions)", 129 | "name": "meta.function.mel", 130 | "begin": "((?:global\\s*)?proc)\\s*(\\w+\\s*\\[?\\]?\\s+|\\s+)([A-Za-z_][A-Za-z0-9_]*)\\s*(\\()", 131 | "beginCaptures": { 132 | "1": { 133 | "name": "keyword.other.mel" 134 | }, 135 | "2": { 136 | "name": "storage.type.mel" 137 | }, 138 | "3": { 139 | "name": "entity.name.function.mel" 140 | }, 141 | "4": { 142 | "name": "punctuation.section.function.mel" 143 | } 144 | }, 145 | "end": "\\)", 146 | "endCaptures": { 147 | "0": { 148 | "name": "punctuation.section.function.mel" 149 | } 150 | }, 151 | "patterns": [ 152 | { 153 | "include": "$self" 154 | } 155 | ] 156 | } 157 | ], 158 | "repository": {}, 159 | "scopeName": "source.mel" 160 | } 161 | --------------------------------------------------------------------------------