Questions tagged [pymel]

PyMEL makes python scripting with Maya work the way it should. It builds on the cmds module by organizing many of its commands into a class hierarchy, and by customizing them to operate in a more succinct and intuitive way.

PyMEL according to its website, makes python scripting with Maya work the way it should. Maya's command module is a direct translation of mel commands into python commands.

The result is a very awkward and unpythonic syntax which does not take advantage of python's strengths (particulary, a flexible, object-oriented design).

PyMEL builds on the cmds module by organizing many of its commands into a class hierarchy, and by customizing them to operate in a more succinct and intuitive way.

185 questions
0
votes
1 answer

Getting, Storing, Setting and Modifying Transform Attributes through PyMel

I'm working on something that gets and stores the transforms of an object moved by the user and then allows the user to click a button to return to the values set by the user. So far, I have figured out how to get the attribute, and set it. …
JCubed
  • 1
0
votes
1 answer

Maya drop down menu

I've got a pretty complex question for any Maya coders... I want to utilize a drop down menu similar to that of the cmdScrollFieldExecuter's [script editor's] "Show Tooltip Help". It looks like a window that has been appended to the bottom of the…
SirJames
  • 387
  • 8
  • 27
0
votes
1 answer

Can I log an objective measure of Maya startup time?

Some users are complaining that Autodesk Maya is taking a long time to start - this is before loading a scene. I'd like to take an objective measure of the wall-clock startup time, and log it, so that we can analyze the situation. The logic to…
lofidevops
  • 15,528
  • 14
  • 79
  • 119
0
votes
0 answers

Why does pm.blendShape fail with "Object will not allow alias to be set"?

When iterating over nodes in a Maya scene (multiple geometries on multiple assets), I am setting blendShape targets as follows: pm.blendShape(blendshape, edit=True, target=(mesh, target_index, corrective, 1.0)) Sometimes it works, at other times I…
lofidevops
  • 15,528
  • 14
  • 79
  • 119
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

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

Update or 'Refresh' a Text Field in Pymel / Python

Currently writing a simple script inside maya to fetch camera info and present it in a GUI. The script prints the camera data of the selected camera no problem however I can't seem to get it to update the text fields with the data when the button is…
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
1 answer

Mayapy.exe as python interpreter for SublimeREPL

I've tried following SublimeREPL instructions for setting default_extend_env. I tried: "default_extend_env": {"PATH": "{PATH}:C:/Program Files/Autodesk/Maya2016/bin/mayapy.exe"} I also tried: "default_extend_env": {"PATH":…
0
votes
1 answer

IOError: [Errno 22] PyMel/ Python

Good evening SE'ers, I've got a question that has been bugging me for the last twenty-four hours. I've read up on the issue and my issue seems to be just plain stupid. So, I must be doing something wrong. FIRST I'm using xlrd, xlwt and xlutils to…
SirJames
  • 387
  • 8
  • 27
0
votes
1 answer

Maya Python modules complete documentation?

I've started using Python to script Maya for a school projet but i'm facing a problem with the documentation : I can't find anywhere a complete documentation of all the modules classes and function of the Maya API. I've already foun the Python-style…
Augier
  • 352
  • 4
  • 14
0
votes
2 answers

Maya threading causing crash

I've started an autosave script editor script (using Maya 2014), but it's really unstable and can crash if something happens at the same time as a save. I also just realised crashes will happen even when not saving, so I tried to find what the…
Peter
  • 3,186
  • 3
  • 26
  • 59
0
votes
1 answer

Split maya render layers to files

I am trying to make a script in maya to export render layers to separate files. Though I am not clear on the logic to be applied for the script. I dont want any code just the procedure. Can anyone please help. Thanks in advance to all.
Gaurav
  • 21
  • 2
0
votes
1 answer

Auto-completing "Create Polygon Tool" Maya

I'm trying to figure out a way to create an auto-completing "Create Polygon Tool" in Maya, in Python. It's so when you build geometry, it will select the previous geometry, and the current one you made, and run a line of commands. I've run into a…
SirJames
  • 387
  • 8
  • 27
0
votes
2 answers

Replace text in textField with object name - Pymel

I've realized that there were similar questions located here: textfield query and prefix replacing and here: Python - Change the textField after browsing - MAYA However, these do not address the issue if you have two definitions and need the text…
SirJames
  • 387
  • 8
  • 27