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

How to align vertices and normals in Maya Api?

I want to copy a shape in Open GL with Maya Api, including normals. Let's take a cube as source shape. Maya's MFnMesh::getPoints will return 8 points. Maya's MFnMesh::getNormals will return 24 normals (3 normals per vertex, or 1 normal per vertex…
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
3
votes
1 answer

Data is lost from an array when trying to access it

I have declared a basic structure as below. struct Item { MPoint key; //4 element double array x,y,z,w represents a point in space Item * next = NULL; }; I have a small array of pointers to these structures Item * arr[3]; When an item is…
DjAndyC
  • 91
  • 7
3
votes
4 answers

Is It Possible To Create A Quaternion Twist Solution Which Allows For 360 Degrees Rotation?

I have recently been reading about quaternions and was wondering if it is possible to create a system which allows you to create a twist system which doesn't flip at +/-180 and allows for 360 degree twisting? Every test I've done keeps coming back…
Hazmondo
  • 31
  • 2
3
votes
1 answer

How do you get Maya to communicate through the localhost IP?

What I have been researching with no luck, is how to get Autodesk Maya to communicate though the web on the localhost ip (preferably TCP). My goal is to control maya with a quick java application I wrote to manipulate curve selecting and such. If…
jjjj
  • 33
  • 4
3
votes
1 answer

Get a mesh node from a transform node in Maya C++ API

I want to get a shape/mesh object under a transform node active in Maya. If I select and object (e.g. a poly sphere) in Maya, when calling getActiveSelectionList method, it returns a transform node, not a shape/mesh one. I'm getting crazy reading…
jgonzac
  • 175
  • 2
  • 9
3
votes
1 answer

PYTHON in MAYA: get all attributes

I would like to know if there is a way to get the list of attributes that we can get with pymel.core.getAttr() (or maya.cmds.getAttr() for cmds users). __dict__ doesn't give that list. import pymel.core as pmc myCubeTrans, myCubeShape =…
Morgan
  • 589
  • 9
  • 20
3
votes
1 answer

maya python subprocess error

in python 2.7 i try this code to get data from Deadline software. Its return some data from server... import subprocess path = 'C:/Program Files/Thinkbox/Deadline7/bin/' p1 = subprocess.Popen([path + 'deadlinecommand.exe', 'pools'],…
Massimo
  • 836
  • 3
  • 17
  • 38
3
votes
1 answer

When to use static and class methods

I know there is a lot of topics on this subject, and I've looked at many. However it is still confusing to me when its appropriate to use static and class methods in place of an instance method. In my example, I'm making a script for the autodesk…
Neo Conker
  • 169
  • 1
  • 13
3
votes
7 answers

Is there a way to indent Python without affecting the code

I'm trying to write a user interface in Maya, and it's getting incredibly confusing with multiple levels of parents and no indents. The basic code (without any functionality) is currently around 400 lines and it's taking a while to find the bits I…
Peter
  • 3,186
  • 3
  • 26
  • 59
3
votes
3 answers

How to query current viewport renderer in maya

Anyone have a good solution for querying the current maya viewport renderer (Viewport 2.0, Default Viewport, High Quality Viewport) in python?
TheBeardedBerry
  • 1,636
  • 5
  • 20
  • 30
3
votes
1 answer

How can I create a new Graph Editor in Maya using Python?

I want to add the part of the graph editor, that shows the curves and the names of the curves, to a menu I've made. Does anyone have any suggestions to how I could do this? UPDATE I'm trying to get something similar to the image above. Adding on a…
Adam Sirrelle
  • 357
  • 8
  • 18
3
votes
1 answer

maya2008 win32api 64 bit python

How is it possible to run import win32api successfully on a 64bit maya version 2008? The following error occurs: Error: No module named win32api Traceback (most recent call last): File "", line 1, in ImportError: No module named win32api I need…
nish
  • 1,008
  • 4
  • 17
  • 34
3
votes
2 answers

How to get all nodes affected by some node in Maya?

In Maya, when you have the option "display affected" turned ON, the nodes affected by the selected node turns pink in the viewport. Is there a way to get a list of those nodes? To be more specific, what a need is to test if I animate or change an…
Alan C
  • 31
  • 2
3
votes
1 answer

File Translator to Export Animated 3D Character from Autodesk Maya as Quake MD2

I'm wondering if anyone knows of a way to export geometry/textures for a rigged, animated character as Quake MD2? I’m developing an app for mobile devices, and I’ve found that MD2 works great for lightweight OpenGL rendering. I have several animated…
Andy R
  • 145
  • 1
  • 9
3
votes
1 answer

Centering the pivot of a GL object that has already been transformed around another pivot?

I'm looking for the best way to center and offset a rotation pivot on an object using openGL shaders. There are differences in 3d apps in how they handle this. I have an object which I set translation to (0,2,2), rotation to (90,0,0) and move the…
bvs
  • 340
  • 5
  • 20