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
0
votes
1 answer

Can I report more detailed results when invoking a MEL script from PyMel?

Consider the following trivial PyMEL script. It basically calls an existing MEL function. from pymel import * message = "Are you sure you want to clean the scene? (Nodes will be removed.)" do_clean = core.windows.confirmBox("Scene clean",…
lofidevops
  • 15,528
  • 14
  • 79
  • 119
0
votes
1 answer

Maya API behaviour different if executed via button or timechange

I have a Maya plugin in c++. In this plugin, a timeChange function is fired whenever the time changes in Maya. I want to create a specific Mesh Shape when a given time is reached. The shape is properly created, but when wanting to assign a shader to…
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
0
votes
3 answers

switch boolean based on increments

I am making a MEL expression, however I believe the language is somewhat irrelevant. This question is more of a coding logic question. Normally I would do something like this in javascript (which I am more familiar with) and then translate it but I…
0
votes
2 answers

Setting values from DB table to output HTTP headers

I am new to mule ESB. I have a requirement to set HTTP headers where the values should be fetched from MySQLDB. I am able to fetch values from DB. DB returned multiple column values with one row. I can able to set one column value in flow…
Simbu
  • 766
  • 1
  • 12
  • 37
0
votes
0 answers

Trying to duplicate a joint chain in Maya and then change the names

I made a joint chain for a leg and named each joint, "thigh", "knee", "ankle", "ball", and "toe." I want this code to duplicate the chain and then add "_FK" to the end of each name. Right now it will only change the first name correctly, and then…
0
votes
1 answer

How to change the weights of a deformer from a script in Maya?

How to change the weights of a deformer from a script in Maya? This question is ideally for Pymel in Maya 2013, but if it is not possible I would still be interested to know the answer in Python, MEL, or using the C++ Maya-API.
Vincent Cantin
  • 16,192
  • 2
  • 35
  • 57
0
votes
1 answer

Maya Python command for get selected anim layers

I'm trying to query what animation layers are selected using Python. MEL works fine: treeView -query -selectItem ("AnimLayerTabanimLayerEditor") However a similar Python command returns an error: cmds.treeView(q=True, selectItem=[True,…
john
  • 408
  • 9
  • 30
0
votes
1 answer

Mule MEL Date Time Format

I am trying to output data in DD-MON-YY(22-OCT-15) format to insert into an Oracle DB. I used the MEL expression server.dateTime.format("dd-MMM-yy"). This outputs data as 22-Oct-15. See fragment below.
hpandalai
  • 438
  • 2
  • 13
  • 31
0
votes
1 answer

MEL code:Create a cube that high is 1, weight is 2 and d is 2

I have to run MEL script, but I am not sure. This is my code: polyCube -w 2 -h 1 -d 2; setAttr "pCube1.rotateY" 45; setAttr "pCube1.translateY" 5; I am trying to create a cube that high is 1, weight is 2 and d is 2 that will stay at y = 45. Am I…
Thien Tran
  • 11
  • 3
0
votes
2 answers

Connect Transparency to keyframe animation Maya MelPython

I have a workaround to connect the transparency of a Metrial to the keyframe bar in Maya. I create a new Material press "s" for a keyframe got to the keyframe 10, set the transparency to 0 and press again "s". So you are able to fade the…
Denis H.
  • 29
  • 1
  • 3
0
votes
1 answer

How to format a MEL expression string for the expression command in Python?

I am having a problem when creating a Maya MEL expression with a python script. I need to be able to format the expression based on the values entered into certain GUI components but when I try format the expression that contains an "if statement"…
PyHP3D
  • 88
  • 10
0
votes
1 answer

Pymel TypeError: file

I'm trying to select an object and display the line edit from PySide import * from pymel import * import pymel.core as pm import maya.cmds as cmds import maya.mel as mel import maya.OpenMaya as OpenMaya def select_obj(obj): …
0
votes
2 answers

Mule variable in MEL as String

i have an expression bellow to read a file from resources : #[Thread.currentThread().getContextClassLoader().getResourceAsStream('abc.txt')] it worked fine, but i want to use a variable like this…
NhanHo
  • 3
  • 1
  • 4
0
votes
2 answers

Maya MEL variables declaration and initialization

Is it obligatory in MEL to initialize variables and especially strings when you declare them? I know that it is not necessary to initialize string arrays: string $buffer[]; $buffer[0] = "abc"; But what about strings and other variable types? Is it…
Michael
  • 340
  • 3
  • 13
0
votes
2 answers

Change icon on mel script on shelf using mel or python

I have used the addNewShelfTab and scriptToShelf command in MEL to create an icon for my mini mel script. I want to be able to change the icon for this button from the default like you can from the Shelf Editor by using either MEL or Python. How can…
shaveenk
  • 1,983
  • 7
  • 25
  • 37