Questions tagged [maya]

Autodesk Maya is a 3D modeling, animation and rendering tool used in film, TV and advertising. Only programming questions are on-topic.

Autodesk Maya is a cross-platform 3D modeling, animation and rendering tool used by many entertainment companies in film, TV and advertising.

Scripting in Maya can be done in either or . Tree Python APIs are included: maya.cmds, and maya.api for a more core-level access to the Maya behaviour.

Non-programming questions should not be posted to Stack Overflow.

Documentation

To access all the documentation for the different Maya versions: https://knowledge.autodesk.com/support/maya/getting-started/caas/simplecontent/content/maya-documentation.html

2561 questions
0
votes
0 answers

How to run your UI again without rerunning your code

I have created a script that manages light setups in maya. You can save the light setup to a text file and create a thumbnail for it. When the function is called to create a thumbnail I want the UI to refresh completely so that the newly saved setup…
0
votes
0 answers

Can't import Qt for Python in Maya

I am trying to build a small UI in Maya with QT through Python. When I use: from Qt import QtCore In the script editor, it throws the following error: Error: ImportError: file line 2: No module named Qt # I am just starting out to explore this…
0
votes
1 answer

Refresh a tab on selecting in Maya Python

I have a tablayout in Maya Python. I'm trying to display a random number every time I navigate through the tab. In the following I'm not getting how to refresh the tab import maya.cmds as cmds cmds.window( widthHeight=(200, 150) ) form =…
rmn.nish
  • 871
  • 2
  • 8
  • 24
0
votes
2 answers

in Maya, how can I toggle the 'ignore hidden in outliner' flag using Python?

Using Maya 2018, how can I write a simple Python command that will toggle the outliner flag, 'ignore hidden in outliner' ? I am having trouble accessing that panel attribute using the outlinerPanel command and the outlinerEdit commands. Here is an…
winteralfs
  • 459
  • 6
  • 25
0
votes
0 answers

How to constrain 2 dictionaries where one is driver and one driven object per key

I am learning Maya Python as part of the art school program but since the teacher is not very competence so I am looking for help with this homework. So the task is basically: Create 2 dictionaries and constrains the values of one key to the other.…
Rey1000
  • 3
  • 1
0
votes
0 answers

Adding transform attributes to a container node in Maya

I have a "container" node in Maya - from maya import cmds; cmds.createNode('container'), which I want to be able to transform (move & rotate) in my scene. I'm aware that the "dagContainer" node supports this, so I would like to know how I can…
Viktor Petrov
  • 444
  • 4
  • 13
0
votes
1 answer

Maya transform node "black box" - hiding node hierarchy from the outliner

The "dagContainer" asset node in Maya has a "blackBox" attribute, which when enabled hides the contents of the asset node's hierarchy in the outliner. A transform node also has the same attribute, however it is hidden and when enabled it does not…
Viktor Petrov
  • 444
  • 4
  • 13
0
votes
2 answers

One checkbox controls other checkboxes in Maya with Python

I am making a UI in Maya with Python. My goal is to make the master checkbox be able to control other checkboxes so that when the master checkbox is checked, all the other checkboxes are checked and vice versa. The function is as same as the Game…
ZTZML
  • 11
  • 1
  • 5
0
votes
1 answer

maya icon for custom plugin

I created a custom node for which I would like to add a custom icon. I read it is enough to make an image and place it inside one of the path contained in the variable XBMLANGPATH. However if I give the mll to someone, this person will have to…
dd95
  • 239
  • 2
  • 16
0
votes
1 answer

(hairSimulation/CFX) selecting multiple curves with its own duplicate and blendShape at the same time

In maya I am simulating hair and I want to lock the curves that are jittering. I duplicated those curves to make blend shapes, but there are too many to blend shape them individually. Is there a way to script to solve this? I think the way is to…
yegsss
  • 15
  • 3
0
votes
2 answers

Maya workspaceControl 'uiScript' does not update to new function

I am creating a new workspaceControl inside maya 2018.6. When I change the uiScript flag to point to a new function and re launch the workspaceControl it is still calling the old function. Here is a simple version of my code: dockName =…
vfxChris
  • 3
  • 2
0
votes
1 answer

JSON dump formatting python

I’m frequently loading and dumping JSON data to and from maya , which is basically append a new dict of variables to a list . All working fine , but I’d really like the JSON to be more readable when debugging . Is there a way to format it better…
blam
  • 87
  • 1
  • 8
0
votes
1 answer

How can I assign a value to a color slider from three menu items in an option menu?

I am doing a rigging tool and I want to assign a different color to the controllers for right and left using a slider. the idea is to select en item from the menu and get the color for that. but for now it is working just the first item and none the…
0
votes
1 answer

How to keep locator at the centre of parents when deleting parent constraint in python

import maya.cmds as cmds sel = cmds.ls(sl = True) cmds.spaceLocator(n = 'driver') for i in sel: cmds.parentConstraint(i, 'driver', n = 'delPs', mo = False) #until this line, the 'driver' keeps its position at the centre of i …
0
votes
1 answer

How can I perform shader assignment to a geo efficiently and non-destructively?

My goal is to set a shader to each parts of a geo. The parts of the geo are typically a group of attached faces. I do this to bake an ID map and then use it in Substance Painter. So far, I separate the parts, then assign a shader to each and unite…
KL75
  • 3
  • 1