Questions tagged [mel]

MEL is the Maya Embedded Language used to automate processes in the 3D Computer Animation and Modeling software, "Maya".

MEL stands for Maya Embedded Language, which is a scripting language similar to Perl. It can be used to create automated processes in Autodesks's 3D rendering application Maya.

More information can be found in the Wiki about MEL.

417 questions
5
votes
4 answers

Maya AbcExport with Python

I have the script to export an Alembic from Maya with MEL : AbcExport(-frameRange 31 41 -writeVisibility -dataFormat ogawa -root |myChar:char|myChar:GEOchar -file E:/test.abc) I would like to do the same with Python. Something like :…
Caryluna
  • 87
  • 1
  • 1
  • 7
5
votes
1 answer

How can I clear the Maya Script Editor programatically?

While creating and debugging scripts, I generate lots of feedback for myself, but if I don't clear the Script Editor, I can get confused about which attempt the feedback I'm looking at came from. Is there a way (preferably with PyMEL, but MEL is ok)…
lofidevops
  • 15,528
  • 14
  • 79
  • 119
4
votes
3 answers

Maya – Why Print method can't be executed after Clear History command?

cmds.scriptEditorInfo(clearHistory=True) print("hi") The top line clear's the Maya Script Output window, and then the line below that is supposed to print hi. But when you run this, it flashes the hi output, and then clears everything. So the…
Frank
  • 2,109
  • 7
  • 25
  • 48
4
votes
1 answer

Open a .ma file (ASCII) in Maya with Python?

I'm trying to open a maya scene .ma at the end of a Python script, the path looks like that: G:\ProjectPath\Scene.ma. But the only command I know for this is MEL command: file -f -options "v=0; p=17; f=0" -ignoreVersion -typ "mayaAscii" -o…
Gnn
  • 107
  • 1
  • 2
  • 7
4
votes
1 answer

How do I safely add menuItems to an existing menu in Maya MEL

I tried adding menu items to an existing menu in Maya using MEL Example: menuItem -label "Mylabel" -insertAfter "someEntry" -parent $gMainFileMenu; menuItem -label "Mylabel2" -insertAfter "someEntry" -parent $gMainFileMenu; The issue is that the…
Hugo Dozois
  • 8,147
  • 12
  • 54
  • 58
4
votes
2 answers

How do I create a new syntax hilighting set for a language in Sublime text 2

I'm using the amazing Sublime Text 2 to write MEL (Maya Embedded Language) scripts for Maya, but it has no syntax highlighting for MEL. Right now I force it to interpret the text as Perl, which does an OK job, but its far from perfect. It would be…
jonathan topf
  • 7,897
  • 17
  • 55
  • 85
3
votes
2 answers

Snapping an object to another object vertex in Maya over Python Script

I want to snap / align an object A to vertex of object B. I have tried using below script but its not snapping exactly to the vertex but snapping with an offset. Can any one suggest me a solution. Here are the snapshots. import maya.cmds as…
Rao
  • 2,902
  • 14
  • 52
  • 70
3
votes
1 answer

Remove Menu Item in Maya using Python

How can I remove the menu item from the main window using Python? I have it working using MEL but I need it in Python as well. The part that isn't working is the find menu if exists and delete. I can't seem to find the equivalent in Python. Python…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
3
votes
1 answer

Explanation of $ in Mule MEL

I cannot find any documentation around the use of $ in MEL other than a couple of lines here You can refer to any Java class by its fully qualified name or if it is one of the classes in the automatically-imported Java classes, by its…
Sudarshan
  • 8,574
  • 11
  • 52
  • 74
3
votes
3 answers

How get back a proper json that was stored with fileInfo without the escape sequences?

I cannot retrieve the exact JSON string dump (json.dumps) that I store in Maya's fileInfo. >>> import pymel.core as pc >>> json.dumps({'foo': 123}) '{"foo": 123}' >>> pc.fileInfo['foo'] = json.dumps({'foo': 123}) >>> pc.fileInfo['foo'] u'{\\"foo\\":…
Bleeding Fingers
  • 6,993
  • 7
  • 46
  • 74
3
votes
2 answers

How to check for the presence of a session variable in Mule MEL?

I need to check if a session variable exists. I can check if it is present and set to a variable: But I want something like: -- or --
TERACytE
  • 7,553
  • 13
  • 75
  • 111
3
votes
3 answers

How to create an empty node in Maya MEL language

I would like to create an empty node in Maya (mel language), in which I can store my attributes (visible to the end-user).The reason why I would need an empty node, is because I don't need any locator information or additional standard Maya…
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
3
votes
1 answer

maya python api - render camera and store in variable

I'm working with Maya 2012 and what I want to do is render a camera view. I have found that it's possible to do this using the MEL command 'render' (calling it through python). However, as far as I know, this command renders the image and saves it…
3
votes
0 answers

How to create a MEL filter bank using Marsyas?

I am developing an application using the Marsyas-library. I added some MarSystems to a "Series"-MarSystem. Now I want to add a MEL or BARK filter bank (band-pass filter) to calculate the energy of each band afterwards. I would use a…
JRM
  • 31
  • 3
3
votes
1 answer

Writing a MEL/Python script for changing scale values

Guys in Motion Graphics are having difficulty writing a MEL script (being that none of them are programmers). So I had a go at it but I'm having great difficulty because I don't know what a lot of the variables are and syntax etc. Basically want to…
ediblecode
  • 11,701
  • 19
  • 68
  • 116
1
2 3
27 28