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

Maya Python change current renderer in render setting

How to change current renderer in maya by python commands. for example : "maya software" to "mental ray" or vice versa any python or pymel command.? import pymel.core as pm import maya.cmds as cmds
Rajiv Sharma
  • 6,746
  • 1
  • 52
  • 54
2
votes
1 answer

What is the name for the Maya Python library(ies)?

I want to distinguish between the Python libraries available in Maya: MEL (the embedded Maya language) Maya Python libraries (maya.cmds, but also maya.standalone and maya.mel.eval) PyMEL [*] (pymel.core and others) Maya Python API 1.0…
lofidevops
  • 15,528
  • 14
  • 79
  • 119
2
votes
4 answers

Extract information from Excel with python 2.7/ pyMel?

I know this is asking a lot, but I have researched quite a few ways on looking up a column or looking up a row using python within an excel document. However, these solutions require you to import different packages, when I do not have access to…
SirJames
  • 387
  • 8
  • 27
2
votes
1 answer

Easiest way to convert between Matrix and Quaternion and EulerRotation in PyMEL

I know how to perform the math to convert between a 4x4 matrix, quaternion, and euler angles given a rotation in any other form. I was just hoping in PyMEL that there would be built-in ways to convert. None have really worked for me so far. …
Steve Middleton
  • 181
  • 4
  • 13
2
votes
1 answer

FrameSelected isn't working

I have this problem where I'm unable to get the function FrameSelected() to work Basically in my scene, there is a camera called TT_CAM and a list of models with the labels called 'Model' (It's like pCube/Sphere etc are called polygon) My objective…
yan
  • 631
  • 9
  • 30
2
votes
2 answers

How to use python (maya) multithreading

I've been looking at examples from other people but I can't seem to get it to work properly. It'll either use a single core, or basically freeze up maya if given too much to process, but I never seem to get more than one core working at once. So…
Peter
  • 3,186
  • 3
  • 26
  • 59
1
vote
1 answer

How to write a python script in Maya with a condition logic

I’m starting as a programmer and currently working on a project but got stuck + have a bit of a brain fart(sorry). I need to write a tool that will: 1 - set character rig by selecting character in the scene and set script to remember selection. 2 -…
1
vote
1 answer

How do you get user choices from a Pymel LayoutDialog?

The following code is taken from the Pymel docs here: https://help.autodesk.com/cloudhelp/2020/ENU/Maya-Tech-Docs/PyMel/generated/functions/pymel.core.windows/pymel.core.windows.layoutDialog.html Although the example is called checkboxPrompt it…
Spacey
  • 153
  • 1
  • 7
1
vote
0 answers

Change maya global preferences via Pymel

I'm trying to make a simple button that wiil set global animation preferences in maya. The script is supposed to change the animation preferences of DEFAULT IN TANGENT , DEFAULT OUT TANGENT and DEFAULT TANGENT WEIGHT. so far this is what I…
Mendel Reis
  • 55
  • 2
  • 14
1
vote
1 answer

getting defaultArnoldRenderOptions attributes

I'm trying to write plugin for Maya using pymel. There is a little problem with using default attributes of Arnold renderer (outputfile format). Code: import maya.cmds as cmds cmds.getAttr('defaultRenderGlobals.imageFormat') #return id of used…
AnnaS
  • 15
  • 6
1
vote
3 answers

Pymel: How do I close For loop after deleting null groups?

As I continue to study For Loops: I've run into some annoying errors. The problem is the script does exactly what I want it to. It deletes the null groups under the demo joints: but unlike other loops I've made for renaming which can be closed with…
Dasteel
  • 101
  • 18
1
vote
1 answer

Maya Python // Error: No object matches name, result of For Loop

So I've been playing around with for loops in Maya: but I've run into a peculiar error: after I try to run my script apparently an error appears in line 72 saying "// Error: No object matches name" I dont get it. I'm not asking for an object, I dont…
Dasteel
  • 101
  • 18
1
vote
1 answer

Maya Python: Renaming object with for loops

so I've been watching the Josh Sobel Python Scripting tutorial and I've been trying to get For loops to work on certain functions: Like when you use nHair to create a ribbon spine using hair follicles and you need the follicles re-named. My goal is…
Dasteel
  • 101
  • 18
1
vote
1 answer

Setting a hotkey for a custom runTimeCommand in Maya

My goal: Set up a simple class to add some keyboard macros to Maya at startup. My Issue: The intended key mappings are not set in the hotkey editor. Editing them manually does work, but as these are default commands, they need to be set…
m3trik
  • 333
  • 2
  • 13
1
vote
1 answer

get list of external files with maya

I am looking for a way to list every external file existing in my scene(already open) without the use of a reader. I've invastigate the pymel doc and could'nt find what i was looking for. I want the list to be complete, to list even files that…
Aurele Collinet
  • 138
  • 1
  • 16
1
2
3
12 13