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
6
votes
3 answers

Python > Save help() output to formated html file?

I have a very long output from help() function and found it a bit hard to find what I am looking for in the script editor. Is it possible to save the help() output as a formatted html file?
bwv656
  • 73
  • 6
6
votes
1 answer

Different OpenGL behaviors depending on Maya's viewport used

I have cpp code that displays simple OpenGL shapes in Maya. If the legacy viewport is used, then I have precisely what I want : arrows going along the x axis: However if I use the same code in the ViewPort 2.0 then the arrows are following camera…
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
5
votes
1 answer

Access and modify Maya undo queues

are there any ways in which I could access/ edit the undo queue? The reason I asked is because, in my current tooling, I created the following in one of my renaming function (where you double click on the QListWidgetItem, input in a new name and…
Teh Ki
  • 455
  • 1
  • 3
  • 14
5
votes
4 answers

Maya AbcExport with Python

I have the script to export an Alembic from Maya with MEL : AbcExport(-frameRange 31 41 -writeVisibility -dataFormat ogawa -root |myChar:char|myChar:GEOchar -file E:/test.abc) I would like to do the same with Python. Something like :…
Caryluna
  • 87
  • 1
  • 1
  • 7
5
votes
1 answer

How can I export a simple rigged model from Maya for use in Scenekit?

I am attempting to experiment with Apple’s Fox game SceneKit example (link below) by adding a model with a simple animation like the ‘panda.scn’ and ‘walk.scn’ assets. I can create a static model with no joints or animation that works: e.g. In…
Pat Niemeyer
  • 5,930
  • 1
  • 31
  • 35
5
votes
1 answer

How to add edge in mesh using Maya Python API 2.0

I use maya.api.OpenMaya.MFnMesh.subdivideEdges() function. Edges are split by vertex, but corresponding new edges does not comming. How can I add edge across the split edges ? or how can I create the edges from one vertex to another. Using Maya…
Subin Gopi
  • 541
  • 2
  • 12
5
votes
1 answer

How can I clear the Maya Script Editor programatically?

While creating and debugging scripts, I generate lots of feedback for myself, but if I don't clear the Script Editor, I can get confused about which attempt the feedback I'm looking at came from. Is there a way (preferably with PyMEL, but MEL is ok)…
lofidevops
  • 15,528
  • 14
  • 79
  • 119
5
votes
1 answer

PyQt QLineEdit with history

Do you know an easy way to make an "history" on a QLineEdit in PySide/PyQt? Example: Whenever Enter is pressed, the typed text will be stored, and pressing the "up" or "down" arrows allows you to navigate through the history. Thank you very much
Ben
  • 244
  • 2
  • 9
5
votes
1 answer

Maya Programming: Separating attributes into sections in the attribute editor

Sorry to be so application specific, but I noticed another well answered post about Maya development. I've just written a plugin node for Maya. It just kills a bunch of particles according to a turbulence function. The turbulence is driven by a…
Andy
  • 91
  • 4
5
votes
1 answer

Customize Maya's addCheckCallback pop up message

When the user saves a file I want a check to happen prior to saving. If the check fails then it doesn't save. I got this working with mSceneMessage and kBeforeSaveCheck, but I don't know how to customize the pop-up message when it fails. Is this…
Green Cell
  • 4,677
  • 2
  • 18
  • 49
5
votes
3 answers

Autodesk Maya model panel resize event

I'm writing a simple tool menu for Maya, and I'd like to stick it to the border of model panel (perspective). from PySide import QtCore, QtGui from maya import OpenMayaUI as omui from shiboken import wrapInstance class TestWidget(QtGui.QWidget): …
Kupnu4
  • 103
  • 1
  • 6
5
votes
2 answers

Python String Templating with Case Sensitivity

This is a naming script that i use to name nodes in Autodesk Maya. This particular script however doesnt use anything maya specific. I had asked a while ago how I would go about doing something like this, where a variable convention could be used,…
Neo Conker
  • 169
  • 1
  • 13
5
votes
4 answers

super function doesn't work inside a maya python module

Somehow, this works fine in the Maya/Python script editor, but fails when it's inside of my module code. Anyone have any ideas? class ControlShape(object): def __init__(self, *args, **kwargs): print 'Inside ControlShape...' class…
jedmao
  • 10,224
  • 11
  • 59
  • 65
5
votes
8 answers

Python Vector Class

I'm coming from a C# background where this stuff is super easy—trying to translate into Python for Maya. There's gotta' be a better way to do this. Basically, I'm looking to create a Vector class that will simply have x, y and z coordinates, but it…
jedmao
  • 10,224
  • 11
  • 59
  • 65
5
votes
3 answers

How to get maya main window pointer using PySide?

I've used PyQt4 in maya quite a bit, and generally I've found it quite easy to switch to PySide, but I'm having trouble getting the pointer to the main window. Perhaps someone can understand what's going wrong. Here's what I do in PyQt4: import sip,…
ninhenzo64
  • 702
  • 1
  • 9
  • 23