mel.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. module.exports = function(hljs) {
  2. return {
  3. keywords:
  4. 'int float string vector matrix if else switch case default while do for in break ' +
  5. 'continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic ' +
  6. 'addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey ' +
  7. 'affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve ' +
  8. 'alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor ' +
  9. 'animDisplay animView annotate appendStringArray applicationName applyAttrPreset ' +
  10. 'applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx ' +
  11. 'artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu ' +
  12. 'artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand ' +
  13. 'assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface ' +
  14. 'attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu ' +
  15. 'attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp ' +
  16. 'attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery ' +
  17. 'autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults ' +
  18. 'bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership ' +
  19. 'bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType ' +
  20. 'boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu ' +
  21. 'buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge ' +
  22. 'cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch ' +
  23. 'catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox ' +
  24. 'character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp ' +
  25. 'checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip ' +
  26. 'clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore ' +
  27. 'closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter ' +
  28. 'cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color ' +
  29. 'colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp ' +
  30. 'colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem ' +
  31. 'componentEditor compositingInterop computePolysetVolume condition cone confirmDialog ' +
  32. 'connectAttr connectControl connectDynamic connectJoint connectionInfo constrain ' +
  33. 'constrainValue constructionHistory container containsMultibyte contextInfo control ' +
  34. 'convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation ' +
  35. 'convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache ' +
  36. 'cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel ' +
  37. 'cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver ' +
  38. 'cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor ' +
  39. 'createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer ' +
  40. 'createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse ' +
  41. 'currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx ' +
  42. 'curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface ' +
  43. 'curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox ' +
  44. 'defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete ' +
  45. 'deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes ' +
  46. 'delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo ' +
  47. 'dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable ' +
  48. 'disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected ' +
  49. 'displayColor displayCull displayLevelOfDetail displayPref displayRGBColor ' +
  50. 'displaySmoothness displayStats displayString displaySurface distanceDimContext ' +
  51. 'distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct ' +
  52. 'doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator ' +
  53. 'duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression ' +
  54. 'dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor ' +
  55. 'dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers ' +
  56. 'editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor ' +
  57. 'editorTemplate effector emit emitter enableDevice encodeString endString endsWith env ' +
  58. 'equivalent equivalentTol erf error eval evalDeferred evalEcho event ' +
  59. 'exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp ' +
  60. 'expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof ' +
  61. 'fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo ' +
  62. 'filetest filletCurve filter filterCurve filterExpand filterStudioImport ' +
  63. 'findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster ' +
  64. 'finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar ' +
  65. 'floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo ' +
  66. 'fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint ' +
  67. 'frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss ' +
  68. 'geometryConstraint getApplicationVersionAsFloat getAttr getClassification ' +
  69. 'getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes ' +
  70. 'getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender ' +
  71. 'glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl ' +
  72. 'gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid ' +
  73. 'gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap ' +
  74. 'HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor ' +
  75. 'HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached ' +
  76. 'HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel ' +
  77. 'headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey ' +
  78. 'hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender ' +
  79. 'hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox ' +
  80. 'iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ' +
  81. 'ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ' +
  82. 'ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform ' +
  83. 'insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance ' +
  84. 'instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp ' +
  85. 'interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf ' +
  86. 'isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect ' +
  87. 'itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx ' +
  88. 'jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner ' +
  89. 'keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx ' +
  90. 'keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx ' +
  91. 'keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx ' +
  92. 'keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor ' +
  93. 'layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList ' +
  94. 'lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep ' +
  95. 'listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory ' +
  96. 'listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation ' +
  97. 'listNodeTypes listPanelCategories listRelatives listSets listTransforms ' +
  98. 'listUnselected listerEditor loadFluid loadNewShelf loadPlugin ' +
  99. 'loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log ' +
  100. 'longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive ' +
  101. 'makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext ' +
  102. 'manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx ' +
  103. 'manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout ' +
  104. 'menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp ' +
  105. 'mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move ' +
  106. 'moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute ' +
  107. 'nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast ' +
  108. 'nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint ' +
  109. 'normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect ' +
  110. 'nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref ' +
  111. 'nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType ' +
  112. 'objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface ' +
  113. 'offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit ' +
  114. 'orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier ' +
  115. 'paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration ' +
  116. 'panelHistory paramDimContext paramDimension paramLocator parent parentConstraint ' +
  117. 'particle particleExists particleInstancer particleRenderInfo partition pasteKey ' +
  118. 'pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture ' +
  119. 'pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo ' +
  120. 'pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult ' +
  121. 'pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend ' +
  122. 'polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal ' +
  123. 'polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge ' +
  124. 'polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge ' +
  125. 'polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet ' +
  126. 'polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet ' +
  127. 'polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection ' +
  128. 'polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge ' +
  129. 'polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet ' +
  130. 'polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix ' +
  131. 'polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut ' +
  132. 'polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet ' +
  133. 'polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge ' +
  134. 'polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex ' +
  135. 'polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection ' +
  136. 'polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection ' +
  137. 'polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint ' +
  138. 'polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate ' +
  139. 'polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge ' +
  140. 'polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing ' +
  141. 'polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet ' +
  142. 'polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace ' +
  143. 'popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer ' +
  144. 'projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx ' +
  145. 'propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd ' +
  146. 'python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ' +
  147. 'radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl ' +
  148. 'readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference ' +
  149. 'referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE ' +
  150. 'registerPluginResource rehash reloadImage removeJoint removeMultiInstance ' +
  151. 'removePanelCategory rename renameAttr renameSelectionList renameUI render ' +
  152. 'renderGlobalsNode renderInfo renderLayerButton renderLayerParent ' +
  153. 'renderLayerPostProcess renderLayerUnparent renderManip renderPartition ' +
  154. 'renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor ' +
  155. 'renderWindowSelectContext renderer reorder reorderDeformers requires reroot ' +
  156. 'resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget ' +
  157. 'reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx ' +
  158. 'rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout ' +
  159. 'runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage ' +
  160. 'saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale ' +
  161. 'scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor ' +
  162. 'sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable ' +
  163. 'scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt ' +
  164. 'searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey ' +
  165. 'selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType ' +
  166. 'selectedNodes selectionConnection separator setAttr setAttrEnumResource ' +
  167. 'setAttrMapping setAttrNiceNameResource setConstraintRestPosition ' +
  168. 'setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr ' +
  169. 'setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe ' +
  170. 'setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag ' +
  171. 'setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject ' +
  172. 'setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets ' +
  173. 'shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare ' +
  174. 'shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField ' +
  175. 'shortNameOf showHelp showHidden showManipCtx showSelectionInTitle ' +
  176. 'showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface ' +
  177. 'size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep ' +
  178. 'snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound ' +
  179. 'soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort ' +
  180. 'spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString ' +
  181. 'startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp ' +
  182. 'stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex ' +
  183. 'stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex ' +
  184. 'stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString ' +
  185. 'stringToStringArray strip stripPrefixFromName stroke subdAutoProjection ' +
  186. 'subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV ' +
  187. 'subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror ' +
  188. 'subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease ' +
  189. 'subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring ' +
  190. 'surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton ' +
  191. 'symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext ' +
  192. 'texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext ' +
  193. 'texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text ' +
  194. 'textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList ' +
  195. 'textToShelf textureDisplacePlane textureHairColor texturePlacementContext ' +
  196. 'textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath ' +
  197. 'toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower ' +
  198. 'toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper ' +
  199. 'trace track trackCtx transferAttributes transformCompare transformLimits translator ' +
  200. 'trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence ' +
  201. 'twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit ' +
  202. 'unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink ' +
  203. 'uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane ' +
  204. 'viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex ' +
  205. 'waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire ' +
  206. 'wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform',
  207. illegal: '</',
  208. contains: [
  209. hljs.C_NUMBER_MODE,
  210. hljs.APOS_STRING_MODE,
  211. hljs.QUOTE_STRING_MODE,
  212. {
  213. className: 'string',
  214. begin: '`', end: '`',
  215. contains: [hljs.BACKSLASH_ESCAPE]
  216. },
  217. { // eats variables
  218. begin: '[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)'
  219. },
  220. hljs.C_LINE_COMMENT_MODE,
  221. hljs.C_BLOCK_COMMENT_MODE
  222. ]
  223. };
  224. };