So I feel dumb for forgetting most of the MEL scripting I learned in school when I want to do something as simple as creating a hotkey that can toggle between two commands. I basiclly want to be able to toggle between the mesh smooth effect in Maya on and off. So thats the low quality mode and high quality mode. Seems like…
I'm trying to create a script that will take a random selection of objects, and organize them into 3 "piles" it should be fairly simple, and I'm sure I'm just about there... but when I try to execute it I get an error message, it reads: "//Error: No object matches name: " Anyone have an idea what's wrong? This is only my…
Eh all, So, my knowledge with mel scripting is very limited but I figured out the basics of the script at the bottom of this link http://ndhaussy.free.fr/maya_object_spreading/ where Nicolas shows how to spread using constraints. So I type the command spreadObjectsOnSurface ("objectB", "objectA", 20) and it works as…
when you select an object, the attribute editor allows you to see all the shaders assigned to it in different tabs, what I would like to do is have a script that essentially does a "select objects with materials" hypershader command on the currently active tab of the attribute editor without opening the hypershader (which…
After unitizing all the faces on an object sometimes the UV shells will be created facing V up, and some times they'll be created rotated 90 degrees U up in the UV editor. Is there a way in Mel to query if they got rotated so I can then rotate make them face the correct direction. I only need to do this on a single face or…
Hi guys, so I'm looking to create a script that exports my selection as .fbx with some specific options, I've searched the help and I can't figure out how to set these options specifically. Basically I want to export the .fbx with these options turned off even if the user has turned them on in the GUI so I'm looking for a…
I haven't written a MEL before but from autodesk doc it suggests in order for Maya to learn the global in MEL you need to source it. (It also explains why you need to re-source it manually when you change the file) Just a guess. EDIT: This doc explains it in more details.
Hi I'm trying to use some MEL code to orient a EP curve control to a joint and while it puts the control in the correct orientation it offsets the control away from the joint. Why does this happen? The code is below: ___________________________________________________________________________________________ { string $sel[]…
I'm increasingly finding situations where it would be benefitical to pick up mel or python. I need some help with something, and hopefully I can study it.I have a few hundred objects correctly named in Maya. I need them all to have their own duplicant of the shader network, with with a name that matches the object's. An…
I've been trying to work on my MEL Scripting by creating a cleanup script in Maya and I've hit a roadbump. The script creates a new window with a few checkboxes with two buttons to confirm and close the window. Before running, it checks to see if you have an object selected before doing anything. In the back end, it's…