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

Add Maya UV Editor and UV Toolkit in my custom PySide2 UI

I create a QMainWindow and use findControl and wrapInstance to add polyTexturePlacementPanel1 as centralWidget and UVToolkitDockControl as QDocWidget. My UI is based on the dockableWorkspaceWidget.py from maya devkit, that use…
Amin YSH
  • 1
  • 2
0
votes
2 answers

Python for Maya - Slider color changer

I wrote this little script in Python for Maya, where I have a slider that should change the background color of my iconTextButton. Running the script I don't have any warnings or errors, but it doesn't do what I explained above. I can't figure out…
0
votes
1 answer

Drag/marquee selection inside custom maya UI

Is there a way to select several buttons inside a formLayout (or any other layout) with a drag selection? Like how you would do with maya objects in viewport, but inside a custom MEL UI i know you can use getModifiers to know if Shift is pressed to…
Fynmorph
  • 1
  • 1
0
votes
2 answers

maya. is there a way to activate a script job by change of viewport?

there is a event called 'ActiveViewChanged', but it doesn’t work. i would know a alternative method to launch a action just by switching viewport in maya. example: import maya.cmds as cmds def clix(): print "you have clicked on another view"…
0
votes
1 answer

PYQT Maya QMouseEvent won't work after I wrapInstance it

from PySide2 import QtGui,QtCore,QtWidgets from PySide2.QtGui import* from PySide2.QtCore import * from PySide2.QtWidgets import * from shiboken2 import wrapInstance import maya.OpenMayaUI as mui import sys class ui(QWidget): def…
0
votes
1 answer

How do I edit specific shelf buttons at runtime in Maya with Python?

I'm trying to create a script in Python in Maya that will allow me to dynamically alter the image of a specific button and nothing else about that button. I'm crashing into some serious issues that I'll detail below: import maya.cmds as cmds import…
Oafkad
  • 3
  • 3
0
votes
1 answer

(Maya Python) How do I run radio option buttons through a GUI function?

Normally when I run a script with radio button options you select a radio button option and then you activate it with the button. I used to leave my menu gui outside of a function: but ever since I learned importing maya scripts I started wrapping…
Dasteel
  • 101
  • 18
0
votes
1 answer

How can I create a dynamic sample rate for increased accuracy in reading from a Maya animation with Python?

I'm working on a program that outputs data in several CSV files from Maya 2018. It reads an object name from a setting file, then creates an array of every keyframe that object has, then exports a column of keyframes and a column of values of the…
0
votes
1 answer

Maya python CHANGE UVTILE with place2dTexture

In python I want to select one object and change repeatUV . The code work for all objects and not for one specific object import maya.cmds as cmds import pymel.core as pmc def UVTILECHANGE(): selected = cmds.ls(sl=True) …
0
votes
1 answer

How to determined if window in Maya exists?

I'm trying to write a script that will simple toggle the graph Editor on and off in Maya. Trouble is the windows aren't called by the same thing they are named and I'm not sure how to determine if the current window exists. Also a little confused as…
Ghoul Fool
  • 6,249
  • 10
  • 67
  • 125
0
votes
0 answers

Maya API(C++) - MayaApi to c++ did not work well

I recently started studying Maya API. When I tried to write in C++ with reference to the Sample Command Plug-in, it did not work well Build did well, but I don't know exactly what is wrong. Could you help me? #include #include…
0
votes
2 answers

Replicating Maya QLineEdits with the color labels

I am trying to create/ replicate a QLineEdit widget with the ones that we see in Maya (where it has a color label on the left hand side that denotes if it is keyed or not) I am able to replicate it to a certain extent, however having some issues at…
yan
  • 631
  • 9
  • 30
0
votes
1 answer

Getting the collection objects from a collection, maya 2018

I am trying to get hold of the objects included in a collection in Mayas new renderlayer system. I can get the ones in the include field, but not the ones added through add or drag and drop. Basically what I am trying to do is finding all the…
0
votes
0 answers

Maya script that renders to frame buffer keeps grabbing focus on windows

I have a script in Maya (python) that renders a series of frames to the V-ray frame buffer, one for each render layer. It is working well, but when switching render layers and launching the next render, Maya grabs focus, interrupting whatever task…
winteralfs
  • 459
  • 6
  • 25
0
votes
1 answer

RuntimeError / line 22 : Object 'Test' not found

i'm beginning python scripting, and i'm having issues : import maya.cmds as cmds win = 'win' if cmds.window(win, exists = True): cmds.deleteUI(win) win = cmds.window(win, t = 'My First Almost-Functional…
Atohm
  • 3
  • 1