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

how set set attribute ('primaryVisibility') in override.AbsOverride maya 2018 or 2019

how set set attribute ('primaryVisibility') in override.AbsOverride maya 2018 or 2019 import maya.app.renderSetup.model.override as override import maya.app.renderSetup.model.selector as selector import maya.app.renderSetup.model.collection as…
syam
  • 3
  • 3
0
votes
2 answers

Is there a way to automate changing the unresolved name in Maya's reference editor?

I'm not sure if this is a kind of beginner question or not, but I've been searching on internet and nothing seemed to solve my problem. I'm working in a project that requires to change the unresolved name of a referenced object in scene into a form…
slovik
  • 67
  • 7
0
votes
2 answers

How to zero out transform coordinates (like move to origin in game exporter ) in the exported file in maya python or mel?

I am working on a Maya scripting tool to export animation fbx. Is there any way to zero out the transform coordinates, moving objects or hierarchies to the origin in the exported file, as the feature in Maya build-in game exporter "Move to Origin"…
ZTZML
  • 11
  • 1
  • 5
0
votes
1 answer

Is there a way to extract pixel color information from an image with OpenImageIO's python bindings

I want to ask the more experienced people how to get the RGB values of a pixel in an image using oiio's python bindings. I have only just begun using oiio and am unfamiliar with the library as well as image manipulation on code level. I poked…
XJZeng
  • 13
  • 5
0
votes
3 answers

An invalid path was specified when tried to rename file

I'm writing a version-up script (an auto-version-number-incrementing script) in Python, but I'm feeling like I'm having a weird thing going on with my renaming code in Maya. I'm not sure how Maya stored the file path but whenever I tried to rename…
slovik
  • 67
  • 7
0
votes
1 answer

Convert plane normal to tube orientation with python in Maya

In Maya: I have a tube whose pivot is on a plane that is rotated but the pivot does not lie on a vertex. I want to rotate the tube around its pivot so it is perfectly aligned with the normal vector of the face nearest to the pivot of the tube. I…
Lala_Ghost
  • 211
  • 1
  • 12
0
votes
0 answers

Maya textureWindow force imageRatioValue with python

Is it possible to force the textureWindow(uv editor) using a aspect? Not using the selected image aspect but a custom ratio. Texture Window command ImageRatioValue(irv) is only readable.
0
votes
2 answers

Maya MEL - Highlighting Specific Range in Timeline

I'm new in writing scripts. In Maya, I'd like to highlight a specific range in timeline without shift+LMB scrubbing. I want to enter start/end values and make the script select that range. Is that even possible? I haven't found any solution yet.…
0
votes
1 answer

I am having trouble rotating an object in my Pymel code

I am writing a python program to replace all the walls I currently have in a Maya scene. The program should duplicate an existing wall I have in the scene, then replace every wall in the scene with it. The script properly duplicates the desired wall…
0
votes
1 answer

pymel how to get right type of selected node

I'm starting exploring python in maya (pymel) and I have a problem with getting right type of selected object. In outliner I have selected camera but when I'm executing code below it's returning type "transform". How to get right type…
Websterek
  • 39
  • 5
0
votes
1 answer

Obtaining vertices that getEdges() points to

I am trying to use MItMeshPolygon::getEdges() to obtain a list of edge coordinates. However it returns a list of indices for the edges. Where can I find the corresponding data structure that the returned indices refer to?
John Tan
  • 1,331
  • 1
  • 19
  • 35
0
votes
2 answers

Item 'layer 7' already exists in the treeview : in Maya

I want to add two different items that have the same name to a TreeView but they have a different parent. But I get the error: Item 'layer 7' already exists in the TreeView What should I do to avoid this. My code: import maya.cmds as cmds import…
IT World
  • 165
  • 1
  • 10
0
votes
0 answers

Add arbitrary data to Maya Scene that can be read back without opening whole file

I want to store some export settings into my binary Maya file, but I also want to be able to import those settings from an existing, on disk binary Maya file. I have looked at fileInfo, which works to save the data, but I don't know how I can read…
Steven
  • 619
  • 5
  • 24
0
votes
1 answer

Connecting array attributes in Maya Python API 2.0

How to connect 2 array attributes using Maya Python API 2.0? e.g: joint1.worldMatrix[0] >> skinCluster1.matrix[0] I can find plugs but how to connect them? import maya.api.OpenMaya as om node = 'skinCluster1' attr = 'matrix' index = 0 def…
Cyberikia
  • 91
  • 6
0
votes
3 answers

Transferring a mesh from one process to another in PYTHON

I've been cracking my head over this but nothing comes to my mind yet. I want my script to execute a .py file inside of another already started process. I have a maya process opened, and inside for example modo I want to start file hello.py (print…