├── .python-version ├── HScript.py ├── commands ├── __init__.py ├── helpcard.css ├── helpcard.py └── helpcards.json ├── messages.json ├── messages ├── 7.1.0.txt ├── 7.1.1.txt ├── 7.1.2.txt ├── 7.1.3.txt ├── 7.1.4.txt ├── 7.1.5.txt ├── 7.1.6.txt ├── 7.2.0.txt └── install.txt ├── prefs ├── Commands.sublime-commands ├── Completion Rules.tmPreferences ├── Default (Linux).sublime-keymap ├── Default (OSX).sublime-keymap ├── Default (Windows).sublime-keymap ├── HScript Comments.tmPreferences ├── HScript.sublime-settings └── Main.sublime-menu ├── readme.md ├── snippets └── expressions.sublime-completions └── syntax ├── HScript.sublime-syntax └── syntax_test HScript.cmd /.python-version: -------------------------------------------------------------------------------- 1 | 3.3 -------------------------------------------------------------------------------- /HScript.py: -------------------------------------------------------------------------------- 1 | from .commands.helpcard import HscriptHelpcardCommand 2 | -------------------------------------------------------------------------------- /commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teared/HScript/c4005c08507a9df94e0a287936ce29f1a746a198/commands/__init__.py -------------------------------------------------------------------------------- /commands/helpcard.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: "Segoe UI" Helvetica sans-serif; 3 | margin: .25rem .5rem .5rem, .5rem; 4 | --codecolor: color(var(--background) blend(grey 70%)); 5 | --radius: 0.25rem; 6 | } 7 | p { margin: 0 0 0.5rem 0 } 8 | h1 { 9 | display: inline; 10 | font-size: 1.5rem; 11 | padding-right: .25rem; 12 | } 13 | h2 { 14 | font-size: 1.25rem; 15 | margin-bottom: 0.5rem; 16 | } 17 | .summary { 18 | margin: 0.5rem 0; 19 | font-size: 1.25rem; 20 | font-style: italic; 21 | } 22 | .usage { margin: .5rem 0 } 23 | .argument { 24 | display:inline; 25 | padding: 0 .15rem; 26 | } 27 | code { 28 | background-color: var(--codecolor); 29 | border-radius: var(--radius); 30 | padding: 0.1rem 0.25rem; 31 | } 32 | .codeblock { 33 | background-color: var(--codecolor); 34 | border-radius: var(--radius); 35 | padding: .5rem; 36 | } 37 | .codeline { 38 | background-color: inherit; 39 | border-radius: 0; 40 | display: block; 41 | } 42 | .padder { 43 | padding: 0 .25rem; 44 | } 45 | .pillow { 46 | padding: 0 .15rem; 47 | background-color: color(var(--background) blend(var(--bluish) 60%)); 48 | border-radius: var(--radius); 49 | } -------------------------------------------------------------------------------- /commands/helpcard.py: -------------------------------------------------------------------------------- 1 | import json 2 | import webbrowser 3 | 4 | import sublime 5 | import sublime_plugin 6 | 7 | 8 | class HscriptHelpcardCommand(sublime_plugin.TextCommand): 9 | '''Show documentation for function under cursor.''' 10 | 11 | def __init__(self, *args, **kwargs): 12 | self.css = sublime.load_resource('Packages/HScript/commands/helpcard.css') 13 | self.helpcards = json.loads(sublime.load_resource('Packages/HScript/commands/helpcards.json')) 14 | super().__init__(*args, **kwargs) 15 | 16 | def is_enabled(self): 17 | return self.view.score_selector(self.view.sel()[0].a, 'source.hscript') > 0 18 | 19 | def run(self, edit): 20 | # Expand to full token under cursor. 21 | first_sel = self.view.sel()[0].a 22 | word = self.view.substr(self.view.word(first_sel)) 23 | 24 | if word in self.helpcards: 25 | html = '%s' % (self.css, self.helpcards[word]) 26 | else: 27 | # Not sure if search on Google CSE will always work. Will see... 28 | # Last cx parameter was: 001106583893786776783:4dnyszriw9c 29 | html = ''' 30 | 31 | 32 | 33 |

{term}

34 |

35 | No popup help available for "{term}". 36 |

37 |

Search online: 38 | Docs | 39 | Community | 40 | Internet 41 |

42 | 43 | '''.format(term=word, style=self.css) 44 | 45 | s = sublime.load_settings('HScript.sublime-settings') 46 | self.view.show_popup(html, on_navigate=webbrowser.open, 47 | max_width=s.get('popup_max_width'), 48 | max_height=s.get('popup_max_height')) 49 | -------------------------------------------------------------------------------- /messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "install": "messages/install.txt", 3 | "7.1.0": "messages/7.1.0.txt", 4 | "7.1.1": "messages/7.1.1.txt", 5 | "7.1.2": "messages/7.1.2.txt", 6 | "7.1.3": "messages/7.1.3.txt", 7 | "7.1.4": "messages/7.1.4.txt", 8 | "7.1.5": "messages/7.1.5.txt", 9 | "7.1.6": "messages/7.1.6.txt", 10 | "7.2.0": "messages/7.2.0.txt" 11 | } 12 | -------------------------------------------------------------------------------- /messages/7.1.0.txt: -------------------------------------------------------------------------------- 1 | Houdini add-on for Sublime Text: 2 | https://github.com/teared/HScript 3 | 4 | 5 | Release 7.1.0 6 | 7 | 8 | 1. Updated for Houdini 17.0. 9 | 10 | 2. New expression functions added: 11 | 12 | float arclenD(string surface_node, float prim_num, float ustart, float ustop, float divs) 13 | string chopnames(string CHOP) 14 | float contextoption(string token) 15 | string contextoptions(string token) 16 | float hascontextoption(string token) 17 | string lopinputprim(string lop_path, float input_index) 18 | string lopinputprims(string lop_path, float input_index) 19 | string loplastmodifiedprim(string lop_path) 20 | string loplastmodifiedprims(string lop_path) 21 | string topexp(string expression) 22 | 23 | Tip: to read about new functions quickly, copy the list in empty 24 | Sublime Text document, set HScript syntax and check documentation helpcards. 25 | 26 | 3. Older expressions that is now highlighted and documented: 27 | 28 | float dopgroupismutual(string dop, string group) 29 | float raw() 30 | string seampoints(string surface_node, float whichside) 31 | 32 | 4. Commands highlighted in syntax: 33 | 34 | animeditor 35 | chautoselect 36 | imgsave 37 | kinconvert 38 | matrman 39 | matupdateref 40 | rexport 41 | shopconvert 42 | system -------------------------------------------------------------------------------- /messages/7.1.1.txt: -------------------------------------------------------------------------------- 1 | Houdini add-on for Sublime Text: 2 | https://github.com/teared/HScript 3 | 4 | 5 | Release 7.1.1 6 | 7 | 8 | 1. Updated for Houdini 17.5. 9 | 10 | 2. Obsolete expression functions removed: 11 | 12 | string popcontextgeo(float index) 13 | float popevent(string event_name) 14 | float popeventtime(string event_name) 15 | float poppoint(float point_number, string attribute, float index) 16 | float poppointid(float particle_id, string attribute, float index) 17 | float poppointnum(float particle_id) 18 | string poppoints(float point_number, string attribute) 19 | string poppointsid(float particle_id, string attribute) 20 | -------------------------------------------------------------------------------- /messages/7.1.2.txt: -------------------------------------------------------------------------------- 1 | Houdini add-on for Sublime Text: 2 | https://github.com/teared/HScript 3 | 4 | 5 | Release 7.1.2 6 | 7 | 8 | 1. Updated for Houdini 18. 9 | 10 | 2. New expression functions added: 11 | 12 | string abspath(string relpath) 13 | string decodeattrib(string s) 14 | string decodeparm(string s) 15 | string encodeattrib(string s) 16 | string encodeparm(string s) 17 | string lopparentprims(string lop_paths) 18 | string loprelativeprims(string lop_paths, string relative_path) 19 | string opinputstring(string name, float index, string key) 20 | string pdgattribute(string name, float index) 21 | string pdgattributes(string name, float index) 22 | string pdginput(float index, string tag, float localize) 23 | string pdgoutput(float index, string tag, float localize) 24 | string relpath(string abspath) 25 | float scalefrommks(string dimensions) 26 | float scaletomks(string dimensions) 27 | 28 | Tip: to read about new functions quickly, copy the list in empty 29 | Sublime Text document, set HScript syntax and check documentation helpcards. 30 | 31 | 3. Commands highlighted in syntax: 32 | 33 | ociocolorspace 34 | ociodisplay 35 | scenegraphtree 36 | sceneviewopts 37 | sceneviewpurpose 38 | sceneviewrenderopts 39 | topcancel 40 | topcook 41 | topdirty 42 | visualizeradd 43 | visualizerset -------------------------------------------------------------------------------- /messages/7.1.3.txt: -------------------------------------------------------------------------------- 1 | Houdini add-on for Sublime Text: 2 | https://github.com/teared/HScript 3 | 4 | 5 | Release 7.1.3 6 | 7 | 8 | 1. Updated for Houdini 18.5. 9 | 10 | 2. New expression functions added: 11 | 12 | float bitset(float number, float bit_index, float value) 13 | float bittest(float number, float bit_index) 14 | float bitxor(float abits, float bbits) 15 | string detailattriblist(string surface_node) 16 | float haspdgattrib(string attribute) 17 | float ocldeviceinfo(string flag) 18 | string opnodigits(string name) 19 | float pdgattrib(string name, float index) 20 | string pdgattriblist() 21 | string pdgattribs(string name, float index) 22 | float pdgattribsize(string attribute) 23 | float pdgattribtype(string attribute) 24 | string pdgattribvals(string name) 25 | float pdginputsize(string tag) 26 | string pdginputvals(string tag, float localize) 27 | float pdgoutputsize(string tag) 28 | string pdgoutputvals(string tag, float localize) 29 | string pointattriblist(string surface_node) 30 | string primattriblist(string surface_node) 31 | string vertexgrouplist(string surface_node) 32 | string vertexgroupmask(string surface_node, string pattern) 33 | 34 | Tip: to read about new functions quickly, copy the list in empty 35 | Sublime Text document, set HScript syntax and check documentation helpcards. 36 | 37 | 3. Commands highlighted in syntax: 38 | 39 | opinputstring 40 | viewposteffects -------------------------------------------------------------------------------- /messages/7.1.4.txt: -------------------------------------------------------------------------------- 1 | Houdini add-on for Sublime Text: 2 | https://github.com/teared/HScript 3 | 4 | 5 | Release 7.1.4 6 | 7 | 8 | 1. Added support for Sublime Text 4: 9 | 10 | https://www.sublimetext.com/blog/articles/sublime-text-4 -------------------------------------------------------------------------------- /messages/7.1.5.txt: -------------------------------------------------------------------------------- 1 | Houdini add-on for Sublime Text: 2 | https://github.com/teared/HScript 3 | 4 | 5 | Release 7.1.5 6 | 7 | 8 | 1. Updated for Houdini 19.0. 9 | 10 | 2. Documentation popups changes: 11 | 12 | Display version tag for the expressions added in the last few versions of Houdini. 13 | Provided by the documentation, so it is not always present. 14 | 15 | 3. New expression functions added: 16 | 17 | cophasplane 18 | fpadzero 19 | nvertices 20 | nverticesgroup 21 | pdginputtag 22 | pdgmappath 23 | pdgoutputtag 24 | 25 | Tip: to read about new functions quickly, copy the list in empty 26 | Sublime Text document, set HScript syntax and check documentation helpcards. 27 | 28 | 4. New commands added: 29 | 30 | sceneviewconfig 31 | viewforeground 32 | 33 | 34 | Open issues for bug reports, requests, suggestions, etc: 35 | https://github.com/teared/HScript/issues -------------------------------------------------------------------------------- /messages/7.1.6.txt: -------------------------------------------------------------------------------- 1 | Houdini add-on for Sublime Text: 2 | https://github.com/teared/HScript 3 | 4 | 5 | Release 7.1.6 6 | 7 | 8 | 1. Updated for Houdini 19.5. 9 | 10 | 2. New expression functions added: 11 | 12 | ispdgeval 13 | strsplit 14 | strsplitcount 15 | 16 | Tip: to read about new functions quickly, 17 | copy the list into an empty Sublime Text document, 18 | set the HScript syntax, and check the documentation helpcards. 19 | 20 | 21 | Open issues for bug reports, requests, suggestions, etc: 22 | https://github.com/teared/HScript/issues -------------------------------------------------------------------------------- /messages/7.2.0.txt: -------------------------------------------------------------------------------- 1 | Houdini add-on for Sublime Text: 2 | https://github.com/teared/HScript 3 | 4 | 5 | Release 7.2.0 6 | 7 | 8 | 1. Updated for Houdini 20.0. 9 | 10 | 2. Added short descriptions of functions in the completions window. 11 | 12 | 3. New expression functions added: 13 | 14 | efit 15 | trim 16 | ltrim 17 | rtrim 18 | pointvals 19 | vertexvals 20 | primvals 21 | detailvals 22 | 23 | Tip: to read about new functions quickly, 24 | copy the list into an empty Sublime Text document, 25 | set the HScript syntax, and check the documentation helpcards (Ctrl+Alt+D). 26 | 27 | 4. New commands added: 28 | 29 | geospreadsheet 30 | reloadseq 31 | viewcharacteropts 32 | viewrotovideo 33 | 34 | 5. Fixed broken documentation links for functions in helpcards. 35 | 36 | 37 | Open issues for bug reports, requests, suggestions, etc: 38 | https://github.com/teared/HScript/issues -------------------------------------------------------------------------------- /messages/install.txt: -------------------------------------------------------------------------------- 1 | Houdini add-on for Sublime Text: 2 | https://github.com/teared/HScript 3 | 4 | 5 | Features 6 | 7 | HScript and HScript Expressions syntax. 8 | Expression function auto-completions with arguments. 9 | Expression function documentation via styled popups. 10 | Nicely used in VEX snippets inside backticks by VEX add-on: https://github.com/teared/VEX 11 | 12 | Open issues for bug reports, requests, suggestions, etc: 13 | https://github.com/teared/HScript/issues 14 | 15 | 16 | Optional: VEX add-on 17 | 18 | Similar add-on for VEX and VEX Expressions. Syntax, auto-completions, 19 | documentation popups. It can use HScript add-on inside backtick-expressions 20 | embedded inside snippets. 21 | 22 | https://github.com/teared/VEX 23 | 24 | 25 | Usage 26 | 27 | Open any HScript code and choose HScript using menu at the right bottom corner 28 | of the editor. If you don't want to change from Batch to HScript every time 29 | you open file with `.cmd` extension, there is "Open all with current extension 30 | as..." action in the same menu. 31 | 32 | When you start to type expression function name, it will prompt you with 33 | suggestions. You can choose one and use `Tab` and `Shift+Tab` keys to navigate 34 | back and forth. 35 | 36 | To show docs for the function: 37 | Tools → Command Pallette → HScript: Show Documentation for Function Under Cursor 38 | Shortcut: "Ctrl+Alt+D". 39 | 40 | For the rest, check Sublime Text Documentation, it has many small features 41 | that make textual editing easy and powerful. 42 | https://www.sublimetext.com/docs/ 43 | -------------------------------------------------------------------------------- /prefs/Commands.sublime-commands: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "caption": "HScript: Show Documentation for Function", 4 | "command": "hscript_helpcard" 5 | } 6 | ] 7 | -------------------------------------------------------------------------------- /prefs/Completion Rules.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | scope 5 | source.hscript 6 | settings 7 | 8 | cancelCompletion 9 | \s*(@|\w+\s+)[\w.]+$ 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /prefs/Default (Linux).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "command": "hscript_helpcard", "keys": ["ctrl+alt+d"], 4 | "context": [{"key": "selector", "operator": "equal", "operand": "source.hscript"}] 5 | } 6 | ] 7 | -------------------------------------------------------------------------------- /prefs/Default (OSX).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "command": "hscript_helpcard", "keys": ["ctrl+alt+d"], 4 | "context": [{"key": "selector", "operator": "equal", "operand": "source.hscript"}] 5 | } 6 | ] 7 | -------------------------------------------------------------------------------- /prefs/Default (Windows).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "command": "hscript_helpcard", "keys": ["ctrl+alt+d"], 4 | "context": [{"key": "selector", "operator": "equal", "operand": "source.hscript"}] 5 | } 6 | ] 7 | -------------------------------------------------------------------------------- /prefs/HScript Comments.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | scope 5 | source.hscript 6 | settings 7 | 8 | shellVariables 9 | 10 | 11 | name TM_COMMENT_START 12 | value # 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /prefs/HScript.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | // This is default HScript package preferences file. Don't change it. 3 | 4 | // If you opened settings from Sublime Text, correct file for user 5 | // overrides should be in the next column of split window, called 6 | // "HScript.sublime-settings — User". 7 | 8 | // This "HScript.sublime-settings — User" is also a syntax-specific file 9 | // (package has same name as a syntax it defines). So you will also see it 10 | // if you opened it via: Preferences → Syntax Specific. But instead of 11 | // this default HScript package preferences, you will see default Preferences 12 | // of Sublime Text itself. 13 | 14 | // Feel free to override any of Package settings below, as well as 15 | // Sublime's Preferences. 16 | 17 | // First candidate from the Preferences is "extensions" setting, 18 | // which will force .h files to open with HScript syntax instead of 19 | // Windows Batch file: 20 | // "extensions": ["cmd"], 21 | 22 | // Size of documentation popups, in pixels. 23 | "popup_max_width": 640, 24 | "popup_max_height": 360, 25 | } 26 | -------------------------------------------------------------------------------- /prefs/Main.sublime-menu: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "preferences", 4 | "children": 5 | [ 6 | { 7 | "id": "package-settings", 8 | "children": 9 | [ 10 | { 11 | "caption": "HScript", 12 | "children": 13 | [ 14 | { 15 | "caption": "Settings", 16 | "command": "edit_settings", 17 | "args": { 18 | "base_file": "$packages/HScript/prefs/HScript.sublime-settings", 19 | "default": "{\n\t$0\n}\n" 20 | } 21 | }, 22 | { 23 | "caption": "Key Bindings", 24 | "command": "edit_settings", 25 | "args": { 26 | "base_file": "${packages}/HScript/prefs/Default ($platform).sublime-keymap", 27 | "default": "[\n\t$0\n]\n" 28 | } 29 | } 30 | ] 31 | } 32 | ] 33 | } 34 | ] 35 | } 36 | ] 37 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # [Houdini] add-on for [Sublime Text] 2 | 3 | [Houdini]: https://www.sidefx.com/ 4 | [Sublime Text]: https://www.sublimetext.com/ 5 | 6 | 7 | ## Features 8 | 9 | * [HScript] and [HScript Expressions] syntax. 10 | * Expression function auto-completions with arguments. 11 | * Expression function documentation via styled popups. 12 | * Nicely used in VEX snippets inside backticks by [VEX add-on]. 13 | 14 | Open [issues] for bug reports, requests, suggestions, etc. 15 | 16 | [HScript]: https://www.sidefx.com/docs/houdini/commands/_guide 17 | [HScript Expressions]: https://www.sidefx.com/docs/houdini/ref/expression_cookbook.html 18 | [VEX add-on]: https://github.com/teared/VEX 19 | [issues]: https://github.com/teared/HScript/issues 20 | 21 | 22 | ## Screenshots 23 | 24 | ![alt tag](https://raw.githubusercontent.com/teared/packages-dev/master/develop/img/expressions.png) 25 | ![alt tag](https://raw.githubusercontent.com/teared/packages-dev/master/develop/img/exhelpcard.png) 26 | ![alt tag](https://raw.githubusercontent.com/teared/packages-dev/master/develop/img/hscript.png) 27 | 28 | 29 | ## Setup 30 | 31 | Preferences → Package Control → Install Package → HScript 32 | 33 | Requirements: 34 | 1. Recent version of [Sublime Text]. 35 | 2. [Package Control] 36 | 37 | Tools → Install Package Control 38 | 39 | [Sublime Text]: https://www.sublimetext.com/ 40 | [Package Control]: https://packagecontrol.io/ 41 | 42 | 43 | ### Optional: [VEX add-on] 44 | 45 | Similar add-on for VEX and VEX Expressions. Syntax, auto-completions, 46 | documentation popups. It can use HScript add-on inside backtick-expressions 47 | embedded inside snippets. 48 | 49 | 50 | ## Usage 51 | 52 | Open any HScript code and choose HScript using menu at the right bottom corner 53 | of the editor. If you don't want to change from Batch to HScript every time 54 | you open file with `.cmd` extension, there is "Open all with current extension 55 | as..." action in the same menu. 56 | 57 | When you start to type expression function name, it will prompt you with 58 | suggestions. You can choose one and use `Tab` and `Shift+Tab` keys to navigate 59 | back and forth. 60 | 61 | To show docs for the function: 62 | 63 | Tools → Command Pallette → HScript: Show Documentation for Function Under Cursor 64 | 65 | Shortcut: `Ctrl+Alt+D`. 66 | 67 | For the rest, check [Sublime Text Documentation], it has many small features 68 | that make textual editing easy and powerful. 69 | 70 | [Sublime Text Documentation]: https://www.sublimetext.com/docs/ 71 | 72 | 73 | ## License 74 | 75 | Public domain. 76 | -------------------------------------------------------------------------------- /snippets/expressions.sublime-completions: -------------------------------------------------------------------------------- 1 | { 2 | "scope": "source.hscript -string", 3 | "completions": [ 4 | { 5 | "trigger": "abs(number)", 6 | "contents": "abs(${1:number})", 7 | "kind": "function", 8 | "details": "Returns the absolute value of the argument." 9 | }, 10 | { 11 | "trigger": "abspath(relpath)", 12 | "contents": "abspath(${1:relpath})", 13 | "kind": "function", 14 | "details": "Returns the full path of a file." 15 | }, 16 | { 17 | "trigger": "acos(number)", 18 | "contents": "acos(${1:number})", 19 | "kind": "function", 20 | "details": "Returns the arc-cosine of the argument." 21 | }, 22 | { 23 | "trigger": "angvel(rot1, rot2, time)", 24 | "contents": "angvel(${1:rot1}, ${2:rot2}, ${3:time})", 25 | "kind": "function", 26 | "details": "Returns the angular velocity required to rotate an object from one" 27 | }, 28 | { 29 | "trigger": "arclen(surface_node, prim_num, ustart, ustop)", 30 | "contents": "arclen(${1:surface_node}, ${2:prim_num}, ${3:ustart}, ${4:ustop})", 31 | "kind": "function", 32 | "details": "Returns the arc length of a curve between two U positions." 33 | }, 34 | { 35 | "trigger": "arclenD(surface_node, prim_num, ustart, ustop, divs)", 36 | "contents": "arclenD(${1:surface_node}, ${2:prim_num}, ${3:ustart}, ${4:ustop}, ${5:divs})", 37 | "kind": "function", 38 | "details": "" 39 | }, 40 | { 41 | "trigger": "arg(line, argNum)", 42 | "contents": "arg(${1:line}, ${2:argNum})", 43 | "kind": "function", 44 | "details": "Returns an argument from a list of HScript-style arguments." 45 | }, 46 | { 47 | "trigger": "argc(line)", 48 | "contents": "argc(${1:line})", 49 | "kind": "function", 50 | "details": "Returns the number of arguments in an HScript-style list of arguments." 51 | }, 52 | { 53 | "trigger": "asin(number)", 54 | "contents": "asin(${1:number})", 55 | "kind": "function", 56 | "details": "Returns the arc-sine of the argument." 57 | }, 58 | { 59 | "trigger": "atan(number)", 60 | "contents": "atan(${1:number})", 61 | "kind": "function", 62 | "details": "Returns the arc-tangent of the argument." 63 | }, 64 | { 65 | "trigger": "atan2(y, x)", 66 | "contents": "atan2(${1:y}, ${2:x})", 67 | "kind": "function", 68 | "details": "Returns the arc-tangent of y/x." 69 | }, 70 | { 71 | "trigger": "atof(source)", 72 | "contents": "atof(${1:source})", 73 | "kind": "function", 74 | "details": "Converts a string to a float." 75 | }, 76 | { 77 | "trigger": "attriblist(surface_node, class)", 78 | "contents": "attriblist(${1:surface_node}, ${2:class})", 79 | "kind": "function", 80 | "details": "Returns a space-separated list of attribute names." 81 | }, 82 | { 83 | "trigger": "bbox(surface_node, type)", 84 | "contents": "bbox(${1:surface_node}, ${2:type})", 85 | "kind": "function", 86 | "details": "Returns bounding box information for a surface node." 87 | }, 88 | { 89 | "trigger": "bezier()", 90 | "contents": "bezier()", 91 | "kind": "function", 92 | "details": "Channel segment function: Bezier interpoloation spline" 93 | }, 94 | { 95 | "trigger": "bitand(abits, bbits)", 96 | "contents": "bitand(${1:abits}, ${2:bbits})", 97 | "kind": "function", 98 | "details": "Combines two numbers with bitwise-and." 99 | }, 100 | { 101 | "trigger": "bitor(abits, bbits)", 102 | "contents": "bitor(${1:abits}, ${2:bbits})", 103 | "kind": "function", 104 | "details": "Combines two numbers with bitwise-or." 105 | }, 106 | { 107 | "trigger": "bitset(number, bit_index, value)", 108 | "contents": "bitset(${1:number}, ${2:bit_index}, ${3:value})", 109 | "kind": "function", 110 | "details": "Sets or clears a bit in a number." 111 | }, 112 | { 113 | "trigger": "bittest(number, bit_index)", 114 | "contents": "bittest(${1:number}, ${2:bit_index})", 115 | "kind": "function", 116 | "details": "Returns if a given bit is set." 117 | }, 118 | { 119 | "trigger": "bitxor(abits, bbits)", 120 | "contents": "bitxor(${1:abits}, ${2:bbits})", 121 | "kind": "function", 122 | "details": "Combines two numbers with bitwise-xor." 123 | }, 124 | { 125 | "trigger": "boneangle(bone1, bone2)", 126 | "contents": "boneangle(${1:bone1}, ${2:bone2})", 127 | "kind": "function", 128 | "details": "Returns the angle at the joint between two bone objects." 129 | }, 130 | { 131 | "trigger": "ceil(number)", 132 | "contents": "ceil(${1:number})", 133 | "kind": "function", 134 | "details": "Returns the smallest integer not less than the value passed in." 135 | }, 136 | { 137 | "trigger": "centroid(surface_node, type)", 138 | "contents": "centroid(${1:surface_node}, ${2:type})", 139 | "kind": "function", 140 | "details": "Returns centroid information for a surface node." 141 | }, 142 | { 143 | "trigger": "ch(channel)", 144 | "contents": "ch(${1:channel})", 145 | "kind": "function", 146 | "details": "" 147 | }, 148 | { 149 | "trigger": "chexist(channel_name)", 150 | "contents": "chexist(${1:channel_name})", 151 | "kind": "function", 152 | "details": "Returns 1 if the specified channel exists, 0 if it doesn't." 153 | }, 154 | { 155 | "trigger": "chexpr(channel, new_expr_function)", 156 | "contents": "chexpr(${1:channel}, ${2:new_expr_function})", 157 | "kind": "function", 158 | "details": "Evaluates a channel with a new segment expression." 159 | }, 160 | { 161 | "trigger": "chexprf(channel, new_expr_function, frame)", 162 | "contents": "chexprf(${1:channel}, ${2:new_expr_function}, ${3:frame})", 163 | "kind": "function", 164 | "details": "Evaluates a channel with a new segment expression at a given frame." 165 | }, 166 | { 167 | "trigger": "chexprt(channel, new_expr_function, time)", 168 | "contents": "chexprt(${1:channel}, ${2:new_expr_function}, ${3:time})", 169 | "kind": "function", 170 | "details": "Evaluates a channel with a new segment expression at a given time." 171 | }, 172 | { 173 | "trigger": "chf(channel, frame)", 174 | "contents": "chf(${1:channel}, ${2:frame})", 175 | "kind": "function", 176 | "details": "Evaluates a parameter at a given frame." 177 | }, 178 | { 179 | "trigger": "chgroup(group_name)", 180 | "contents": "chgroup(${1:group_name})", 181 | "kind": "function", 182 | "details": "return a string containing all of the channels contained in a group." 183 | }, 184 | { 185 | "trigger": "chop(channel)", 186 | "contents": "chop(${1:channel})", 187 | "kind": "function", 188 | "details": "Evaluates a channel within a CHOP at the current time." 189 | }, 190 | { 191 | "trigger": "chopcf(CHOP, channel_index, frame)", 192 | "contents": "chopcf(${1:CHOP}, ${2:channel_index}, ${3:frame})", 193 | "kind": "function", 194 | "details": "Evaluates a channel within a CHOP at a given time." 195 | }, 196 | { 197 | "trigger": "chopci(CHOP, channel_index, index)", 198 | "contents": "chopci(${1:CHOP}, ${2:channel_index}, ${3:index})", 199 | "kind": "function", 200 | "details": "Evaluates a channel within a CHOP at a specified sample point." 201 | }, 202 | { 203 | "trigger": "chopct(CHOP, channel_index, time)", 204 | "contents": "chopct(${1:CHOP}, ${2:channel_index}, ${3:time})", 205 | "kind": "function", 206 | "details": "Evaluates a channel within a CHOP at a specified time." 207 | }, 208 | { 209 | "trigger": "chope(CHOP)", 210 | "contents": "chope(${1:CHOP})", 211 | "kind": "function", 212 | "details": "Returns the end index of the channels in a CHOP." 213 | }, 214 | { 215 | "trigger": "chopf(channel, frame)", 216 | "contents": "chopf(${1:channel}, ${2:frame})", 217 | "kind": "function", 218 | "details": "Evaluates a channel within a CHOP with at a given frame." 219 | }, 220 | { 221 | "trigger": "chopi(channel, index)", 222 | "contents": "chopi(${1:channel}, ${2:index})", 223 | "kind": "function", 224 | "details": "Evaluates a channel within a CHOP at a given sample point." 225 | }, 226 | { 227 | "trigger": "chopl(CHOP)", 228 | "contents": "chopl(${1:CHOP})", 229 | "kind": "function", 230 | "details": "Returns the length of the channels in a CHOP, in samples." 231 | }, 232 | { 233 | "trigger": "chopn(CHOP)", 234 | "contents": "chopn(${1:CHOP})", 235 | "kind": "function", 236 | "details": "Returns the number of data channels within a CHOP." 237 | }, 238 | { 239 | "trigger": "chopnames(CHOP)", 240 | "contents": "chopnames(${1:CHOP})", 241 | "kind": "function", 242 | "details": "Returns the names of all the data channels within a CHOP." 243 | }, 244 | { 245 | "trigger": "chopr(CHOP)", 246 | "contents": "chopr(${1:CHOP})", 247 | "kind": "function", 248 | "details": "Returns the sample rate of a CHOP." 249 | }, 250 | { 251 | "trigger": "chops(CHOP)", 252 | "contents": "chops(${1:CHOP})", 253 | "kind": "function", 254 | "details": "Returns the start index of a CHOP." 255 | }, 256 | { 257 | "trigger": "chopstr(channel)", 258 | "contents": "chopstr(${1:channel})", 259 | "kind": "function", 260 | "details": "Returns the string value of a channel within a CHOP at the current time." 261 | }, 262 | { 263 | "trigger": "chopt(channel, time)", 264 | "contents": "chopt(${1:channel}, ${2:time})", 265 | "kind": "function", 266 | "details": "Returns the value of a channel within a CHOP at a specified time." 267 | }, 268 | { 269 | "trigger": "chramp(ramp_path, position, component_index)", 270 | "contents": "chramp(${1:ramp_path}, ${2:position}, ${3:component_index})", 271 | "kind": "function", 272 | "details": "Returns the value of a ramp parameter at a specific position." 273 | }, 274 | { 275 | "trigger": "chrampf(ramp_path, position, component_index, frame)", 276 | "contents": "chrampf(${1:ramp_path}, ${2:position}, ${3:component_index}, ${4:frame})", 277 | "kind": "function", 278 | "details": "Returns the value of a ramp parameter at a specific position and frame." 279 | }, 280 | { 281 | "trigger": "chrampt(ramp_path, position, component_index, time)", 282 | "contents": "chrampt(${1:ramp_path}, ${2:position}, ${3:component_index}, ${4:time})", 283 | "kind": "function", 284 | "details": "" 285 | }, 286 | { 287 | "trigger": "chs(channel)", 288 | "contents": "chs(${1:channel})", 289 | "kind": "function", 290 | "details": "Evaluates the string value of a parameter at the current time." 291 | }, 292 | { 293 | "trigger": "chsop(parameter_path)", 294 | "contents": "chsop(${1:parameter_path})", 295 | "kind": "function", 296 | "details": "Evaluates the parameter at the current time as a node path string." 297 | }, 298 | { 299 | "trigger": "chsoplist(parameter_path)", 300 | "contents": "chsoplist(${1:parameter_path})", 301 | "kind": "function", 302 | "details": "Evaluates the parameter at the current time as a node path list string." 303 | }, 304 | { 305 | "trigger": "chsraw(channel)", 306 | "contents": "chsraw(${1:channel})", 307 | "kind": "function", 308 | "details": "Returns the raw (unexpanded) expression value of a parameter as a" 309 | }, 310 | { 311 | "trigger": "cht(channel, time)", 312 | "contents": "cht(${1:channel}, ${2:time})", 313 | "kind": "function", 314 | "details": "Returns the value of a parameter at a specified time." 315 | }, 316 | { 317 | "trigger": "clamp(value, minimum, maximum)", 318 | "contents": "clamp(${1:value}, ${2:minimum}, ${3:maximum})", 319 | "kind": "function", 320 | "details": "Returns a value clamped between a minimum and maximum." 321 | }, 322 | { 323 | "trigger": "clamptosphere(x, y, z, min_radius, max_radius, constant_type)", 324 | "contents": "clamptosphere(${1:x}, ${2:y}, ${3:z}, ${4:min_radius}, ${5:max_radius}, ${6:constant_type})", 325 | "kind": "function", 326 | "details": "Clamps a vector to always end between a minimum and maximum sphere." 327 | }, 328 | { 329 | "trigger": "constant()", 330 | "contents": "constant()", 331 | "kind": "function", 332 | "details": "Channel segment function: constant value." 333 | }, 334 | { 335 | "trigger": "contextoption(name)", 336 | "contents": "contextoption(${1:name})", 337 | "kind": "function", 338 | "details": "Returns the value of context option as a floating point value." 339 | }, 340 | { 341 | "trigger": "contextoptions(name)", 342 | "contents": "contextoptions(${1:name})", 343 | "kind": "function", 344 | "details": "Returns a cook context option as a string value." 345 | }, 346 | { 347 | "trigger": "cophasmeta(compositing_node, metadata_name)", 348 | "contents": "cophasmeta(${1:compositing_node}, ${2:metadata_name})", 349 | "kind": "function", 350 | "details": "Tests if metadata exists on a compositing node." 351 | }, 352 | { 353 | "trigger": "cophasplane(compositing_node, plane_name)", 354 | "contents": "cophasplane(${1:compositing_node}, ${2:plane_name})", 355 | "kind": "function", 356 | "details": "Tests if a plane exists on a compositing node." 357 | }, 358 | { 359 | "trigger": "copmeta(compositing_node, metadata_name, index)", 360 | "contents": "copmeta(${1:compositing_node}, ${2:metadata_name}, ${3:index})", 361 | "kind": "function", 362 | "details": "Returns numeric metadata from a compositing node." 363 | }, 364 | { 365 | "trigger": "copmetas(compositing_node, metadata_name)", 366 | "contents": "copmetas(${1:compositing_node}, ${2:metadata_name})", 367 | "kind": "function", 368 | "details": "Returns string metadata from a compositing node." 369 | }, 370 | { 371 | "trigger": "cos(degrees)", 372 | "contents": "cos(${1:degrees})", 373 | "kind": "function", 374 | "details": "Returns the cosine of the argument." 375 | }, 376 | { 377 | "trigger": "cosh(number)", 378 | "contents": "cosh(${1:number})", 379 | "kind": "function", 380 | "details": "Returns the hyperbolic cosine of the argument." 381 | }, 382 | { 383 | "trigger": "cross(v1, v2)", 384 | "contents": "cross(${1:v1}, ${2:v2})", 385 | "kind": "function", 386 | "details": "Computes the cross-product of two vectors." 387 | }, 388 | { 389 | "trigger": "cubic()", 390 | "contents": "cubic()", 391 | "kind": "function", 392 | "details": "Channel segment function: cubic spline." 393 | }, 394 | { 395 | "trigger": "curvature(surface_node, prim_num, u, v)", 396 | "contents": "curvature(${1:surface_node}, ${2:prim_num}, ${3:u}, ${4:v})", 397 | "kind": "function", 398 | "details": "Returns the curvature of the surface at the given UV coordinates." 399 | }, 400 | { 401 | "trigger": "cycle(f1, f2)", 402 | "contents": "cycle(${1:f1}, ${2:f2})", 403 | "kind": "function", 404 | "details": "Channel segment function: repeats animation from previous frames." 405 | }, 406 | { 407 | "trigger": "cycleoffset(f1, f2)", 408 | "contents": "cycleoffset(${1:f1}, ${2:f2})", 409 | "kind": "function", 410 | "details": "Channel segment function: repeats the animation between frames f1 and" 411 | }, 412 | { 413 | "trigger": "cycleoffsett(t1, t2)", 414 | "contents": "cycleoffsett(${1:t1}, ${2:t2})", 415 | "kind": "function", 416 | "details": "Channel segment function: repeats the animation between times t1 and" 417 | }, 418 | { 419 | "trigger": "cyclet(t1, t2)", 420 | "contents": "cyclet(${1:t1}, ${2:t2})", 421 | "kind": "function", 422 | "details": "Channel segment function: repeats animation from previous frames." 423 | }, 424 | { 425 | "trigger": "decode(s)", 426 | "contents": "decode(${1:s})", 427 | "kind": "function", 428 | "details": "Decodes a variable name that was previously encoded." 429 | }, 430 | { 431 | "trigger": "decodeattrib(s)", 432 | "contents": "decodeattrib(${1:s})", 433 | "kind": "function", 434 | "details": "Decodes a geometry attribute name that was previously encoded." 435 | }, 436 | { 437 | "trigger": "decodeparm(s)", 438 | "contents": "decodeparm(${1:s})", 439 | "kind": "function", 440 | "details": "Decodes a node parameter name that was previously encoded." 441 | }, 442 | { 443 | "trigger": "deg(radians)", 444 | "contents": "deg(${1:radians})", 445 | "kind": "function", 446 | "details": "Converts from radians to degrees." 447 | }, 448 | { 449 | "trigger": "degree(surface_node, prim_num, du_or_dv)", 450 | "contents": "degree(${1:surface_node}, ${2:prim_num}, ${3:du_or_dv})", 451 | "kind": "function", 452 | "details": "Returns the degree a specified face or hull." 453 | }, 454 | { 455 | "trigger": "detail(surface_node, attrib_name, attrib_index)", 456 | "contents": "detail(${1:surface_node}, ${2:attrib_name}, ${3:attrib_index})", 457 | "kind": "function", 458 | "details": "Returns the value of a detail attribute." 459 | }, 460 | { 461 | "trigger": "detailattriblist(surface_node)", 462 | "contents": "detailattriblist(${1:surface_node})", 463 | "kind": "function", 464 | "details": "Returns a space-separated list of detail attribute names." 465 | }, 466 | { 467 | "trigger": "detailattribsize(surface_node, attribute)", 468 | "contents": "detailattribsize(${1:surface_node}, ${2:attribute})", 469 | "kind": "function", 470 | "details": "Returns the number of components in a detail attribute." 471 | }, 472 | { 473 | "trigger": "detailattribtype(surface_node, attribute)", 474 | "contents": "detailattribtype(${1:surface_node}, ${2:attribute})", 475 | "kind": "function", 476 | "details": "Returns the type of a detail attribute." 477 | }, 478 | { 479 | "trigger": "details(surface_node, attribute)", 480 | "contents": "details(${1:surface_node}, ${2:attribute})", 481 | "kind": "function", 482 | "details": "Returns the string value of a detail attribute." 483 | }, 484 | { 485 | "trigger": "detailsmap(surface_node, attribute, index)", 486 | "contents": "detailsmap(${1:surface_node}, ${2:attribute}, ${3:index})", 487 | "kind": "function", 488 | "details": "Returns a string from a list of strings in a detail attribute." 489 | }, 490 | { 491 | "trigger": "detailsnummap(surface_node, attribute)", 492 | "contents": "detailsnummap(${1:surface_node}, ${2:attribute})", 493 | "kind": "function", 494 | "details": "Returns the number of unique strings bound to a detail attribute." 495 | }, 496 | { 497 | "trigger": "detailvals(surface_node, attrib_name, component)", 498 | "contents": "detailvals(${1:surface_node}, ${2:attrib_name}, ${3:component})", 499 | "kind": "function", 500 | "details": "Returns components of a string array attribute." 501 | }, 502 | { 503 | "trigger": "determinant(mat)", 504 | "contents": "determinant(${1:mat})", 505 | "kind": "function", 506 | "details": "Returns the determinant of a matrix." 507 | }, 508 | { 509 | "trigger": "dihedral(v0, v1)", 510 | "contents": "dihedral(${1:v0}, ${2:v1})", 511 | "kind": "function", 512 | "details": "Computes the dihedral matrix between vectors v0 and v1." 513 | }, 514 | { 515 | "trigger": "distance(x1, y1, z1, x2, y2, z2)", 516 | "contents": "distance(${1:x1}, ${2:y1}, ${3:z1}, ${4:x2}, ${5:y2}, ${6:z2})", 517 | "kind": "function", 518 | "details": "Returns the distance between two 3D points." 519 | }, 520 | { 521 | "trigger": "dopallfields(dop, objectSpec, subDataName, recordType)", 522 | "contents": "dopallfields(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:recordType})", 523 | "kind": "function", 524 | "details": "Returns a space separated list of all the field names that can be passed" 525 | }, 526 | { 527 | "trigger": "dopcontextgeo(name, index)", 528 | "contents": "dopcontextgeo(${1:name}, ${2:index})", 529 | "kind": "function", 530 | "details": "Returns the full path of the node connected to a dopnetwork." 531 | }, 532 | { 533 | "trigger": "dopcountslices(dop, objectFilter, subDataName)", 534 | "contents": "dopcountslices(${1:dop}, ${2:objectFilter}, ${3:subDataName})", 535 | "kind": "function", 536 | "details": "Returns the number of records of a given type in a piece of dynamics" 537 | }, 538 | { 539 | "trigger": "dopfield(dop, objectSpec, subDataName, recordType, recordNum, fieldName)", 540 | "contents": "dopfield(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:recordType}, ${5:recordNum}, ${6:fieldName})", 541 | "kind": "function", 542 | "details": "Returns the value of a field as a float." 543 | }, 544 | { 545 | "trigger": "dopfieldname(dop, objectSpec, subDataName, recordType, fieldNum)", 546 | "contents": "dopfieldname(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:recordType}, ${5:fieldNum})", 547 | "kind": "function", 548 | "details": "Returns the name of a DOP field." 549 | }, 550 | { 551 | "trigger": "dopfields(dop, objectSpec, subDataName, recordType, recordNum, fieldName)", 552 | "contents": "dopfields(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:recordType}, ${5:recordNum}, ${6:fieldName})", 553 | "kind": "function", 554 | "details": "Returns the value of a DOP field as a string." 555 | }, 556 | { 557 | "trigger": "dopfieldtype(dop, objectSpec, subDataName, recordType, fieldNum)", 558 | "contents": "dopfieldtype(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:recordType}, ${5:fieldNum})", 559 | "kind": "function", 560 | "details": "Returns the type of a DOP field." 561 | }, 562 | { 563 | "trigger": "dopframe(dop)", 564 | "contents": "dopframe(${1:dop})", 565 | "kind": "function", 566 | "details": "Returns the current frame of the simulation." 567 | }, 568 | { 569 | "trigger": "dopframetost(dop, simulationframe)", 570 | "contents": "dopframetost(${1:dop}, ${2:simulationframe})", 571 | "kind": "function", 572 | "details": "Returns the simulation time equivalent of a simulation frame." 573 | }, 574 | { 575 | "trigger": "dopgrouphasobject(dop, objectSpec, group)", 576 | "contents": "dopgrouphasobject(${1:dop}, ${2:objectSpec}, ${3:group})", 577 | "kind": "function", 578 | "details": "Returns 1 if a specified DOP group contains a specified object." 579 | }, 580 | { 581 | "trigger": "dopgrouplist(dop)", 582 | "contents": "dopgrouplist(${1:dop})", 583 | "kind": "function", 584 | "details": "returns a string containing a list of all object groups for the current" 585 | }, 586 | { 587 | "trigger": "dophasfield(dop, objectSpec, subDataName, recordType, recordNum, fieldName)", 588 | "contents": "dophasfield(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:recordType}, ${5:recordNum}, ${6:fieldName})", 589 | "kind": "function", 590 | "details": "Returns 1 if a specified DOP field exists." 591 | }, 592 | { 593 | "trigger": "dophassubdata(dop, objectSpec, subDataName)", 594 | "contents": "dophassubdata(${1:dop}, ${2:objectSpec}, ${3:subDataName})", 595 | "kind": "function", 596 | "details": "Returns 1 if a dynamics object has the specified subdata." 597 | }, 598 | { 599 | "trigger": "dopnodeobjs(dop)", 600 | "contents": "dopnodeobjs(${1:dop})", 601 | "kind": "function", 602 | "details": "Returns the list of objects processed by a DOP in the latest timestep." 603 | }, 604 | { 605 | "trigger": "dopnumfields(dop, objectSpec, subDataName, recordType)", 606 | "contents": "dopnumfields(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:recordType})", 607 | "kind": "function", 608 | "details": "Returns the number of fields in a DOP record type." 609 | }, 610 | { 611 | "trigger": "dopnumobjects(dop, objectFilter)", 612 | "contents": "dopnumobjects(${1:dop}, ${2:objectFilter})", 613 | "kind": "function", 614 | "details": "returns the number of objects in a simulation." 615 | }, 616 | { 617 | "trigger": "dopnumrecords(dop, objectFilter, subDataName, recordType)", 618 | "contents": "dopnumrecords(${1:dop}, ${2:objectFilter}, ${3:subDataName}, ${4:recordType})", 619 | "kind": "function", 620 | "details": "Returns the number of records of a given type in a piece of dynamics" 621 | }, 622 | { 623 | "trigger": "dopnumrecordtypes(dop, objectSpec, subDataName)", 624 | "contents": "dopnumrecordtypes(${1:dop}, ${2:objectSpec}, ${3:subDataName})", 625 | "kind": "function", 626 | "details": "Returns the number of types of record in a piece of dynamics data." 627 | }, 628 | { 629 | "trigger": "dopnumsubdata(dop, objectSpec, subDataName)", 630 | "contents": "dopnumsubdata(${1:dop}, ${2:objectSpec}, ${3:subDataName})", 631 | "kind": "function", 632 | "details": "Returns the number of subdata items attached to an object or data." 633 | }, 634 | { 635 | "trigger": "dopobjectlist(dop, objectSpec, listNames)", 636 | "contents": "dopobjectlist(${1:dop}, ${2:objectSpec}, ${3:listNames})", 637 | "kind": "function", 638 | "details": "Returns all objects matching the an object specification." 639 | }, 640 | { 641 | "trigger": "dopobjectsareaffectors(dop, objectSpec, affectors)", 642 | "contents": "dopobjectsareaffectors(${1:dop}, ${2:objectSpec}, ${3:affectors})", 643 | "kind": "function", 644 | "details": "Tests whether a set of objects has an affector relationship with another" 645 | }, 646 | { 647 | "trigger": "dopobjscreatedby(dop)", 648 | "contents": "dopobjscreatedby(${1:dop})", 649 | "kind": "function", 650 | "details": "Returns the list of objects created by a particular DOP node." 651 | }, 652 | { 653 | "trigger": "dopoption(dop, objectSpec, subDataName, fieldName)", 654 | "contents": "dopoption(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:fieldName})", 655 | "kind": "function", 656 | "details": "Returns the value of a DOP field as a float." 657 | }, 658 | { 659 | "trigger": "dopoptions(dop, objectSpec, subDataName, fieldName)", 660 | "contents": "dopoptions(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:fieldName})", 661 | "kind": "function", 662 | "details": "Returns the value of a DOP field as a string." 663 | }, 664 | { 665 | "trigger": "doprecordtypename(dop, objectSpec, subDataName, recordTypeNum)", 666 | "contents": "doprecordtypename(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:recordTypeNum})", 667 | "kind": "function", 668 | "details": "Returns the name of a record in DOPs data given its index." 669 | }, 670 | { 671 | "trigger": "dopsolvedopnet()", 672 | "contents": "dopsolvedopnet()", 673 | "kind": "function", 674 | "details": "Script solver support function." 675 | }, 676 | { 677 | "trigger": "dopsolvenewobject(object_index)", 678 | "contents": "dopsolvenewobject(${1:object_index})", 679 | "kind": "function", 680 | "details": "Script solver support function." 681 | }, 682 | { 683 | "trigger": "dopsolvenumnewobjects()", 684 | "contents": "dopsolvenumnewobjects()", 685 | "kind": "function", 686 | "details": "Script solver support function." 687 | }, 688 | { 689 | "trigger": "dopsolvenumobjects()", 690 | "contents": "dopsolvenumobjects()", 691 | "kind": "function", 692 | "details": "Script solver support function." 693 | }, 694 | { 695 | "trigger": "dopsolveobject(object_index)", 696 | "contents": "dopsolveobject(${1:object_index})", 697 | "kind": "function", 698 | "details": "Script solver support function." 699 | }, 700 | { 701 | "trigger": "dopsolvetimestep()", 702 | "contents": "dopsolvetimestep()", 703 | "kind": "function", 704 | "details": "Script solver support function." 705 | }, 706 | { 707 | "trigger": "dopsttoframe(dop, simulationtime)", 708 | "contents": "dopsttoframe(${1:dop}, ${2:simulationtime})", 709 | "kind": "function", 710 | "details": "returns the simulation frame of a given simulation time." 711 | }, 712 | { 713 | "trigger": "dopsttot(dop, simulationtime)", 714 | "contents": "dopsttot(${1:dop}, ${2:simulationtime})", 715 | "kind": "function", 716 | "details": "Returns the global time of a given simulation time." 717 | }, 718 | { 719 | "trigger": "dopsubdataname(dop, objectSpec, subDataName, subDataNum)", 720 | "contents": "dopsubdataname(${1:dop}, ${2:objectSpec}, ${3:subDataName}, ${4:subDataNum})", 721 | "kind": "function", 722 | "details": "Returns the name of a subdata of a given DOP object." 723 | }, 724 | { 725 | "trigger": "doptime(dop)", 726 | "contents": "doptime(${1:dop})", 727 | "kind": "function", 728 | "details": "Returns the current time of a simulation." 729 | }, 730 | { 731 | "trigger": "doptransform(dop, objectSpec, subDataName)", 732 | "contents": "doptransform(${1:dop}, ${2:objectSpec}, ${3:subDataName})", 733 | "kind": "function", 734 | "details": "Returns a transformation matrix associated with a piece of data." 735 | }, 736 | { 737 | "trigger": "dopttost(dop, globaltime)", 738 | "contents": "dopttost(${1:dop}, ${2:globaltime})", 739 | "kind": "function", 740 | "details": "Returns the simulation time equivalent to a given global time." 741 | }, 742 | { 743 | "trigger": "dopvelatpos(dop, objectSpec, posx, posy, posz, usevolumevelocity, usepointvelocity)", 744 | "contents": "dopvelatpos(${1:dop}, ${2:objectSpec}, ${3:posx}, ${4:posy}, ${5:posz}, ${6:usevolumevelocity}, ${7:usepointvelocity})", 745 | "kind": "function", 746 | "details": "Returns the velocity that a point at a location in simulation space" 747 | }, 748 | { 749 | "trigger": "dot(v0, v1)", 750 | "contents": "dot(${1:v0}, ${2:v1})", 751 | "kind": "function", 752 | "details": "Computes the dot product of two vectors." 753 | }, 754 | { 755 | "trigger": "ease()", 756 | "contents": "ease()", 757 | "kind": "function", 758 | "details": "Channel segment function: ease-in and -out." 759 | }, 760 | { 761 | "trigger": "easein()", 762 | "contents": "easein()", 763 | "kind": "function", 764 | "details": "Channel segment function: ease-in." 765 | }, 766 | { 767 | "trigger": "easeinp(number)", 768 | "contents": "easeinp(${1:number})", 769 | "kind": "function", 770 | "details": "Channel segment function: ease-in with configurable acceleration." 771 | }, 772 | { 773 | "trigger": "easeout()", 774 | "contents": "easeout()", 775 | "kind": "function", 776 | "details": "Channel segment function: ease-out" 777 | }, 778 | { 779 | "trigger": "easeoutp(number)", 780 | "contents": "easeoutp(${1:number})", 781 | "kind": "function", 782 | "details": "Channel segment function: ease-out with configurable acceleration." 783 | }, 784 | { 785 | "trigger": "easep(number)", 786 | "contents": "easep(${1:number})", 787 | "kind": "function", 788 | "details": "Channel segment function: ease-in and -out with configurable" 789 | }, 790 | { 791 | "trigger": "edgegrouplist(surface_node)", 792 | "contents": "edgegrouplist(${1:surface_node})", 793 | "kind": "function", 794 | "details": "Returns the list of edge groups in a surface node." 795 | }, 796 | { 797 | "trigger": "edgegroupmask(surface_node, pattern)", 798 | "contents": "edgegroupmask(${1:surface_node}, ${2:pattern})", 799 | "kind": "function", 800 | "details": "Returns the list of edge groups matching a pattern in a surface node." 801 | }, 802 | { 803 | "trigger": "efit(num, oldmin, oldmax, newmin, newmax)", 804 | "contents": "efit(${1:num}, ${2:oldmin}, ${3:oldmax}, ${4:newmin}, ${5:newmax})", 805 | "kind": "function", 806 | "details": "Fits a value from one range to another." 807 | }, 808 | { 809 | "trigger": "encode(s)", 810 | "contents": "encode(${1:s})", 811 | "kind": "function", 812 | "details": "Encodes any string into a valid variable name." 813 | }, 814 | { 815 | "trigger": "encodeattrib(s)", 816 | "contents": "encodeattrib(${1:s})", 817 | "kind": "function", 818 | "details": "Encodes any string into a valid geometry attribute name." 819 | }, 820 | { 821 | "trigger": "encodeparm(s)", 822 | "contents": "encodeparm(${1:s})", 823 | "kind": "function", 824 | "details": "Encodes any string into a valid node parameter name." 825 | }, 826 | { 827 | "trigger": "eval(expression)", 828 | "contents": "eval(${1:expression})", 829 | "kind": "function", 830 | "details": "Evaulates a string as an expression returning a float." 831 | }, 832 | { 833 | "trigger": "evals(expression)", 834 | "contents": "evals(${1:expression})", 835 | "kind": "function", 836 | "details": "Evaulates a string as an expression returning a string." 837 | }, 838 | { 839 | "trigger": "execute(command)", 840 | "contents": "execute(${1:command})", 841 | "kind": "function", 842 | "details": "Runs a string as an HScript command and returns the command's output." 843 | }, 844 | { 845 | "trigger": "executeb(command)", 846 | "contents": "executeb(${1:command})", 847 | "kind": "function", 848 | "details": "Runs a string as an HScript command and returns the command and error" 849 | }, 850 | { 851 | "trigger": "executee(command)", 852 | "contents": "executee(${1:command})", 853 | "kind": "function", 854 | "details": "Runs a string as an HScript command and returns any error output." 855 | }, 856 | { 857 | "trigger": "exp(number)", 858 | "contents": "exp(${1:number})", 859 | "kind": "function", 860 | "details": "Returns the logarithmic exponentiation of the argument." 861 | }, 862 | { 863 | "trigger": "explodematrix(mat, trs, xyz, component)", 864 | "contents": "explodematrix(${1:mat}, ${2:trs}, ${3:xyz}, ${4:component})", 865 | "kind": "function", 866 | "details": "Explodes a 3x3 or 4x4 matrix into the euler rotations required to" 867 | }, 868 | { 869 | "trigger": "explodematrixp(mat, p, trs, xyz, component)", 870 | "contents": "explodematrixp(${1:mat}, ${2:p}, ${3:trs}, ${4:xyz}, ${5:component})", 871 | "kind": "function", 872 | "details": "Explodes a 3x3 or 4x4 matrix into the euler rotations required to" 873 | }, 874 | { 875 | "trigger": "explodematrixpr(mat, p, pr, trs, xyz, component)", 876 | "contents": "explodematrixpr(${1:mat}, ${2:p}, ${3:pr}, ${4:trs}, ${5:xyz}, ${6:component})", 877 | "kind": "function", 878 | "details": "" 879 | }, 880 | { 881 | "trigger": "findfile(filename)", 882 | "contents": "findfile(${1:filename})", 883 | "kind": "function", 884 | "details": "Searches the Houdini path for a file." 885 | }, 886 | { 887 | "trigger": "findfiles(filename, separator)", 888 | "contents": "findfiles(${1:filename}, ${2:separator})", 889 | "kind": "function", 890 | "details": "Searches the Houdini path for a file or directory." 891 | }, 892 | { 893 | "trigger": "fit(num, oldmin, oldmax, newmin, newmax)", 894 | "contents": "fit(${1:num}, ${2:oldmin}, ${3:oldmax}, ${4:newmin}, ${5:newmax})", 895 | "kind": "function", 896 | "details": "Fits a value from one range to another." 897 | }, 898 | { 899 | "trigger": "fit01(num, newmin, newmax)", 900 | "contents": "fit01(${1:num}, ${2:newmin}, ${3:newmax})", 901 | "kind": "function", 902 | "details": "Fits a value to the 0-1 range." 903 | }, 904 | { 905 | "trigger": "fit10(num, newmin, newmax)", 906 | "contents": "fit10(${1:num}, ${2:newmin}, ${3:newmax})", 907 | "kind": "function", 908 | "details": "Fits a number in the 0-1 range." 909 | }, 910 | { 911 | "trigger": "fit11(num, newmin, newmax)", 912 | "contents": "fit11(${1:num}, ${2:newmin}, ${3:newmax})", 913 | "kind": "function", 914 | "details": "Fits a number to the -1 to 1 range." 915 | }, 916 | { 917 | "trigger": "floor(number)", 918 | "contents": "floor(${1:number})", 919 | "kind": "function", 920 | "details": "Returns the largest integer not greater than a number." 921 | }, 922 | { 923 | "trigger": "fpadzero(integerpad, fracpad, value)", 924 | "contents": "fpadzero(${1:integerpad}, ${2:fracpad}, ${3:value})", 925 | "kind": "function", 926 | "details": "Returns a string padding a number to a given length with zeros." 927 | }, 928 | { 929 | "trigger": "frac(number)", 930 | "contents": "frac(${1:number})", 931 | "kind": "function", 932 | "details": "Returns the fractional part of a floating-point number." 933 | }, 934 | { 935 | "trigger": "ftoa(number)", 936 | "contents": "ftoa(${1:number})", 937 | "kind": "function", 938 | "details": "Converts a number to a string." 939 | }, 940 | { 941 | "trigger": "ftrim(number)", 942 | "contents": "ftrim(${1:number})", 943 | "kind": "function", 944 | "details": "Converts a number to a string, with rounding." 945 | }, 946 | { 947 | "trigger": "groupbyval(surface_node, class, attribute, id)", 948 | "contents": "groupbyval(${1:surface_node}, ${2:class}, ${3:attribute}, ${4:id})", 949 | "kind": "function", 950 | "details": "Returns a string describing the set of elements with a given value for" 951 | }, 952 | { 953 | "trigger": "groupbyvals(surface_node, class, attribute, id)", 954 | "contents": "groupbyvals(${1:surface_node}, ${2:class}, ${3:attribute}, ${4:id})", 955 | "kind": "function", 956 | "details": "Returns a string describing the set of elements with a given value for a" 957 | }, 958 | { 959 | "trigger": "hascontextoption(token)", 960 | "contents": "hascontextoption(${1:token})", 961 | "kind": "function", 962 | "details": "Returns a non-zero value if the specified context option exists." 963 | }, 964 | { 965 | "trigger": "hasdetailattrib(surface_node, attribute)", 966 | "contents": "hasdetailattrib(${1:surface_node}, ${2:attribute})", 967 | "kind": "function", 968 | "details": "Returns 1 if a specified detail attribute exists." 969 | }, 970 | { 971 | "trigger": "haspdgattrib(attribute)", 972 | "contents": "haspdgattrib(${1:attribute})", 973 | "kind": "function", 974 | "details": "Returns 1 if the active PDG work item has the specified attribute." 975 | }, 976 | { 977 | "trigger": "haspoint(group_name, surface_node, point_num)", 978 | "contents": "haspoint(${1:group_name}, ${2:surface_node}, ${3:point_num})", 979 | "kind": "function", 980 | "details": "Returns 1 if a specified point is in a specified group." 981 | }, 982 | { 983 | "trigger": "haspointattrib(surface_node, attribute)", 984 | "contents": "haspointattrib(${1:surface_node}, ${2:attribute})", 985 | "kind": "function", 986 | "details": "Returns 1 if a specified point attribute exists." 987 | }, 988 | { 989 | "trigger": "hasprim(group_name, surface_node, prim_num)", 990 | "contents": "hasprim(${1:group_name}, ${2:surface_node}, ${3:prim_num})", 991 | "kind": "function", 992 | "details": "Returns 1 if a specified primitive is in a specified group." 993 | }, 994 | { 995 | "trigger": "hasprimattrib(surface_node, attribute)", 996 | "contents": "hasprimattrib(${1:surface_node}, ${2:attribute})", 997 | "kind": "function", 998 | "details": "Returns 1 if a specified primitive attribute exists." 999 | }, 1000 | { 1001 | "trigger": "hasvertexattrib(surface_node, attribute)", 1002 | "contents": "hasvertexattrib(${1:surface_node}, ${2:attribute})", 1003 | "kind": "function", 1004 | "details": "Returns 1 if a specified vertex attribute exists." 1005 | }, 1006 | { 1007 | "trigger": "hextoint(value)", 1008 | "contents": "hextoint(${1:value})", 1009 | "kind": "function", 1010 | "details": "Converts a hexadecimal argument string into an integer." 1011 | }, 1012 | { 1013 | "trigger": "hsv(red, green, blue, component)", 1014 | "contents": "hsv(${1:red}, ${2:green}, ${3:blue}, ${4:component})", 1015 | "kind": "function", 1016 | "details": "Converts RGB values to HSV components." 1017 | }, 1018 | { 1019 | "trigger": "ic(input_index, channel_index, index)", 1020 | "contents": "ic(${1:input_index}, ${2:channel_index}, ${3:index})", 1021 | "kind": "function", 1022 | "details": "Evaluates a CHOP's input channel at a specific index." 1023 | }, 1024 | { 1025 | "trigger": "ice(input_index)", 1026 | "contents": "ice(${1:input_index})", 1027 | "kind": "function", 1028 | "details": "Returns the end index of a CHOP's input." 1029 | }, 1030 | { 1031 | "trigger": "icl(input_index)", 1032 | "contents": "icl(${1:input_index})", 1033 | "kind": "function", 1034 | "details": "Returns the length of a CHOP's input, in samples." 1035 | }, 1036 | { 1037 | "trigger": "icmax(input_index, channel_index)", 1038 | "contents": "icmax(${1:input_index}, ${2:channel_index})", 1039 | "kind": "function", 1040 | "details": "Evaluates a CHOP's input channel's maximum value." 1041 | }, 1042 | { 1043 | "trigger": "icmin(input_index, channel_index)", 1044 | "contents": "icmin(${1:input_index}, ${2:channel_index})", 1045 | "kind": "function", 1046 | "details": "Evaluates a CHOP's input channel's minimum value." 1047 | }, 1048 | { 1049 | "trigger": "icn(input_index)", 1050 | "contents": "icn(${1:input_index})", 1051 | "kind": "function", 1052 | "details": "Returns the number of channels in a CHOP's input." 1053 | }, 1054 | { 1055 | "trigger": "icr(input_index)", 1056 | "contents": "icr(${1:input_index})", 1057 | "kind": "function", 1058 | "details": "Returns the sample rate of a CHOP's input." 1059 | }, 1060 | { 1061 | "trigger": "ics(input_index)", 1062 | "contents": "ics(${1:input_index})", 1063 | "kind": "function", 1064 | "details": "Returns the start index of a CHOP's input." 1065 | }, 1066 | { 1067 | "trigger": "identity(size)", 1068 | "contents": "identity(${1:size})", 1069 | "kind": "function", 1070 | "details": "Creates an identity matrix." 1071 | }, 1072 | { 1073 | "trigger": "if(expression, true_value, false_value)", 1074 | "contents": "if(${1:expression}, ${2:true_value}, ${3:false_value})", 1075 | "kind": "function", 1076 | "details": "Returns the value of the second or third argument depending on the truth" 1077 | }, 1078 | { 1079 | "trigger": "ifs(expression, true_value, false_value)", 1080 | "contents": "ifs(${1:expression}, ${2:true_value}, ${3:false_value})", 1081 | "kind": "function", 1082 | "details": "Returns the string value of the second or third argument depending on" 1083 | }, 1084 | { 1085 | "trigger": "imgbounds(foo, bar, baz, qux)", 1086 | "contents": "imgbounds(${1:foo}, ${2:bar}, ${3:baz}, ${4:qux})", 1087 | "kind": "function", 1088 | "details": "" 1089 | }, 1090 | { 1091 | "trigger": "index(source, pattern)", 1092 | "contents": "index(${1:source}, ${2:pattern})", 1093 | "kind": "function", 1094 | "details": "" 1095 | }, 1096 | { 1097 | "trigger": "instancepoint()", 1098 | "contents": "instancepoint()", 1099 | "kind": "function", 1100 | "details": "Returns the point number currently being instanced onto." 1101 | }, 1102 | { 1103 | "trigger": "int(number)", 1104 | "contents": "int(${1:number})", 1105 | "kind": "function", 1106 | "details": "Converts a number to an integer by truncating any fractional part." 1107 | }, 1108 | { 1109 | "trigger": "inttohex(value)", 1110 | "contents": "inttohex(${1:value})", 1111 | "kind": "function", 1112 | "details": "Converts a number into a hexadecimal string." 1113 | }, 1114 | { 1115 | "trigger": "invert(mat)", 1116 | "contents": "invert(${1:mat})", 1117 | "kind": "function", 1118 | "details": "Inverts a matrix." 1119 | }, 1120 | { 1121 | "trigger": "iprquery(query, pane, x, y)", 1122 | "contents": "iprquery(${1:query}, ${2:pane}, ${3:x}, ${4:y})", 1123 | "kind": "function", 1124 | "details": "" 1125 | }, 1126 | { 1127 | "trigger": "iprquerys(query, pane, x, y)", 1128 | "contents": "iprquerys(${1:query}, ${2:pane}, ${3:x}, ${4:y})", 1129 | "kind": "function", 1130 | "details": "" 1131 | }, 1132 | { 1133 | "trigger": "isclosed(surface_node, prim_num)", 1134 | "contents": "isclosed(${1:surface_node}, ${2:prim_num})", 1135 | "kind": "function", 1136 | "details": "Returns 1 if a primitive is closed." 1137 | }, 1138 | { 1139 | "trigger": "iscollided(surface_node, pointnumber)", 1140 | "contents": "iscollided(${1:surface_node}, ${2:pointnumber})", 1141 | "kind": "function", 1142 | "details": "Returns 1 if a specified point has collided with something." 1143 | }, 1144 | { 1145 | "trigger": "ishvariable(variable_name)", 1146 | "contents": "ishvariable(${1:variable_name})", 1147 | "kind": "function", 1148 | "details": "Returns 1 if a specified Houdini environment variable exists." 1149 | }, 1150 | { 1151 | "trigger": "ispdgeval()", 1152 | "contents": "ispdgeval()", 1153 | "kind": "function", 1154 | "details": "Returns 1 if the parameter is being evaluated as part of a PDG cook," 1155 | }, 1156 | { 1157 | "trigger": "isspline(surface_node, prim_num)", 1158 | "contents": "isspline(${1:surface_node}, ${2:prim_num})", 1159 | "kind": "function", 1160 | "details": "Returns 1 if a specified primitive is a NURBs or Bezier curve or" 1161 | }, 1162 | { 1163 | "trigger": "isstuck(surface_node, pointnumber)", 1164 | "contents": "isstuck(${1:surface_node}, ${2:pointnumber})", 1165 | "kind": "function", 1166 | "details": "Returns 1 if a specified point is a stuck particle." 1167 | }, 1168 | { 1169 | "trigger": "isvariable(variable_name)", 1170 | "contents": "isvariable(${1:variable_name})", 1171 | "kind": "function", 1172 | "details": "Returns 1 if a specified Houdini or system environment variable exists." 1173 | }, 1174 | { 1175 | "trigger": "iswrapu(surface_node, prim_num)", 1176 | "contents": "iswrapu(${1:surface_node}, ${2:prim_num})", 1177 | "kind": "function", 1178 | "details": "Returns 1 if a specified primitive is wrapped in U." 1179 | }, 1180 | { 1181 | "trigger": "iswrapv(surface_node, prim_num)", 1182 | "contents": "iswrapv(${1:surface_node}, ${2:prim_num})", 1183 | "kind": "function", 1184 | "details": "Returns 1 if a specified primitive is wrapped in V." 1185 | }, 1186 | { 1187 | "trigger": "length(x, y, z)", 1188 | "contents": "length(${1:x}, ${2:y}, ${3:z})", 1189 | "kind": "function", 1190 | "details": "Returns the length of a vector." 1191 | }, 1192 | { 1193 | "trigger": "linear()", 1194 | "contents": "linear()", 1195 | "kind": "function", 1196 | "details": "Channel segment function: linear interpolation." 1197 | }, 1198 | { 1199 | "trigger": "listbyval(surface_node, class, attribute, id)", 1200 | "contents": "listbyval(${1:surface_node}, ${2:class}, ${3:attribute}, ${4:id})", 1201 | "kind": "function", 1202 | "details": "Returns a list of elements with a given value for an integer attribute." 1203 | }, 1204 | { 1205 | "trigger": "listbyvals(surface_node, class, attribute, id)", 1206 | "contents": "listbyvals(${1:surface_node}, ${2:class}, ${3:attribute}, ${4:id})", 1207 | "kind": "function", 1208 | "details": "Returns a list of elements with a given value for a string attribute." 1209 | }, 1210 | { 1211 | "trigger": "lock(float)", 1212 | "contents": "lock(${1:float})", 1213 | "kind": "function", 1214 | "details": "Returns a value that cannot be changed." 1215 | }, 1216 | { 1217 | "trigger": "log(number)", 1218 | "contents": "log(${1:number})", 1219 | "kind": "function", 1220 | "details": "Returns the natural logarithm of the argument." 1221 | }, 1222 | { 1223 | "trigger": "log10(number)", 1224 | "contents": "log10(${1:number})", 1225 | "kind": "function", 1226 | "details": "Returns the base 10 logarithm of the argument." 1227 | }, 1228 | { 1229 | "trigger": "lopinputprim(lop_path, input_index)", 1230 | "contents": "lopinputprim(${1:lop_path}, ${2:input_index})", 1231 | "kind": "function", 1232 | "details": "Returns the path of the USD primitive last modified by an input to a LOP" 1233 | }, 1234 | { 1235 | "trigger": "lopinputprims(lop_path, input_index)", 1236 | "contents": "lopinputprims(${1:lop_path}, ${2:input_index})", 1237 | "kind": "function", 1238 | "details": "Returns the paths of the USD primitives last modified by an input to a" 1239 | }, 1240 | { 1241 | "trigger": "loplastmodifiedprim(lop_path)", 1242 | "contents": "loplastmodifiedprim(${1:lop_path})", 1243 | "kind": "function", 1244 | "details": "Returns the path of the USD primitive last modified by a LOP node." 1245 | }, 1246 | { 1247 | "trigger": "loplastmodifiedprims(lop_path)", 1248 | "contents": "loplastmodifiedprims(${1:lop_path})", 1249 | "kind": "function", 1250 | "details": "Returns the paths of the USD primitives last modified by a LOP node." 1251 | }, 1252 | { 1253 | "trigger": "lopparentprims(lop_paths)", 1254 | "contents": "lopparentprims(${1:lop_paths})", 1255 | "kind": "function", 1256 | "details": "Returns the paths of the parents of the supplied list of USD primitives." 1257 | }, 1258 | { 1259 | "trigger": "loprelativeprims(lop_paths, relative_path)", 1260 | "contents": "loprelativeprims(${1:lop_paths}, ${2:relative_path})", 1261 | "kind": "function", 1262 | "details": "Returns the paths at a particular location relative to the supplied list" 1263 | }, 1264 | { 1265 | "trigger": "ltrim(s, trim_characters)", 1266 | "contents": "ltrim(${1:s}, ${2:trim_characters})", 1267 | "kind": "function", 1268 | "details": "" 1269 | }, 1270 | { 1271 | "trigger": "match()", 1272 | "contents": "match()", 1273 | "kind": "function", 1274 | "details": "Channel segment function: matches the incoming and outgoing values." 1275 | }, 1276 | { 1277 | "trigger": "matchin()", 1278 | "contents": "matchin()", 1279 | "kind": "function", 1280 | "details": "Channel segment function: matches the incoming slope." 1281 | }, 1282 | { 1283 | "trigger": "matchout()", 1284 | "contents": "matchout()", 1285 | "kind": "function", 1286 | "details": "Channel segment function: matches the outgoing slope." 1287 | }, 1288 | { 1289 | "trigger": "matrix(pattern)", 1290 | "contents": "matrix(${1:pattern})", 1291 | "kind": "function", 1292 | "details": "Converts a string specification into a matrix." 1293 | }, 1294 | { 1295 | "trigger": "matrixtoquat(m)", 1296 | "contents": "matrixtoquat(${1:m})", 1297 | "kind": "function", 1298 | "details": "Converts a rotation matrix to a quaternion." 1299 | }, 1300 | { 1301 | "trigger": "max(value1, value2)", 1302 | "contents": "max(${1:value1}, ${2:value2})", 1303 | "kind": "function", 1304 | "details": "Returns the larger of two values." 1305 | }, 1306 | { 1307 | "trigger": "mcols(mat)", 1308 | "contents": "mcols(${1:mat})", 1309 | "kind": "function", 1310 | "details": "Returns the number of columns in a matrix." 1311 | }, 1312 | { 1313 | "trigger": "metaweight(surface_node, x, y, z)", 1314 | "contents": "metaweight(${1:surface_node}, ${2:x}, ${3:y}, ${4:z})", 1315 | "kind": "function", 1316 | "details": "Returns the weight of a metaball at a specific location." 1317 | }, 1318 | { 1319 | "trigger": "min(value1, value2)", 1320 | "contents": "min(${1:value1}, ${2:value2})", 1321 | "kind": "function", 1322 | "details": "Returns the smaller of two values." 1323 | }, 1324 | { 1325 | "trigger": "mindist(surface_node, point_num, surface_node, prim_num, return_type)", 1326 | "contents": "mindist(${1:surface_node}, ${2:point_num}, ${3:surface_node}, ${4:prim_num}, ${5:return_type})", 1327 | "kind": "function", 1328 | "details": "Finds the smallest distance between a point and a primitive." 1329 | }, 1330 | { 1331 | "trigger": "mlookat(v1, v2)", 1332 | "contents": "mlookat(${1:v1}, ${2:v2})", 1333 | "kind": "function", 1334 | "details": "Computes the transformation matrix of a lookat from one vector to" 1335 | }, 1336 | { 1337 | "trigger": "mlookatup(v1, v2, upv)", 1338 | "contents": "mlookatup(${1:v1}, ${2:v2}, ${3:upv})", 1339 | "kind": "function", 1340 | "details": "Computes the transformation matrix of a lookat from one vector to" 1341 | }, 1342 | { 1343 | "trigger": "mobjlookat(base_node, target_node, upv)", 1344 | "contents": "mobjlookat(${1:base_node}, ${2:target_node}, ${3:upv})", 1345 | "kind": "function", 1346 | "details": "Computes the transformation matrix of a lookat from one object to" 1347 | }, 1348 | { 1349 | "trigger": "modblend(val1, val2, length, weight)", 1350 | "contents": "modblend(${1:val1}, ${2:val2}, ${3:length}, ${4:weight})", 1351 | "kind": "function", 1352 | "details": "Blends the two modular values." 1353 | }, 1354 | { 1355 | "trigger": "morient(zaxis, yaxis)", 1356 | "contents": "morient(${1:zaxis}, ${2:yaxis})", 1357 | "kind": "function", 1358 | "details": "Computes the transformation matrix to orient along specific Z and Y" 1359 | }, 1360 | { 1361 | "trigger": "mousepane()", 1362 | "contents": "mousepane()", 1363 | "kind": "function", 1364 | "details": "Returns the full name of the pane currently under the mouse pointer." 1365 | }, 1366 | { 1367 | "trigger": "mousepath()", 1368 | "contents": "mousepath()", 1369 | "kind": "function", 1370 | "details": "Returns the node path of the pane currently under the mouse pointer." 1371 | }, 1372 | { 1373 | "trigger": "mrows(mat)", 1374 | "contents": "mrows(${1:mat})", 1375 | "kind": "function", 1376 | "details": "Returns the number of rows in a matrix." 1377 | }, 1378 | { 1379 | "trigger": "mzero(mat)", 1380 | "contents": "mzero(${1:mat})", 1381 | "kind": "function", 1382 | "details": "Returns a matrix with all values set to 0." 1383 | }, 1384 | { 1385 | "trigger": "nearpoint(surface_node, x, y, z)", 1386 | "contents": "nearpoint(${1:surface_node}, ${2:x}, ${3:y}, ${4:z})", 1387 | "kind": "function", 1388 | "details": "Finds the point in a geometry nearest to specific 3D coordinates." 1389 | }, 1390 | { 1391 | "trigger": "noise(X, Y, Z)", 1392 | "contents": "noise(${1:X}, ${2:Y}, ${3:Z})", 1393 | "kind": "function", 1394 | "details": "Generates 3D noise." 1395 | }, 1396 | { 1397 | "trigger": "normal(surface_node, prim_num, u, v, index)", 1398 | "contents": "normal(${1:surface_node}, ${2:prim_num}, ${3:u}, ${4:v}, ${5:index})", 1399 | "kind": "function", 1400 | "details": "Returns the components of the surface normal specific UV coordinates." 1401 | }, 1402 | { 1403 | "trigger": "normalize(v)", 1404 | "contents": "normalize(${1:v})", 1405 | "kind": "function", 1406 | "details": "Normalizes a vector." 1407 | }, 1408 | { 1409 | "trigger": "npoints(surface_node)", 1410 | "contents": "npoints(${1:surface_node})", 1411 | "kind": "function", 1412 | "details": "Returns the number of points in a geometry." 1413 | }, 1414 | { 1415 | "trigger": "npointsgroup(surface_node, group_name)", 1416 | "contents": "npointsgroup(${1:surface_node}, ${2:group_name})", 1417 | "kind": "function", 1418 | "details": "Returns the number of points in the specified group." 1419 | }, 1420 | { 1421 | "trigger": "nprims(name)", 1422 | "contents": "nprims(${1:name})", 1423 | "kind": "function", 1424 | "details": "Returns the number of primitives in a surface node." 1425 | }, 1426 | { 1427 | "trigger": "nprimsgroup(surface_node, group_name)", 1428 | "contents": "nprimsgroup(${1:surface_node}, ${2:group_name})", 1429 | "kind": "function", 1430 | "details": "Returns the number of primitives in the specified group." 1431 | }, 1432 | { 1433 | "trigger": "nuniquevals(surface_node, class, attribute)", 1434 | "contents": "nuniquevals(${1:surface_node}, ${2:class}, ${3:attribute})", 1435 | "kind": "function", 1436 | "details": "Returns the number of unique values for an integer or string attribute" 1437 | }, 1438 | { 1439 | "trigger": "nvertices(surface_node)", 1440 | "contents": "nvertices(${1:surface_node})", 1441 | "kind": "function", 1442 | "details": "Returns the number of vertices in a geometry." 1443 | }, 1444 | { 1445 | "trigger": "nverticesgroup(surface_node, group_name)", 1446 | "contents": "nverticesgroup(${1:surface_node}, ${2:group_name})", 1447 | "kind": "function", 1448 | "details": "Returns the number of vertices in the specified group." 1449 | }, 1450 | { 1451 | "trigger": "objkinoverride()", 1452 | "contents": "objkinoverride()", 1453 | "kind": "function", 1454 | "details": "Returns the current global kinematic override setting for bone objects." 1455 | }, 1456 | { 1457 | "trigger": "objlightmask(geometry, options)", 1458 | "contents": "objlightmask(${1:geometry}, ${2:options})", 1459 | "kind": "function", 1460 | "details": "Returns a list of lights matching an object's light mask." 1461 | }, 1462 | { 1463 | "trigger": "objlookat(base_node, target_node, upv)", 1464 | "contents": "objlookat(${1:base_node}, ${2:target_node}, ${3:upv})", 1465 | "kind": "function", 1466 | "details": "Computes the rotation vector of a lookat from one object to another." 1467 | }, 1468 | { 1469 | "trigger": "objpretransform(object_name)", 1470 | "contents": "objpretransform(${1:object_name})", 1471 | "kind": "function", 1472 | "details": "Returns an object's pre-transform matrix." 1473 | }, 1474 | { 1475 | "trigger": "oc(output_channel_index, index)", 1476 | "contents": "oc(${1:output_channel_index}, ${2:index})", 1477 | "kind": "function", 1478 | "details": "Returns the value of a CHOP's output at a specific sample index." 1479 | }, 1480 | { 1481 | "trigger": "ocldeviceinfo(flag)", 1482 | "contents": "ocldeviceinfo(${1:flag})", 1483 | "kind": "function", 1484 | "details": "Queries the current OpenCL device with the provided flag" 1485 | }, 1486 | { 1487 | "trigger": "oldrand(value)", 1488 | "contents": "oldrand(${1:value})", 1489 | "kind": "function", 1490 | "details": "Returns a pseudo-random number between 0 and 1." 1491 | }, 1492 | { 1493 | "trigger": "opblist(bundle_name)", 1494 | "contents": "opblist(${1:bundle_name})", 1495 | "kind": "function", 1496 | "details": "Returns the full paths of all operators in a bundle." 1497 | }, 1498 | { 1499 | "trigger": "opcreator(name)", 1500 | "contents": "opcreator(${1:name})", 1501 | "kind": "function", 1502 | "details": "Returns the creator of this node." 1503 | }, 1504 | { 1505 | "trigger": "opdigits(name)", 1506 | "contents": "opdigits(${1:name})", 1507 | "kind": "function", 1508 | "details": "Returns the numeric suffix of a node name." 1509 | }, 1510 | { 1511 | "trigger": "opexist(op_name)", 1512 | "contents": "opexist(${1:op_name})", 1513 | "kind": "function", 1514 | "details": "Returns 1 if the specified node, group, or bundle exists." 1515 | }, 1516 | { 1517 | "trigger": "opflag(network, flag)", 1518 | "contents": "opflag(${1:network}, ${2:flag})", 1519 | "kind": "function", 1520 | "details": "Returns a list nodes with a particular flag set." 1521 | }, 1522 | { 1523 | "trigger": "opfullpath(relpath)", 1524 | "contents": "opfullpath(${1:relpath})", 1525 | "kind": "function", 1526 | "details": "Returns the full path of a node." 1527 | }, 1528 | { 1529 | "trigger": "opfullpathfrom(node, basenode)", 1530 | "contents": "opfullpathfrom(${1:node}, ${2:basenode})", 1531 | "kind": "function", 1532 | "details": "Returns the path of a node relative to another node." 1533 | }, 1534 | { 1535 | "trigger": "opid(name)", 1536 | "contents": "opid(${1:name})", 1537 | "kind": "function", 1538 | "details": "Returns the unique ID of a node." 1539 | }, 1540 | { 1541 | "trigger": "opinput(name, index)", 1542 | "contents": "opinput(${1:name}, ${2:index})", 1543 | "kind": "function", 1544 | "details": "Returns the name of the node connected to a given input." 1545 | }, 1546 | { 1547 | "trigger": "opinputpath(name, index)", 1548 | "contents": "opinputpath(${1:name}, ${2:index})", 1549 | "kind": "function", 1550 | "details": "Returns the full path of the node connected to a given input." 1551 | }, 1552 | { 1553 | "trigger": "opinputstring(name, index, key)", 1554 | "contents": "opinputstring(${1:name}, ${2:index}, ${3:key})", 1555 | "kind": "function", 1556 | "details": "Returns the value associated with a key string on node connection." 1557 | }, 1558 | { 1559 | "trigger": "opisloading()", 1560 | "contents": "opisloading()", 1561 | "kind": "function", 1562 | "details": "Returns 1 if Houdini is currently loading a scene file." 1563 | }, 1564 | { 1565 | "trigger": "opisquitting()", 1566 | "contents": "opisquitting()", 1567 | "kind": "function", 1568 | "details": "Returns 1 if Houdini is currently shutting down." 1569 | }, 1570 | { 1571 | "trigger": "oplightmask(geometry)", 1572 | "contents": "oplightmask(${1:geometry})", 1573 | "kind": "function", 1574 | "details": "Returns a list of lights matching an object's light mask." 1575 | }, 1576 | { 1577 | "trigger": "oplistsort(path)", 1578 | "contents": "oplistsort(${1:path})", 1579 | "kind": "function", 1580 | "details": "Sorts a list of node paths based on node input/outputs order." 1581 | }, 1582 | { 1583 | "trigger": "opname(name)", 1584 | "contents": "opname(${1:name})", 1585 | "kind": "function", 1586 | "details": "Returns the name of a node given its path." 1587 | }, 1588 | { 1589 | "trigger": "opnchildren(name)", 1590 | "contents": "opnchildren(${1:name})", 1591 | "kind": "function", 1592 | "details": "Returns the number of nodes inside a container node." 1593 | }, 1594 | { 1595 | "trigger": "opninputs(name)", 1596 | "contents": "opninputs(${1:name})", 1597 | "kind": "function", 1598 | "details": "Returns the maximum number of connected inputs." 1599 | }, 1600 | { 1601 | "trigger": "opnodigits(name)", 1602 | "contents": "opnodigits(${1:name})", 1603 | "kind": "function", 1604 | "details": "Returns the alphanumeric prefix of a node name eliminating trailing" 1605 | }, 1606 | { 1607 | "trigger": "opnoutputs(name)", 1608 | "contents": "opnoutputs(${1:name})", 1609 | "kind": "function", 1610 | "details": "Returns the number of nodes connected to a node's output." 1611 | }, 1612 | { 1613 | "trigger": "opoutput(name, index)", 1614 | "contents": "opoutput(${1:name}, ${2:index})", 1615 | "kind": "function", 1616 | "details": "Returns the name of a node connected a given node's output." 1617 | }, 1618 | { 1619 | "trigger": "opoutputpath(name, index)", 1620 | "contents": "opoutputpath(${1:name}, ${2:index})", 1621 | "kind": "function", 1622 | "details": "Returns the full path of a node connected a given node's output." 1623 | }, 1624 | { 1625 | "trigger": "oppinput(name, index)", 1626 | "contents": "oppinput(${1:name}, ${2:index})", 1627 | "kind": "function", 1628 | "details": "Deprecated: replaced by opinput." 1629 | }, 1630 | { 1631 | "trigger": "oppwd()", 1632 | "contents": "oppwd()", 1633 | "kind": "function", 1634 | "details": "Returns the path of the current network." 1635 | }, 1636 | { 1637 | "trigger": "oppwf()", 1638 | "contents": "oppwf()", 1639 | "kind": "function", 1640 | "details": "Prints the path of the current network." 1641 | }, 1642 | { 1643 | "trigger": "oprelativepath(srcpath, destpath)", 1644 | "contents": "oprelativepath(${1:srcpath}, ${2:destpath})", 1645 | "kind": "function", 1646 | "details": "Returns the relative path from one node to another." 1647 | }, 1648 | { 1649 | "trigger": "opselect(network)", 1650 | "contents": "opselect(${1:network})", 1651 | "kind": "function", 1652 | "details": "Returns a list of the selected nodes." 1653 | }, 1654 | { 1655 | "trigger": "opselectpath(network)", 1656 | "contents": "opselectpath(${1:network})", 1657 | "kind": "function", 1658 | "details": "Returns a list of the full paths of selected nodes." 1659 | }, 1660 | { 1661 | "trigger": "opselectrecurse(network, flag)", 1662 | "contents": "opselectrecurse(${1:network}, ${2:flag})", 1663 | "kind": "function", 1664 | "details": "Returns a recursive list of the selected nodes." 1665 | }, 1666 | { 1667 | "trigger": "opselectrecursepath(network, flag)", 1668 | "contents": "opselectrecursepath(${1:network}, ${2:flag})", 1669 | "kind": "function", 1670 | "details": "Returns a recursive list of the full paths of selected nodes." 1671 | }, 1672 | { 1673 | "trigger": "opstreamname(nodepath)", 1674 | "contents": "opstreamname(${1:nodepath})", 1675 | "kind": "function", 1676 | "details": "" 1677 | }, 1678 | { 1679 | "trigger": "opsubpath(node)", 1680 | "contents": "opsubpath(${1:node})", 1681 | "kind": "function", 1682 | "details": "Returns the full path of a node including any containing subnets." 1683 | }, 1684 | { 1685 | "trigger": "optransform(object_name)", 1686 | "contents": "optransform(${1:object_name})", 1687 | "kind": "function", 1688 | "details": "Returns the transformation matrix of an object at the current time." 1689 | }, 1690 | { 1691 | "trigger": "optype(name)", 1692 | "contents": "optype(${1:name})", 1693 | "kind": "function", 1694 | "details": "Returns the type of a node." 1695 | }, 1696 | { 1697 | "trigger": "optypeinfo(name, pattern)", 1698 | "contents": "optypeinfo(${1:name}, ${2:pattern})", 1699 | "kind": "function", 1700 | "details": "Returns type information about a node." 1701 | }, 1702 | { 1703 | "trigger": "origin(obj1, obj2, constant_type)", 1704 | "contents": "origin(${1:obj1}, ${2:obj2}, ${3:constant_type})", 1705 | "kind": "function", 1706 | "details": "Returns components of an object's transforms." 1707 | }, 1708 | { 1709 | "trigger": "originoffset(obj1, pos1, obj2, pos2, constant_type)", 1710 | "contents": "originoffset(${1:obj1}, ${2:pos1}, ${3:obj2}, ${4:pos2}, ${5:constant_type})", 1711 | "kind": "function", 1712 | "details": "Returns components of an object's offset transforms." 1713 | }, 1714 | { 1715 | "trigger": "padzero(size, value)", 1716 | "contents": "padzero(${1:size}, ${2:value})", 1717 | "kind": "function", 1718 | "details": "Returns a string padding a number to a given length with zeros." 1719 | }, 1720 | { 1721 | "trigger": "param(token, value)", 1722 | "contents": "param(${1:token}, ${2:value})", 1723 | "kind": "function", 1724 | "details": "Deprecated: use stamp instead." 1725 | }, 1726 | { 1727 | "trigger": "parmisstring(parameter_name)", 1728 | "contents": "parmisstring(${1:parameter_name})", 1729 | "kind": "function", 1730 | "details": "Returns 1 if a specified parameter is a string." 1731 | }, 1732 | { 1733 | "trigger": "pdgattrib(name, index)", 1734 | "contents": "pdgattrib(${1:name}, ${2:index})", 1735 | "kind": "function", 1736 | "details": "Returns the value of a PDG work item attrib" 1737 | }, 1738 | { 1739 | "trigger": "pdgattriblist()", 1740 | "contents": "pdgattriblist()", 1741 | "kind": "function", 1742 | "details": "Returns a space-separated list of attribute names on the active PDG work" 1743 | }, 1744 | { 1745 | "trigger": "pdgattribs(name, index)", 1746 | "contents": "pdgattribs(${1:name}, ${2:index})", 1747 | "kind": "function", 1748 | "details": "Returns the string value of a PDG work item attribute" 1749 | }, 1750 | { 1751 | "trigger": "pdgattribsize(attribute)", 1752 | "contents": "pdgattribsize(${1:attribute})", 1753 | "kind": "function", 1754 | "details": "Returns the number of components in a PDG work item attribute." 1755 | }, 1756 | { 1757 | "trigger": "pdgattribtype(attribute)", 1758 | "contents": "pdgattribtype(${1:attribute})", 1759 | "kind": "function", 1760 | "details": "Returns the type of a PDG work item attribute." 1761 | }, 1762 | { 1763 | "trigger": "pdgattribute(name, index)", 1764 | "contents": "pdgattribute(${1:name}, ${2:index})", 1765 | "kind": "function", 1766 | "details": "Deprecated: replaced by pdgattrib." 1767 | }, 1768 | { 1769 | "trigger": "pdgattributes(name, index)", 1770 | "contents": "pdgattributes(${1:name}, ${2:index})", 1771 | "kind": "function", 1772 | "details": "Deprecated: replaced by pdgattribs." 1773 | }, 1774 | { 1775 | "trigger": "pdgattribvals(name)", 1776 | "contents": "pdgattribvals(${1:name})", 1777 | "kind": "function", 1778 | "details": "Returns the space separated list of values for a PDG work item attribute" 1779 | }, 1780 | { 1781 | "trigger": "pdginput(index, tag, localize)", 1782 | "contents": "pdginput(${1:index}, ${2:tag}, ${3:localize})", 1783 | "kind": "function", 1784 | "details": "Returns a work item input file for the specified file index and tag" 1785 | }, 1786 | { 1787 | "trigger": "pdginputsize(tag)", 1788 | "contents": "pdginputsize(${1:tag})", 1789 | "kind": "function", 1790 | "details": "Returns the number of input files on the active PDG work item" 1791 | }, 1792 | { 1793 | "trigger": "pdginputtag(index)", 1794 | "contents": "pdginputtag(${1:index})", 1795 | "kind": "function", 1796 | "details": "Returns the file tag for the input file at the specified index." 1797 | }, 1798 | { 1799 | "trigger": "pdginputvals(tag, localize)", 1800 | "contents": "pdginputvals(${1:tag}, ${2:localize})", 1801 | "kind": "function", 1802 | "details": "Returns a space separated string of all work item input files for the" 1803 | }, 1804 | { 1805 | "trigger": "pdgmappath(path)", 1806 | "contents": "pdgmappath(${1:path})", 1807 | "kind": "function", 1808 | "details": "Maps the given path to the local Zone" 1809 | }, 1810 | { 1811 | "trigger": "pdgoutput(index, tag, localize)", 1812 | "contents": "pdgoutput(${1:index}, ${2:tag}, ${3:localize})", 1813 | "kind": "function", 1814 | "details": "Returns a work item output file for the specified file index and tag" 1815 | }, 1816 | { 1817 | "trigger": "pdgoutputsize(tag)", 1818 | "contents": "pdgoutputsize(${1:tag})", 1819 | "kind": "function", 1820 | "details": "Returns the number of output files on the active PDG work item" 1821 | }, 1822 | { 1823 | "trigger": "pdgoutputtag(index)", 1824 | "contents": "pdgoutputtag(${1:index})", 1825 | "kind": "function", 1826 | "details": "Returns the file tag for the output file at the specified index." 1827 | }, 1828 | { 1829 | "trigger": "pdgoutputvals(tag, localize)", 1830 | "contents": "pdgoutputvals(${1:tag}, ${2:localize})", 1831 | "kind": "function", 1832 | "details": "Returns a space separated string of all work item output files for the" 1833 | }, 1834 | { 1835 | "trigger": "pic(copname, U, V, color_type)", 1836 | "contents": "pic(${1:copname}, ${2:U}, ${3:V}, ${4:color_type})", 1837 | "kind": "function", 1838 | "details": "Returns the color of a pixel in a compositing node." 1839 | }, 1840 | { 1841 | "trigger": "picni(copname, U, V, color_type)", 1842 | "contents": "picni(${1:copname}, ${2:U}, ${3:V}, ${4:color_type})", 1843 | "kind": "function", 1844 | "details": "Returns the non-interpolated color of a pixel in a compositing node." 1845 | }, 1846 | { 1847 | "trigger": "pluralize(s)", 1848 | "contents": "pluralize(${1:s})", 1849 | "kind": "function", 1850 | "details": "Converts an English noun to its plural." 1851 | }, 1852 | { 1853 | "trigger": "point(surface_node, point_number, attribute, index)", 1854 | "contents": "point(${1:surface_node}, ${2:point_number}, ${3:attribute}, ${4:index})", 1855 | "kind": "function", 1856 | "details": "Returns the value of a point attribute." 1857 | }, 1858 | { 1859 | "trigger": "pointattriblist(surface_node)", 1860 | "contents": "pointattriblist(${1:surface_node})", 1861 | "kind": "function", 1862 | "details": "Returns a space-separated list of point attribute names." 1863 | }, 1864 | { 1865 | "trigger": "pointattribsize(surface_node, attribute)", 1866 | "contents": "pointattribsize(${1:surface_node}, ${2:attribute})", 1867 | "kind": "function", 1868 | "details": "Returns the number of components in a point attribute." 1869 | }, 1870 | { 1871 | "trigger": "pointattribtype(surface_node, attribute)", 1872 | "contents": "pointattribtype(${1:surface_node}, ${2:attribute})", 1873 | "kind": "function", 1874 | "details": "Returns the type of a point attribute." 1875 | }, 1876 | { 1877 | "trigger": "pointavg(surface_node, attribute, index)", 1878 | "contents": "pointavg(${1:surface_node}, ${2:attribute}, ${3:index})", 1879 | "kind": "function", 1880 | "details": "Returns the average of an attribute across all points in a geometry." 1881 | }, 1882 | { 1883 | "trigger": "pointdist(surface_node, point_num, surface_node, prim_num, return_type)", 1884 | "contents": "pointdist(${1:surface_node}, ${2:point_num}, ${3:surface_node}, ${4:prim_num}, ${5:return_type})", 1885 | "kind": "function", 1886 | "details": "Returns the distance between a point and a primitive." 1887 | }, 1888 | { 1889 | "trigger": "pointgrouplist(surface_node)", 1890 | "contents": "pointgrouplist(${1:surface_node})", 1891 | "kind": "function", 1892 | "details": "Returns the list of point groups in a surface node." 1893 | }, 1894 | { 1895 | "trigger": "pointgroupmask(surface_node, pattern)", 1896 | "contents": "pointgroupmask(${1:surface_node}, ${2:pattern})", 1897 | "kind": "function", 1898 | "details": "Returns the list of point groups matching a pattern in a surface node." 1899 | }, 1900 | { 1901 | "trigger": "pointlist(surface_node, group_name)", 1902 | "contents": "pointlist(${1:surface_node}, ${2:group_name})", 1903 | "kind": "function", 1904 | "details": "Returns a list of all points in a point group." 1905 | }, 1906 | { 1907 | "trigger": "pointneighbours(surface_node, point_num, num_shared_prims)", 1908 | "contents": "pointneighbours(${1:surface_node}, ${2:point_num}, ${3:num_shared_prims})", 1909 | "kind": "function", 1910 | "details": "Lists points that share a minimum number of primitives with a specified" 1911 | }, 1912 | { 1913 | "trigger": "pointpattern(surface_node, pattern)", 1914 | "contents": "pointpattern(${1:surface_node}, ${2:pattern})", 1915 | "kind": "function", 1916 | "details": "Returns a list of points that match a specified pattern." 1917 | }, 1918 | { 1919 | "trigger": "points(surface_node, point_number, attribute)", 1920 | "contents": "points(${1:surface_node}, ${2:point_number}, ${3:attribute})", 1921 | "kind": "function", 1922 | "details": "Returns the string value of a point attribute." 1923 | }, 1924 | { 1925 | "trigger": "pointsmap(surface_node, attribute, index)", 1926 | "contents": "pointsmap(${1:surface_node}, ${2:attribute}, ${3:index})", 1927 | "kind": "function", 1928 | "details": "Returns a string from a list of strings in a point attribute." 1929 | }, 1930 | { 1931 | "trigger": "pointsnummap(surface_node, attribute)", 1932 | "contents": "pointsnummap(${1:surface_node}, ${2:attribute})", 1933 | "kind": "function", 1934 | "details": "Returns the number of unique strings bound to a point attribute." 1935 | }, 1936 | { 1937 | "trigger": "pointvals(surface_node, point_num, attrib_name, component)", 1938 | "contents": "pointvals(${1:surface_node}, ${2:point_num}, ${3:attrib_name}, ${4:component})", 1939 | "kind": "function", 1940 | "details": "Returns components of a string array attribute." 1941 | }, 1942 | { 1943 | "trigger": "pow(base, exponent)", 1944 | "contents": "pow(${1:base}, ${2:exponent})", 1945 | "kind": "function", 1946 | "details": "Raises a number to an exponent." 1947 | }, 1948 | { 1949 | "trigger": "prim(surface_node, prim_num, attrib_name, attrib_index)", 1950 | "contents": "prim(${1:surface_node}, ${2:prim_num}, ${3:attrib_name}, ${4:attrib_index})", 1951 | "kind": "function", 1952 | "details": "Returns the value of a primitive attribute." 1953 | }, 1954 | { 1955 | "trigger": "primattriblist(surface_node)", 1956 | "contents": "primattriblist(${1:surface_node})", 1957 | "kind": "function", 1958 | "details": "Returns a space-separated list of primitive attribute names." 1959 | }, 1960 | { 1961 | "trigger": "primattribsize(surface_node, attribute)", 1962 | "contents": "primattribsize(${1:surface_node}, ${2:attribute})", 1963 | "kind": "function", 1964 | "details": "Returns the number of components in a primitive attribute." 1965 | }, 1966 | { 1967 | "trigger": "primattribtype(surface_node, attribute)", 1968 | "contents": "primattribtype(${1:surface_node}, ${2:attribute})", 1969 | "kind": "function", 1970 | "details": "Returns the type of a primitive attribute." 1971 | }, 1972 | { 1973 | "trigger": "primdist(surface_node, prim1_num, surface_node, prim2_num, return_type)", 1974 | "contents": "primdist(${1:surface_node}, ${2:prim1_num}, ${3:surface_node}, ${4:prim2_num}, ${5:return_type})", 1975 | "kind": "function", 1976 | "details": "Returns the minimum distance and closest points between two primitives." 1977 | }, 1978 | { 1979 | "trigger": "primduv(surface_node, prim_num, attrib_name, attrib_index, u, v, du, dv)", 1980 | "contents": "primduv(${1:surface_node}, ${2:prim_num}, ${3:attrib_name}, ${4:attrib_index}, ${5:u}, ${6:v}, ${7:du}, ${8:dv})", 1981 | "kind": "function", 1982 | "details": "Returns the partial derivatives of a primitive attribute." 1983 | }, 1984 | { 1985 | "trigger": "primgrouplist(surface_node)", 1986 | "contents": "primgrouplist(${1:surface_node})", 1987 | "kind": "function", 1988 | "details": "Returns the list of primitive groups in a surface node." 1989 | }, 1990 | { 1991 | "trigger": "primgroupmask(surface_node, pattern)", 1992 | "contents": "primgroupmask(${1:surface_node}, ${2:pattern})", 1993 | "kind": "function", 1994 | "details": "Returns the list of groups matching a pattern in a surface node." 1995 | }, 1996 | { 1997 | "trigger": "primlist(surface_node, group_name)", 1998 | "contents": "primlist(${1:surface_node}, ${2:group_name})", 1999 | "kind": "function", 2000 | "details": "Returns a list of all primitives in a surface node." 2001 | }, 2002 | { 2003 | "trigger": "primneighbours(surface_node, prim_num, num_shared_pts)", 2004 | "contents": "primneighbours(${1:surface_node}, ${2:prim_num}, ${3:num_shared_pts})", 2005 | "kind": "function", 2006 | "details": "Lists primitives that share a minimum number of points with a specified" 2007 | }, 2008 | { 2009 | "trigger": "prims(surface_node, primitive_number, attribute)", 2010 | "contents": "prims(${1:surface_node}, ${2:primitive_number}, ${3:attribute})", 2011 | "kind": "function", 2012 | "details": "Returns the string value of a primitive attribute." 2013 | }, 2014 | { 2015 | "trigger": "primsmap(surface_node, attribute, index)", 2016 | "contents": "primsmap(${1:surface_node}, ${2:attribute}, ${3:index})", 2017 | "kind": "function", 2018 | "details": "Returns a string from a list of strings in a primitive attribute." 2019 | }, 2020 | { 2021 | "trigger": "primsnummap(surface_node, attribute)", 2022 | "contents": "primsnummap(${1:surface_node}, ${2:attribute})", 2023 | "kind": "function", 2024 | "details": "Returns the number of unique strings bound to a primitive attribute." 2025 | }, 2026 | { 2027 | "trigger": "primuv(surface_node, prim_num, attrib_name, attrib_index, u, v)", 2028 | "contents": "primuv(${1:surface_node}, ${2:prim_num}, ${3:attrib_name}, ${4:attrib_index}, ${5:u}, ${6:v})", 2029 | "kind": "function", 2030 | "details": "Returns the value of a primitive attribute at a certain UV location." 2031 | }, 2032 | { 2033 | "trigger": "primvals(surface_node, prim_num, attrib_name, component)", 2034 | "contents": "primvals(${1:surface_node}, ${2:prim_num}, ${3:attrib_name}, ${4:component})", 2035 | "kind": "function", 2036 | "details": "Returns components of a string array attribute." 2037 | }, 2038 | { 2039 | "trigger": "print(label, expression)", 2040 | "contents": "print(${1:label}, ${2:expression})", 2041 | "kind": "function", 2042 | "details": "Prints a message to the console." 2043 | }, 2044 | { 2045 | "trigger": "property(path, default)", 2046 | "contents": "property(${1:path}, ${2:default})", 2047 | "kind": "function", 2048 | "details": "" 2049 | }, 2050 | { 2051 | "trigger": "propertyf(path, frame, default)", 2052 | "contents": "propertyf(${1:path}, ${2:frame}, ${3:default})", 2053 | "kind": "function", 2054 | "details": "" 2055 | }, 2056 | { 2057 | "trigger": "propertys(path, default)", 2058 | "contents": "propertys(${1:path}, ${2:default})", 2059 | "kind": "function", 2060 | "details": "" 2061 | }, 2062 | { 2063 | "trigger": "propertysop(path, default)", 2064 | "contents": "propertysop(${1:path}, ${2:default})", 2065 | "kind": "function", 2066 | "details": "" 2067 | }, 2068 | { 2069 | "trigger": "propertysraw(path, default)", 2070 | "contents": "propertysraw(${1:path}, ${2:default})", 2071 | "kind": "function", 2072 | "details": "" 2073 | }, 2074 | { 2075 | "trigger": "propertyt(path, time, default)", 2076 | "contents": "propertyt(${1:path}, ${2:time}, ${3:default})", 2077 | "kind": "function", 2078 | "details": "" 2079 | }, 2080 | { 2081 | "trigger": "pulse(value, start, end)", 2082 | "contents": "pulse(${1:value}, ${2:start}, ${3:end})", 2083 | "kind": "function", 2084 | "details": "Returns 1 when a value is within a certain range." 2085 | }, 2086 | { 2087 | "trigger": "pythonexprf(expression)", 2088 | "contents": "pythonexprf(${1:expression})", 2089 | "kind": "function", 2090 | "details": "Evaluates a Python expression, returning a float result." 2091 | }, 2092 | { 2093 | "trigger": "pythonexprs(expression)", 2094 | "contents": "pythonexprs(${1:expression})", 2095 | "kind": "function", 2096 | "details": "Evaluates a Python expression, returning a string result." 2097 | }, 2098 | { 2099 | "trigger": "qlinear()", 2100 | "contents": "qlinear()", 2101 | "kind": "function", 2102 | "details": "Channel segment function: uses quaternions to interpolate." 2103 | }, 2104 | { 2105 | "trigger": "quattomatrix(q)", 2106 | "contents": "quattomatrix(${1:q})", 2107 | "kind": "function", 2108 | "details": "Converts quaternion to a 3x3 rotation matrix." 2109 | }, 2110 | { 2111 | "trigger": "quintic()", 2112 | "contents": "quintic()", 2113 | "kind": "function", 2114 | "details": "Channel segment function: smoothly interpolates slopes and" 2115 | }, 2116 | { 2117 | "trigger": "rad(number)", 2118 | "contents": "rad(${1:number})", 2119 | "kind": "function", 2120 | "details": "Converts from degrees to radians." 2121 | }, 2122 | { 2123 | "trigger": "rand(value)", 2124 | "contents": "rand(${1:value})", 2125 | "kind": "function", 2126 | "details": "Returns a pseudo-random number from 0 to 1." 2127 | }, 2128 | { 2129 | "trigger": "realuv(surface_node, prim_num, uv_unit, D_U|D_V)", 2130 | "contents": "realuv(${1:surface_node}, ${2:prim_num}, ${3:uv_unit}, ${4:D_U|D_V})", 2131 | "kind": "function", 2132 | "details": "Converts unit UV to real UV." 2133 | }, 2134 | { 2135 | "trigger": "relpath(abspath)", 2136 | "contents": "relpath(${1:abspath})", 2137 | "kind": "function", 2138 | "details": "Returns the relative path of a file." 2139 | }, 2140 | { 2141 | "trigger": "repeat(f1, f2)", 2142 | "contents": "repeat(${1:f1}, ${2:f2})", 2143 | "kind": "function", 2144 | "details": "Channel segment function: repeats animation from previous frames." 2145 | }, 2146 | { 2147 | "trigger": "repeatt(t1, t2)", 2148 | "contents": "repeatt(${1:t1}, ${2:t2})", 2149 | "kind": "function", 2150 | "details": "Channel segment function: repeats animation from previous frames." 2151 | }, 2152 | { 2153 | "trigger": "res(compositing_node, res_type)", 2154 | "contents": "res(${1:compositing_node}, ${2:res_type})", 2155 | "kind": "function", 2156 | "details": "Returns the natural resolution of the image in a compositing node." 2157 | }, 2158 | { 2159 | "trigger": "rgb(hue, saturation, value, component)", 2160 | "contents": "rgb(${1:hue}, ${2:saturation}, ${3:value}, ${4:component})", 2161 | "kind": "function", 2162 | "details": "Converts HSV values to RGB components." 2163 | }, 2164 | { 2165 | "trigger": "rindex(source, pattern)", 2166 | "contents": "rindex(${1:source}, ${2:pattern})", 2167 | "kind": "function", 2168 | "details": "Finds the last occurrence of a pattern in a string." 2169 | }, 2170 | { 2171 | "trigger": "rint(number)", 2172 | "contents": "rint(${1:number})", 2173 | "kind": "function", 2174 | "details": "Rounds to the nearest integer." 2175 | }, 2176 | { 2177 | "trigger": "rotate(angle, axis)", 2178 | "contents": "rotate(${1:angle}, ${2:axis})", 2179 | "kind": "function", 2180 | "details": "Returns a 4x4 rotation matrix from an axis and angle." 2181 | }, 2182 | { 2183 | "trigger": "rotaxis(angle, axisv)", 2184 | "contents": "rotaxis(${1:angle}, ${2:axisv})", 2185 | "kind": "function", 2186 | "details": "Returns a 4x4 rotation matrix from an angle and a vector." 2187 | }, 2188 | { 2189 | "trigger": "round(number)", 2190 | "contents": "round(${1:number})", 2191 | "kind": "function", 2192 | "details": "Rounds a number to the nearest integer." 2193 | }, 2194 | { 2195 | "trigger": "rtrim(s, trim_characters)", 2196 | "contents": "rtrim(${1:s}, ${2:trim_characters})", 2197 | "kind": "function", 2198 | "details": "" 2199 | }, 2200 | { 2201 | "trigger": "run(command)", 2202 | "contents": "run(${1:command})", 2203 | "kind": "function", 2204 | "details": "Runs a string as an HScript command and returns the command's output." 2205 | }, 2206 | { 2207 | "trigger": "runb(command)", 2208 | "contents": "runb(${1:command})", 2209 | "kind": "function", 2210 | "details": "Runs a string as an HScript command and returns the command and error" 2211 | }, 2212 | { 2213 | "trigger": "rune(command)", 2214 | "contents": "rune(${1:command})", 2215 | "kind": "function", 2216 | "details": "Runs a string as an HScript command and returns any error output." 2217 | }, 2218 | { 2219 | "trigger": "scale(sx, sy, sz)", 2220 | "contents": "scale(${1:sx}, ${2:sy}, ${3:sz})", 2221 | "kind": "function", 2222 | "details": "Takes three scaling values and returns a scale matrix." 2223 | }, 2224 | { 2225 | "trigger": "scalefrommks(dimensions)", 2226 | "contents": "scalefrommks(${1:dimensions})", 2227 | "kind": "function", 2228 | "details": "Returns the scale factor converting from MKS units to the Houdini units." 2229 | }, 2230 | { 2231 | "trigger": "scaletomks(dimensions)", 2232 | "contents": "scaletomks(${1:dimensions})", 2233 | "kind": "function", 2234 | "details": "Returns the scale factor converting to MKS units from the Houdini units." 2235 | }, 2236 | { 2237 | "trigger": "seqanim(compositing_node)", 2238 | "contents": "seqanim(${1:compositing_node})", 2239 | "kind": "function", 2240 | "details": "Returns 1 if a specified compositing node has an animated sequence." 2241 | }, 2242 | { 2243 | "trigger": "seqend(compositing_node)", 2244 | "contents": "seqend(${1:compositing_node})", 2245 | "kind": "function", 2246 | "details": "Returns the end frame of a compositing node's image sequence." 2247 | }, 2248 | { 2249 | "trigger": "seqlength(compositing_node)", 2250 | "contents": "seqlength(${1:compositing_node})", 2251 | "kind": "function", 2252 | "details": "Returns the number of frames in a compositing node's image sequence." 2253 | }, 2254 | { 2255 | "trigger": "seqstart(compositing_node)", 2256 | "contents": "seqstart(${1:compositing_node})", 2257 | "kind": "function", 2258 | "details": "Returns the start frame of a compositing node's image sequence." 2259 | }, 2260 | { 2261 | "trigger": "shopstring(shop_path, render_type)", 2262 | "contents": "shopstring(${1:shop_path}, ${2:render_type})", 2263 | "kind": "function", 2264 | "details": "Returns the shader string generated by a shader." 2265 | }, 2266 | { 2267 | "trigger": "sign(value)", 2268 | "contents": "sign(${1:value})", 2269 | "kind": "function", 2270 | "details": "Returns -1, 0, or 1 depending on the sign of the argument." 2271 | }, 2272 | { 2273 | "trigger": "sin(degrees)", 2274 | "contents": "sin(${1:degrees})", 2275 | "kind": "function", 2276 | "details": "Returns the sine of the argument." 2277 | }, 2278 | { 2279 | "trigger": "sinh(number)", 2280 | "contents": "sinh(${1:number})", 2281 | "kind": "function", 2282 | "details": "Returns the hyperbolic sine of the argument." 2283 | }, 2284 | { 2285 | "trigger": "smooth(value, minimum, maximum)", 2286 | "contents": "smooth(${1:value}, ${2:minimum}, ${3:maximum})", 2287 | "kind": "function", 2288 | "details": "Takes a value and range and returns a smooth interpolation between 0 and" 2289 | }, 2290 | { 2291 | "trigger": "snoise(X, Y, Z)", 2292 | "contents": "snoise(${1:X}, ${2:Y}, ${3:Z})", 2293 | "kind": "function", 2294 | "details": "Generates sparse convolution 3D noise." 2295 | }, 2296 | { 2297 | "trigger": "spknot(surface_node, prim_num, knot_index, du_or_dv)", 2298 | "contents": "spknot(${1:surface_node}, ${2:prim_num}, ${3:knot_index}, ${4:du_or_dv})", 2299 | "kind": "function", 2300 | "details": "Returns a knot value on a spline curve or surface." 2301 | }, 2302 | { 2303 | "trigger": "spline()", 2304 | "contents": "spline()", 2305 | "kind": "function", 2306 | "details": "Channel segment function: fits a curve to the keyframes." 2307 | }, 2308 | { 2309 | "trigger": "sqrt(number)", 2310 | "contents": "sqrt(${1:number})", 2311 | "kind": "function", 2312 | "details": "Returns the square root of the argument." 2313 | }, 2314 | { 2315 | "trigger": "stamp(scope, token, value)", 2316 | "contents": "stamp(${1:scope}, ${2:token}, ${3:value})", 2317 | "kind": "function", 2318 | "details": "Returns a copy stamping floating point value." 2319 | }, 2320 | { 2321 | "trigger": "stamps(stamp_op_path, token, value)", 2322 | "contents": "stamps(${1:stamp_op_path}, ${2:token}, ${3:value})", 2323 | "kind": "function", 2324 | "details": "Returns a copy stamping string value." 2325 | }, 2326 | { 2327 | "trigger": "strcasecmp(s1, s2)", 2328 | "contents": "strcasecmp(${1:s1}, ${2:s2})", 2329 | "kind": "function", 2330 | "details": "Compares two strings, ignoring case." 2331 | }, 2332 | { 2333 | "trigger": "strcasematch(pattern, s)", 2334 | "contents": "strcasematch(${1:pattern}, ${2:s})", 2335 | "kind": "function", 2336 | "details": "Returns 1 if a string matches a pattern, ignoring case." 2337 | }, 2338 | { 2339 | "trigger": "strcat(s1, s2)", 2340 | "contents": "strcat(${1:s1}, ${2:s2})", 2341 | "kind": "function", 2342 | "details": "Returns the concatenation of two strings." 2343 | }, 2344 | { 2345 | "trigger": "strcmp(s1, s2)", 2346 | "contents": "strcmp(${1:s1}, ${2:s2})", 2347 | "kind": "function", 2348 | "details": "Compares two strings." 2349 | }, 2350 | { 2351 | "trigger": "strdup(count, s2)", 2352 | "contents": "strdup(${1:count}, ${2:s2})", 2353 | "kind": "function", 2354 | "details": "Duplicates a string." 2355 | }, 2356 | { 2357 | "trigger": "stripmatrix(mat)", 2358 | "contents": "stripmatrix(${1:mat})", 2359 | "kind": "function", 2360 | "details": "Strips non-essential characters from the string representation of a matrix or vector" 2361 | }, 2362 | { 2363 | "trigger": "strlen(s)", 2364 | "contents": "strlen(${1:s})", 2365 | "kind": "function", 2366 | "details": "Returns the number of characters in a string" 2367 | }, 2368 | { 2369 | "trigger": "strmatch(pattern, s)", 2370 | "contents": "strmatch(${1:pattern}, ${2:s})", 2371 | "kind": "function", 2372 | "details": "Returns 1 if a string matches a pattern, including case." 2373 | }, 2374 | { 2375 | "trigger": "strreplace(s, old, new)", 2376 | "contents": "strreplace(${1:s}, ${2:old}, ${3:new})", 2377 | "kind": "function", 2378 | "details": "Replaces substrings with a new string." 2379 | }, 2380 | { 2381 | "trigger": "strsplit(s, separators, component)", 2382 | "contents": "strsplit(${1:s}, ${2:separators}, ${3:component})", 2383 | "kind": "function", 2384 | "details": "Returns one component of a string split by some separators." 2385 | }, 2386 | { 2387 | "trigger": "strsplitcount(s, separators)", 2388 | "contents": "strsplitcount(${1:s}, ${2:separators})", 2389 | "kind": "function", 2390 | "details": "Returns the number of components in a string split by some separators." 2391 | }, 2392 | { 2393 | "trigger": "sturb(X, Y, Z, depth)", 2394 | "contents": "sturb(${1:X}, ${2:Y}, ${3:Z}, ${4:depth})", 2395 | "kind": "function", 2396 | "details": "Generates spatially coherent 3D noise based on sparse convolution." 2397 | }, 2398 | { 2399 | "trigger": "substr(s, start, length)", 2400 | "contents": "substr(${1:s}, ${2:start}, ${3:length})", 2401 | "kind": "function", 2402 | "details": "Returns a substring of a string." 2403 | }, 2404 | { 2405 | "trigger": "surflen(surface_node, prim_num, ustart, vstart, ustop, vstop)", 2406 | "contents": "surflen(${1:surface_node}, ${2:prim_num}, ${3:ustart}, ${4:vstart}, ${5:ustop}, ${6:vstop})", 2407 | "kind": "function", 2408 | "details": "Returns the length of the 3D curve between two points on a surface." 2409 | }, 2410 | { 2411 | "trigger": "system(command_string)", 2412 | "contents": "system(${1:command_string})", 2413 | "kind": "function", 2414 | "details": "Runs a system command line and returns the output." 2415 | }, 2416 | { 2417 | "trigger": "systemES(command_string)", 2418 | "contents": "systemES(${1:command_string})", 2419 | "kind": "function", 2420 | "details": "Runs a system command line and returns the exit status." 2421 | }, 2422 | { 2423 | "trigger": "systemRAW(command_string)", 2424 | "contents": "systemRAW(${1:command_string})", 2425 | "kind": "function", 2426 | "details": "Runs a system command line and returns the output with no processing." 2427 | }, 2428 | { 2429 | "trigger": "tan(degrees)", 2430 | "contents": "tan(${1:degrees})", 2431 | "kind": "function", 2432 | "details": "Returns the tangent of the argument." 2433 | }, 2434 | { 2435 | "trigger": "tanh(number)", 2436 | "contents": "tanh(${1:number})", 2437 | "kind": "function", 2438 | "details": "Returns the hyperbolic tangent of the argument." 2439 | }, 2440 | { 2441 | "trigger": "tex(filename, U, V, color_type)", 2442 | "contents": "tex(${1:filename}, ${2:U}, ${3:V}, ${4:color_type})", 2443 | "kind": "function", 2444 | "details": "Returns the interpolated color of a point on an on-disk texture map." 2445 | }, 2446 | { 2447 | "trigger": "texni(diskfile, U, V, color_type)", 2448 | "contents": "texni(${1:diskfile}, ${2:U}, ${3:V}, ${4:color_type})", 2449 | "kind": "function", 2450 | "details": "Returns the non-interpolated color of a point on an on-disk texture map." 2451 | }, 2452 | { 2453 | "trigger": "tolower(s)", 2454 | "contents": "tolower(${1:s})", 2455 | "kind": "function", 2456 | "details": "Returns the all-lowercase version of a string." 2457 | }, 2458 | { 2459 | "trigger": "toupper(s)", 2460 | "contents": "toupper(${1:s})", 2461 | "kind": "function", 2462 | "details": "Returns the all-uppercase version of a string." 2463 | }, 2464 | { 2465 | "trigger": "translate(tx, ty, tz)", 2466 | "contents": "translate(${1:tx}, ${2:ty}, ${3:tz})", 2467 | "kind": "function", 2468 | "details": "Takes X, Y, and Z translation values and returns a translation matrix." 2469 | }, 2470 | { 2471 | "trigger": "transpose(mat)", 2472 | "contents": "transpose(${1:mat})", 2473 | "kind": "function", 2474 | "details": "Transposes a matrix." 2475 | }, 2476 | { 2477 | "trigger": "trim(s, trim_characters)", 2478 | "contents": "trim(${1:s}, ${2:trim_characters})", 2479 | "kind": "function", 2480 | "details": "" 2481 | }, 2482 | { 2483 | "trigger": "trunc(number)", 2484 | "contents": "trunc(${1:number})", 2485 | "kind": "function", 2486 | "details": "Converts a number to an integer by truncating any fractional part," 2487 | }, 2488 | { 2489 | "trigger": "turb(X, Y, Z, depth)", 2490 | "contents": "turb(${1:X}, ${2:Y}, ${3:Z}, ${4:depth})", 2491 | "kind": "function", 2492 | "details": "Generates spatially coherent 3D noise." 2493 | }, 2494 | { 2495 | "trigger": "uniqueval(surface_node, class, attribute, index)", 2496 | "contents": "uniqueval(${1:surface_node}, ${2:class}, ${3:attribute}, ${4:index})", 2497 | "kind": "function", 2498 | "details": "Returns a unique value of an integer attribute." 2499 | }, 2500 | { 2501 | "trigger": "uniquevals(surface_node, class, attribute, index)", 2502 | "contents": "uniquevals(${1:surface_node}, ${2:class}, ${3:attribute}, ${4:index})", 2503 | "kind": "function", 2504 | "details": "Returns a unique value of a string attribute." 2505 | }, 2506 | { 2507 | "trigger": "unituv(surface_node, prim_num, uv_real, D_U|D_V)", 2508 | "contents": "unituv(${1:surface_node}, ${2:prim_num}, ${3:uv_real}, ${4:D_U|D_V})", 2509 | "kind": "function", 2510 | "details": "Converts real UV to unit UV." 2511 | }, 2512 | { 2513 | "trigger": "uvdist(surface_node, prim1_num, u1, v1, surface_node, prim2_num, u2, v2)", 2514 | "contents": "uvdist(${1:surface_node}, ${2:prim1_num}, ${3:u1}, ${4:v1}, ${5:surface_node}, ${6:prim2_num}, ${7:u2}, ${8:v2})", 2515 | "kind": "function", 2516 | "details": "Returns the distance between parameteric locations on two primitives." 2517 | }, 2518 | { 2519 | "trigger": "vangle(v0, v1)", 2520 | "contents": "vangle(${1:v0}, ${2:v1})", 2521 | "kind": "function", 2522 | "details": "Returns the angle between two vectors." 2523 | }, 2524 | { 2525 | "trigger": "vector(pattern)", 2526 | "contents": "vector(${1:pattern})", 2527 | "kind": "function", 2528 | "details": "Converts a string specification into a vector." 2529 | }, 2530 | { 2531 | "trigger": "vector3(x, y, z)", 2532 | "contents": "vector3(${1:x}, ${2:y}, ${3:z})", 2533 | "kind": "function", 2534 | "details": "Converts three values into a 3-component vector." 2535 | }, 2536 | { 2537 | "trigger": "vector4(x, y, z, w)", 2538 | "contents": "vector4(${1:x}, ${2:y}, ${3:z}, ${4:w})", 2539 | "kind": "function", 2540 | "details": "Converts four values into a 4-component vector." 2541 | }, 2542 | { 2543 | "trigger": "vertex(surface_node, primitive_number, vertex_number, attribute, index)", 2544 | "contents": "vertex(${1:surface_node}, ${2:primitive_number}, ${3:vertex_number}, ${4:attribute}, ${5:index})", 2545 | "kind": "function", 2546 | "details": "Returns the value of a vertex attribute." 2547 | }, 2548 | { 2549 | "trigger": "vertexattriblist(surface_node)", 2550 | "contents": "vertexattriblist(${1:surface_node})", 2551 | "kind": "function", 2552 | "details": "Returns a space-separated list of vertex attribute names." 2553 | }, 2554 | { 2555 | "trigger": "vertexattribsize(surface_node, attribute)", 2556 | "contents": "vertexattribsize(${1:surface_node}, ${2:attribute})", 2557 | "kind": "function", 2558 | "details": "Returns the number of components in a vertex attribute." 2559 | }, 2560 | { 2561 | "trigger": "vertexattribtype(surface_node, attribute)", 2562 | "contents": "vertexattribtype(${1:surface_node}, ${2:attribute})", 2563 | "kind": "function", 2564 | "details": "Returns the type of a vertex attribute." 2565 | }, 2566 | { 2567 | "trigger": "vertexgrouplist(surface_node)", 2568 | "contents": "vertexgrouplist(${1:surface_node})", 2569 | "kind": "function", 2570 | "details": "Returns the list of vertex groups in a surface node." 2571 | }, 2572 | { 2573 | "trigger": "vertexgroupmask(surface_node, pattern)", 2574 | "contents": "vertexgroupmask(${1:surface_node}, ${2:pattern})", 2575 | "kind": "function", 2576 | "details": "Returns the list of vertex groups matching a pattern in a surface node." 2577 | }, 2578 | { 2579 | "trigger": "vertexs(surface_node, primitive_number, vertex_number, attribute)", 2580 | "contents": "vertexs(${1:surface_node}, ${2:primitive_number}, ${3:vertex_number}, ${4:attribute})", 2581 | "kind": "function", 2582 | "details": "Returns the string value of a vertex attribute." 2583 | }, 2584 | { 2585 | "trigger": "vertexsmap(surface_node, attribute, index)", 2586 | "contents": "vertexsmap(${1:surface_node}, ${2:attribute}, ${3:index})", 2587 | "kind": "function", 2588 | "details": "Returns a string from a list of strings in a vertex attribute." 2589 | }, 2590 | { 2591 | "trigger": "vertexsnummap(surface_node, attribute)", 2592 | "contents": "vertexsnummap(${1:surface_node}, ${2:attribute})", 2593 | "kind": "function", 2594 | "details": "Returns the number of unique strings bound to a point attribute." 2595 | }, 2596 | { 2597 | "trigger": "vertexvals(surface_node, primitive_number, vertex_num, attrib_name, component)", 2598 | "contents": "vertexvals(${1:surface_node}, ${2:primitive_number}, ${3:vertex_num}, ${4:attrib_name}, ${5:component})", 2599 | "kind": "function", 2600 | "details": "Returns components of a string array attribute." 2601 | }, 2602 | { 2603 | "trigger": "vlength(vec)", 2604 | "contents": "vlength(${1:vec})", 2605 | "kind": "function", 2606 | "details": "Returns the length of a vector." 2607 | }, 2608 | { 2609 | "trigger": "vlength2(vec)", 2610 | "contents": "vlength2(${1:vec})", 2611 | "kind": "function", 2612 | "details": "" 2613 | }, 2614 | { 2615 | "trigger": "vmatch()", 2616 | "contents": "vmatch()", 2617 | "kind": "function", 2618 | "details": "Channel segment function: matches the incoming and outgoing slopes." 2619 | }, 2620 | { 2621 | "trigger": "vmatchin()", 2622 | "contents": "vmatchin()", 2623 | "kind": "function", 2624 | "details": "Channel segment function: matches the incoming slope." 2625 | }, 2626 | { 2627 | "trigger": "vmatchout()", 2628 | "contents": "vmatchout()", 2629 | "kind": "function", 2630 | "details": "Channel segment function: matches the outgoing slope." 2631 | }, 2632 | { 2633 | "trigger": "volumeaverage(surface_node, prim_id)", 2634 | "contents": "volumeaverage(${1:surface_node}, ${2:prim_id})", 2635 | "kind": "function", 2636 | "details": "Returns the average value of all the voxels in a volume." 2637 | }, 2638 | { 2639 | "trigger": "volumegradient(surface_node, prim_id, x, y, z, axis)", 2640 | "contents": "volumegradient(${1:surface_node}, ${2:prim_id}, ${3:x}, ${4:y}, ${5:z}, ${6:axis})", 2641 | "kind": "function", 2642 | "details": "Returns the gradient of a volume primitive at a specified location." 2643 | }, 2644 | { 2645 | "trigger": "volumeindex(surface_node, prim_id, ix, iy, iz)", 2646 | "contents": "volumeindex(${1:surface_node}, ${2:prim_id}, ${3:ix}, ${4:iy}, ${5:iz})", 2647 | "kind": "function", 2648 | "details": "Returns the value of a volume primitive at a specified voxel." 2649 | }, 2650 | { 2651 | "trigger": "volumeindextopos(surface_node, prim_id, ix, iy, iz, axis)", 2652 | "contents": "volumeindextopos(${1:surface_node}, ${2:prim_id}, ${3:ix}, ${4:iy}, ${5:iz}, ${6:axis})", 2653 | "kind": "function", 2654 | "details": "Converts volume voxel coordinates to world-space coordinates." 2655 | }, 2656 | { 2657 | "trigger": "volumemax(surface_node, prim_id)", 2658 | "contents": "volumemax(${1:surface_node}, ${2:prim_id})", 2659 | "kind": "function", 2660 | "details": "Returns the maximum value of all voxels in a volume." 2661 | }, 2662 | { 2663 | "trigger": "volumemin(surface_node, prim_id)", 2664 | "contents": "volumemin(${1:surface_node}, ${2:prim_id})", 2665 | "kind": "function", 2666 | "details": "Returns the minimum value of all voxels in a volume." 2667 | }, 2668 | { 2669 | "trigger": "volumepostoindex(surface_node, prim_id, x, y, z, axis)", 2670 | "contents": "volumepostoindex(${1:surface_node}, ${2:prim_id}, ${3:x}, ${4:y}, ${5:z}, ${6:axis})", 2671 | "kind": "function", 2672 | "details": "Converts world space coordinates to volume voxel coordinates." 2673 | }, 2674 | { 2675 | "trigger": "volumeres(surface_node, prim_id, axis)", 2676 | "contents": "volumeres(${1:surface_node}, ${2:prim_id}, ${3:axis})", 2677 | "kind": "function", 2678 | "details": "Returns the resolution of a volume." 2679 | }, 2680 | { 2681 | "trigger": "volumesample(surface_node, prim_id, x, y, z)", 2682 | "contents": "volumesample(${1:surface_node}, ${2:prim_id}, ${3:x}, ${4:y}, ${5:z})", 2683 | "kind": "function", 2684 | "details": "Returns the value of a volume at a specified position." 2685 | }, 2686 | { 2687 | "trigger": "volumevoxeldiameter(surface_node, prim_id)", 2688 | "contents": "volumevoxeldiameter(${1:surface_node}, ${2:prim_id})", 2689 | "kind": "function", 2690 | "details": "Returns the approximage diameter of a volume voxel in world space." 2691 | }, 2692 | { 2693 | "trigger": "vorigin(obj1, obj2)", 2694 | "contents": "vorigin(${1:obj1}, ${2:obj2})", 2695 | "kind": "function", 2696 | "details": "Returns a vector of an objects' transforms." 2697 | }, 2698 | { 2699 | "trigger": "vpname(viewer, viewport_quadrant_number)", 2700 | "contents": "vpname(${1:viewer}, ${2:viewport_quadrant_number})", 2701 | "kind": "function", 2702 | "details": "Takes a viewer name and a viewport number and returns the viewport's" 2703 | }, 2704 | { 2705 | "trigger": "vrorigin(obj1, obj2)", 2706 | "contents": "vrorigin(${1:obj1}, ${2:obj2})", 2707 | "kind": "function", 2708 | "details": "Returns a vector of an object's rotations." 2709 | }, 2710 | { 2711 | "trigger": "vscale(vec, scale)", 2712 | "contents": "vscale(${1:vec}, ${2:scale})", 2713 | "kind": "function", 2714 | "details": "Multiplies a vector by a scaling factor." 2715 | }, 2716 | { 2717 | "trigger": "vset(size, value)", 2718 | "contents": "vset(${1:size}, ${2:value})", 2719 | "kind": "function", 2720 | "details": "Creates a vector with each component set to the same value." 2721 | }, 2722 | { 2723 | "trigger": "vsize(vec)", 2724 | "contents": "vsize(${1:vec})", 2725 | "kind": "function", 2726 | "details": "Returns the number of elements in a vector." 2727 | }, 2728 | { 2729 | "trigger": "vtorigin(obj1, obj2)", 2730 | "contents": "vtorigin(${1:obj1}, ${2:obj2})", 2731 | "kind": "function", 2732 | "details": "Returns a vector of an object's translations." 2733 | }, 2734 | { 2735 | "trigger": "wrap(value, minimum, maximum)", 2736 | "contents": "wrap(${1:value}, ${2:minimum}, ${3:maximum})", 2737 | "kind": "function", 2738 | "details": "Wraps a value between a minimum and maximum." 2739 | }, 2740 | { 2741 | "trigger": "xyzdist(x, y, z, surface_node, prim_num, return_type)", 2742 | "contents": "xyzdist(${1:x}, ${2:y}, ${3:z}, ${4:surface_node}, ${5:prim_num}, ${6:return_type})", 2743 | "kind": "function", 2744 | "details": "Returns the distance between a 3D coordinate and a primitive." 2745 | } 2746 | ] 2747 | } -------------------------------------------------------------------------------- /syntax/HScript.sublime-syntax: -------------------------------------------------------------------------------- 1 | %YAML 1.2 2 | 3 | name: HScript 4 | file_extensions: 5 | - cmd 6 | scope: source.hscript 7 | 8 | variables: 9 | expression: 'abs|abspath|acos|angvel|arclen|arclenD|arg|argc|asin|atan|atan2|atof|attriblist|bbox|bezier|bitand|bitor|bitset|bittest|bitxor|boneangle|ceil|centroid|ch|chexist|chexpr|chexprf|chexprt|chf|chgroup|chop|chopcf|chopci|chopct|chope|chopf|chopi|chopl|chopn|chopnames|chopr|chops|chopstr|chopt|chramp|chrampf|chrampt|chs|chsop|chsoplist|chsraw|cht|clamp|clamptosphere|constant|contextoption|contextoptions|cophasmeta|cophasplane|copmeta|copmetas|cos|cosh|cross|cubic|curvature|cycle|cycleoffset|cycleoffsett|cyclet|decode|decodeattrib|decodeparm|deg|degree|detail|detailattriblist|detailattribsize|detailattribtype|details|detailsmap|detailsnummap|detailvals|determinant|dihedral|distance|dopallfields|dopcontextgeo|dopcountslices|dopfield|dopfieldname|dopfields|dopfieldtype|dopframe|dopframetost|dopgrouphasobject|dopgrouplist|dophasfield|dophassubdata|dopnodeobjs|dopnumfields|dopnumobjects|dopnumrecords|dopnumrecordtypes|dopnumsubdata|dopobjectlist|dopobjectsareaffectors|dopobjscreatedby|dopoption|dopoptions|doprecordtypename|dopsolvedopnet|dopsolvenewobject|dopsolvenumnewobjects|dopsolvenumobjects|dopsolveobject|dopsolvetimestep|dopsttoframe|dopsttot|dopsubdataname|doptime|doptransform|dopttost|dopvelatpos|dot|ease|easein|easeinp|easeout|easeoutp|easep|edgegrouplist|edgegroupmask|efit|encode|encodeattrib|encodeparm|eval|evals|execute|executeb|executee|exp|explodematrix|explodematrixp|explodematrixpr|findfile|findfiles|fit|fit01|fit10|fit11|floor|fpadzero|frac|ftoa|ftrim|groupbyval|groupbyvals|hascontextoption|hasdetailattrib|haspdgattrib|haspoint|haspointattrib|hasprim|hasprimattrib|hasvertexattrib|hextoint|hsv|ic|ice|icl|icmax|icmin|icn|icr|ics|identity|if|ifs|imgbounds|index|instancepoint|int|inttohex|invert|iprquery|iprquerys|isclosed|iscollided|ishvariable|ispdgeval|isspline|isstuck|isvariable|iswrapu|iswrapv|length|linear|listbyval|listbyvals|lock|log|log10|lopinputprim|lopinputprims|loplastmodifiedprim|loplastmodifiedprims|lopparentprims|loprelativeprims|ltrim|match|matchin|matchout|matrix|matrixtoquat|max|mcols|metaweight|min|mindist|mlookat|mlookatup|mobjlookat|modblend|morient|mousepane|mousepath|mrows|mzero|nearpoint|noise|normal|normalize|npoints|npointsgroup|nprims|nprimsgroup|nuniquevals|nvertices|nverticesgroup|objkinoverride|objlightmask|objlookat|objpretransform|oc|ocldeviceinfo|oldrand|opblist|opcreator|opdigits|opexist|opflag|opfullpath|opfullpathfrom|opid|opinput|opinputpath|opinputstring|opisloading|opisquitting|oplightmask|oplistsort|opname|opnchildren|opninputs|opnodigits|opnoutputs|opoutput|opoutputpath|oppinput|oppwd|oppwf|oprelativepath|opselect|opselectpath|opselectrecurse|opselectrecursepath|opstreamname|opsubpath|optransform|optype|optypeinfo|origin|originoffset|padzero|param|parmisstring|pdgattrib|pdgattriblist|pdgattribs|pdgattribsize|pdgattribtype|pdgattribute|pdgattributes|pdgattribvals|pdginput|pdginputsize|pdginputtag|pdginputvals|pdgmappath|pdgoutput|pdgoutputsize|pdgoutputtag|pdgoutputvals|pic|picni|pluralize|point|pointattriblist|pointattribsize|pointattribtype|pointavg|pointdist|pointgrouplist|pointgroupmask|pointlist|pointneighbours|pointpattern|points|pointsmap|pointsnummap|pointvals|pow|prim|primattriblist|primattribsize|primattribtype|primdist|primduv|primgrouplist|primgroupmask|primlist|primneighbours|prims|primsmap|primsnummap|primuv|primvals|print|property|propertyf|propertys|propertysop|propertysraw|propertyt|pulse|pythonexprf|pythonexprs|qlinear|quattomatrix|quintic|rad|rand|realuv|relpath|repeat|repeatt|res|rgb|rindex|rint|rotate|rotaxis|round|rtrim|run|runb|rune|scale|scalefrommks|scaletomks|seqanim|seqend|seqlength|seqstart|shopstring|sign|sin|sinh|smooth|snoise|spknot|spline|sqrt|stamp|stamps|strcasecmp|strcasematch|strcat|strcmp|strdup|stripmatrix|strlen|strmatch|strreplace|strsplit|strsplitcount|sturb|substr|surflen|system|systemES|systemRAW|tan|tanh|tex|texni|tolower|toupper|translate|transpose|trim|trunc|turb|uniqueval|uniquevals|unituv|uvdist|vangle|vector|vector3|vector4|vertex|vertexattriblist|vertexattribsize|vertexattribtype|vertexgrouplist|vertexgroupmask|vertexs|vertexsmap|vertexsnummap|vertexvals|vlength|vlength2|vmatch|vmatchin|vmatchout|volumeaverage|volumegradient|volumeindex|volumeindextopos|volumemax|volumemin|volumepostoindex|volumeres|volumesample|volumevoxeldiameter|vorigin|vpname|vrorigin|vscale|vset|vsize|vtorigin|wrap|xyzdist' 10 | command: 'alias|animeditor|appendseq|atjob|audiopanel|autosave|bonealigncapture|boneconvert|bonefixchops|bonemoveend|bookmark|bundlelist|chadd|chalias|chaneditor|chanlist|chautoscope|chautoselect|chblockbegin|chblockend|chcommit|chcp|chgadd|chgglobal|chgls|chgop|chgpopulate|chgrm|chhold|chkey|chkeyget|chkeyls|chkeymv|chkeyrm|chlock|chls|chopexportmap|chopls|chopscope|chopview|chread|chrefit|chrename|chreverse|chrm|chround|chscope|chstretch|chwrite|clear|closeport|cmdread|colladaimport|colorsettings|commandecho|compfree|compopts|compproject|cplane|datatree|desk|dopdatahint|dopdatatypealias|dopdatatypes|dopsave|dopsavedata|dopsolveadddata|dopsolvecopydata|dopsolveremovedata|dopsolvesetoption|dsedit|dsoinfo|dsreload|echo|excat|exedit|exhelp|exit|exls|exread|exrm|fbximport|fbximportanim|fcur|fdependadd|fdependhide|fdependls|fdependrm|filechooser|fplayback|fps|frange|fset|ftimecode|geocache|geospreadsheet|glcache|help|helpbrowser|helpsearch|history|hotkey|imgdispopt|imgsave|imgview|imgview2d|imgviewhist|imgviewls|imgviewtime|imgviewtool|iprview|job|kinconvert|linker|listchooser|loadaudio|loadseq|matrman|matupdateref|memory|menurefresh|message|mnew|mplayfit|mplayhome|mplayprofile|mread|mwrite|nbadd|nbcolor|nbcp|nbget|nbglob|nblocate|nbls|nblsop|nbname|nbop|nbrm|nbset|nbsize|netcolumns|neteditor|netviewdep|networkeditor|nextkey|nodegraph|objcache|objcleantransform|objextractpretransform|objkinoverride|objlightlink|objmaterial|objparent|objpretransform|objresetpretransform|ociocolorspace|ociodisplay|ombind|ombindinfo|omls|omparm|omsbind|omsbindinfo|omsls|omsunbind|omswhere|omunbind|omwhere|omwrite|opadd|opalias|opautoplace|opbadd|opbfilters|opbls|opbname|opbop|opbrm|opcf|opchange|opchangetype|opchmod|opcollapse|opcolor|opcomment|opcook|opcopy|opcp|opdefaultcolor|opdefaultshape|opdelscript|opdepend|opdeprecate|openport|opeventscriptcache|opexclude|opexprlanguage|opextern|opextract|opfind|opfirstname|opgadd|opget|opgetinput|opglob|opgls|opgop|opgrm|ophelp|ophide|opinfo|opinputstring|oplayout|oplegacyinputs|oplocate|opls|opmenu|opmultiparm|opname|oporder|oppane|opparm|oppaste|oppresetload|oppresetloadfile|oppresetls|oppresetrm|oppresetsave|oppresetsavefile|opproperty|oppwf|opramp|opread|oprename|oprm|oprmtype|opsave|opscale|opscript|opset|opspare|opspareds|opstat|optype|optypeinstall|optyperead|optypeuninstall|opunhide|opunload|opunwire|opupdate|opuserdata|opwire|opwrite|otcollapse|otcomment|otconfig|otcontentadd|otcontentdelete|otcontentls|otcontentsave|otcopy|otcplayout|otcreatecompiledtypefrom|otcreatetypefrom|otdelete|otedit|otexpand|otgetotl|otglob|otinuse|otload|otls|otmerge|otprefer|otrefresh|otrenamesource|otsync|ottouch|otunload|otunsync|otversion|otwrite|pane|panepath|parmeditor|parmlist|parmsheet|pathmap|perfmon|performance|pilist|play|pomadd|pomattach|pomclear|pomdetach|pomls|pomparm|pomremove|pomrename|pomscript|pomset|preference|prependseq|prompt|propertyedit|python|pythonpanel|quit|radial|read|reloadseq|render|rexport|rkill|ropview|rps|scenegraphtree|sceneviewconfig|sceneviewopts|sceneviewpurpose|sceneviewrenderopts|seqls|set|setcomp|setenv|setplane|shelfdock|shift|shopconvert|shoppromote|shopthumb|shopvisible|sopcache|sopcreateedit|source|stampdirty|system|takeadd|takeautomode|takeinclude|takelist|takeload|takels|takemerge|takemove|takename|takerm|takesave|takescript|takeset|tcur|test_access|texcache|time|timeslice|tmgadd|tmgls|tmgname|tmgop|tmgrm|tmgshift|toolbar|topcancel|topcook|topdirty|treechooser|treecontrol|tset|ucd|uls|umkdir|undoctrl|unitlength|unitmass|unix|updateui|upwd|urm|varchange|version|vexinfo|vexprofile|viewagentopts|viewbackground|viewcamera|viewcharacteropts|viewcolor|viewcopy|viewdisplay|viewdispopts|viewdispset|vieweffect|viewergrouplist|viewerinspect|vieweroption|viewerstow|viewforeground|viewhome|viewinfotext|viewlayout|viewlight|viewls|viewmaskoverlay|viewname|viewonionskin|viewoptadd|viewoptenable|viewoptls|viewoptname|viewoptrm|viewoptset|vieworthogrid|viewposteffects|viewprojection|viewrefplane|viewroto|viewrotovideo|viewsnapshot|viewsnapshotoption|viewtool|viewtransform|viewtype|viewupdate|viewuvgrid|viewwrite|visualizeradd|visualizerset|vopforcecompile|vopwritevfl' 11 | 12 | contexts: 13 | main: 14 | - include: backticks 15 | - include: variable 16 | - include: string 17 | 18 | - match: '((#).*)' 19 | captures: 20 | 1: comment.line.hscript 21 | 2: punctuation.definition.comment.hscript 22 | 23 | # Operators. 24 | - match: \b(if(?=\s+)|then|else|endif|for|foreach|while|end|break|continue|return)\b 25 | scope: keyword.control.hscript 26 | - match: (\-|\+|\*|\/|%)?= 27 | scope: keyword.operator.assignment.hscript 28 | - match: ==|!=|<=|>=|<|>1 29 | scope: keyword.operator.comparison.hscript 30 | - match: \-\-|\+\+ 31 | scope: keyword.operator.increment-decrement.hscript 32 | - match: \-|\+|\*|\/|% 33 | scope: keyword.operator.arithmetic.hscript 34 | - match: '!|&&|\|\|' 35 | scope: keyword.operator.logical.hscript 36 | - match: \^ 37 | scope: keyword.operator.power.hscript 38 | 39 | # Punctuation 40 | - match: '{' 41 | scope: punctuation.braces.begin.hscript 42 | - match: '}' 43 | scope: punctuation.braces.end.hscript 44 | - match: \[ 45 | scope: punctuation.brackets.begin.hscript 46 | - match: \] 47 | scope: punctuation.brackets.end.hscript 48 | - match: \( 49 | scope: punctuation.parens.begin.hscript 50 | - match: \) 51 | scope: punctuation.parens.end.hscript 52 | - match: ',|:' 53 | scope: punctuation.separator.hscript 54 | 55 | # Constants, functions, types. 56 | - match: (?= 0; src--) 204 | { 205 | result += in[src]; 206 | return result; 207 | } 208 | } 209 | 210 | 211 | 212 | { 213 | float rot = (ch("../crank_rotate/rz") + ch("../root_cyl_01/rz") - ch("../strokepath_01/rz")) * -1; 214 | float crankrad = ch("../cylinder_stroke")/2; 215 | 216 | float aa = crankrad * cos( rot ); 217 | float bb = crankrad * sin( rot ); 218 | float dd = sqrt( ch("../rod_length")^2 - bb^2); 219 | 220 | return aa + dd; 221 | } 222 | 223 | # Function to find the minimum value of two floating point numbers 224 | min(v1, v2) 225 | { 226 | if (v1 < v2) 227 | { 228 | return v1; 229 | } 230 | else 231 | { 232 | return v2; 233 | } 234 | } 235 | 236 | # Function to reverse the order of a string 237 | string strreverse(string in) 238 | { 239 | float len = strlen(in); 240 | string result = ""; 241 | for (src = len-1; src >= 0; src--) 242 | { 243 | result += in[src]; 244 | return result; 245 | } 246 | } 247 | 248 | # Example to find the minimum element in a vector 249 | float vecmin(vector vec) 250 | { 251 | min = vec[0]; 252 | 253 | for (i = 1; i < vsize(vec); i++) 254 | { 255 | if (vec[i] < min) 256 | { 257 | min = vec[i]; 258 | } 259 | } 260 | 261 | return min; 262 | } 263 | 264 | # Example to transform a vector into the space of an object passed in. 265 | vector opxform(string oname, vector v) 266 | { 267 | matrix xform = 1; 268 | 269 | if (index(oname, "/obj/")) 270 | { 271 | xform = optransform(oname); 272 | } 273 | else 274 | { 275 | xform = optransform("/obj/" + oname); 276 | } 277 | 278 | return v * xform; 279 | } 280 | 281 | # Example to find all objects which have their display flag set 282 | string opdisplay() 283 | { 284 | string objects = run("opls /obj"); 285 | string result = ""; 286 | nargs = argc(objects); 287 | 288 | for (i = 0; i < nargs; i++) 289 | { 290 | string obj = arg(objects, i); 291 | if (index(run("opset " + obj), " -d on") >= 0) 292 | { 293 | result += " " + obj; 294 | } 295 | } 296 | 297 | return result; 298 | } 299 | 300 | 301 | # Scripts. 302 | foreach i (a b c) 303 | echo $i 304 | end 305 | 306 | foreach object ("`run("opls -d")`") 307 | echo Object $object 308 | end 309 | 310 | # Data types allowed on objects. 311 | dopdatahint -t SIM_Data SIM_Object 312 | 313 | set foo = "Hello world" 314 | echo '$foo='"$foo" 315 | echo ${afile:e} 316 | 317 | 318 | # Script for a guessing game. 319 | set foo = `system(date)` 320 | set seed = `substr($foo, 14, 2)``substr($foo, 17, 2)` 321 | set num = `int(rand($seed)*100)+1` 322 | set guess = -1 323 | echo Guess a random number between 1 and 100. 324 | while ("$guess" != "$num") 325 | echo "-n Enter guess (q to quit): " 326 | read guess 327 | 328 | if ("$guess" == q || "$guess" == "") then 329 | break; 330 | endif 331 | 332 | # Convert to a number 333 | set iguess = `atof($guess)` 334 | 335 | if ($iguess < $num) then 336 | echo Too low 337 | else if ($iguess > $num) then 338 | echo Too high 339 | else 340 | echo Spot on! 341 | endif 342 | end 343 | echo The number was $num 344 | --------------------------------------------------------------------------------