l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

mel.js (19118B)


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