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

Maya Custom Push/Relax Script

I'm trying to make a custom script that replicates/imitates the Maya Sculpt Geometry Tool. Basically I have 2 radio buttons, Push and Relax[which imitates the push and relax from the sculpt parameters obviously], a value slider[replicates the max…
CPTN_Pixel
  • 15
  • 5
0
votes
1 answer

Maya Python command for adding Vray Attribute

I tried to automate the process to add a Vray Attribute (Object ID) to an Object in Maya. I captured the commands in the Script Editor: vray addAttributesFromGroup |Object vray_objectID 1; vrayAddAttr |Object vraySeparator_vray_objectID;…
Di Wang
  • 471
  • 1
  • 8
  • 22
0
votes
1 answer

Simple function that creates multiple emitters in Maya via Python

I'm trying to create a function that creates emitters (emitting from objects), but I'm having trouble getting it to work with multiple objects at the same time. I want emitter1 to be connected to nParticle1 and emitter2 to nParticle2. def…
Kari Noriy
  • 61
  • 1
  • 9
0
votes
1 answer

Maya: Having trouble writing a script to cut a mesh into equal pieces

I want to split a mesh into sections based on a number of vertices. Essentially, I want a mesh cut into sections of 300 verts each with a remainder section of whatever is left over. I've done this for the most part (i can get verts/faces, etc) but…
Rymbrant
  • 17
  • 1
  • 4
0
votes
1 answer

How can I change one object only when one other object is selected?

I'm browsing MEL and expressions and trying to do something like this: if I select one object I deactivate one property from another. But I'm having problems with the object selection denomination. The following is an example: If (select pCube1-r…
pdaraujo
  • 1
  • 1
0
votes
1 answer

Maya MEL save listAttr into array

Cheers, I am writing on a tool that should get all attributes with a specific prefix and save them into an array. When I use the listAttr on its own it gives me something like this: // Result: message caching isHistoricallyInteresting…
Jan-Philipp Koch
  • 137
  • 2
  • 13
0
votes
1 answer

PyMel Maya Python - Set Joint location

I am very new to PyMel (Done Python before) and I found the documentation available very complicated, and in times simply being still MEL and not Python. Very frustrating to do anything here. I am looking for a way to set the absolute location of…
He.Kin
  • 3
  • 2
0
votes
2 answers

Force date time to time zone when setting variable using Mule expression language

I am using Anypoint Studio 6.1 and Mule 3.8.1 and I want to set a variable with todays date and time e.g. Thu, 2 Mar 2017 22:00:28 GMT but the variable is set it is being set as Thu, 2 Mar 2017 22:00:28 UTC. How can I force it to show in GMT in the…
user3165854
  • 1,505
  • 8
  • 48
  • 100
0
votes
3 answers

Best way to get Shape from a Transform

Using ls -sl returns a transform. The only way I can find to get the shape of a transform is to use getRelatives but this seems wonky compared to other workflows. Is there a better more standard way to get a Shape from a Transform?
Rymbrant
  • 17
  • 1
  • 4
0
votes
2 answers

How to use MEL in dataweave to replace characters in a string

I am using Anypoint Studio 6.1 and Mule 3.8.1 and have this MEL expression that replaces any text \n with a new line/carriage return. payload.replace('\\n', System.getProperty('line.separator')) I would like to move this functionality into…
user3165854
  • 1,505
  • 8
  • 48
  • 100
0
votes
1 answer

mel2pyStr fails when selecting group of objects

I am trying to convert a bunch of MEL code into Python in Maya 2015 like this: mel2py.mel2pyStr(melCmd,pymelNamespace='pm', verbosity=4, forceCompatibility=True) where melCmd is a multi-line code. But it fails when converting the following line: …
Anie
  • 1
0
votes
1 answer

Can you use OR in REPLACE in Anypoint Mule

I am using Anypoint Studio 6.1 and Mule 3.8.1 and want to replace \n with new line and then remove \r, \t, \ from the payload text. I can do this like: #[payload.replace('\\n', System.getProperty('line.separator')).replace('\\r',…
user3165854
  • 1,505
  • 8
  • 48
  • 100
0
votes
1 answer

Get field value from JSON array in Mule flowVars

I am using Anypoint 6.1 and Mule 3.8.1 and have a flowVar which holds a JSON object that looks like this: { "stores": [ [ "store1" ], [ "store2" ] ] } While I loop through the payload I want to pull the value from…
user3165854
  • 1,505
  • 8
  • 48
  • 100
0
votes
1 answer

Maya, MEL, Error when execute the whole script

first, happy new year everyone ! First error of the year is the follow : I got an error when I execute the whole mel script, but my script work actually fine when I execute each lines separately. My code link attributes with connectAttr, between…
0
votes
1 answer

Convert phong to mia material

I am trying to convert a phong material to mia material using this script i found proc connectAndSet(string $original,string $target){ $conn=connectionInfo -sfd ($BARK3); if ($conn!=""){ connectAttr -force $conn $target; } else { …
Aimatos
  • 49
  • 6