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

Using .NET in Maya

I'd like to write a plugin for Maya/Windows that uses the .NET library so that I can capture Windows system events from within Maya. I've looked into Python for .NET, but I have no idea what I'm doing. I've tried building from source using Visual C#…
Cindy Xu
  • 61
  • 2
3
votes
1 answer

Force compute when transform node changes (Maya Plugin)

Using the attributeAffects function two attributes of a Maya node can be linked. For example an input attribute, x can be linked to an output attribute, y. This means that when x is changed, Maya will run a compute() callback function on the given…
rykardo
  • 175
  • 3
  • 14
3
votes
3 answers

Importing Maya ASCII to game

I am currently working on creating an import-based pipeline for my indie game using Maya ASCII .ma as source format and my own format for physics and graphics as output. I'll keep stuff like range-of-motion attributes inside Maya, such as for a…
Jonas Byström
  • 25,316
  • 23
  • 100
  • 147
3
votes
1 answer

Writing a MEL/Python script for changing scale values

Guys in Motion Graphics are having difficulty writing a MEL script (being that none of them are programmers). So I had a go at it but I'm having great difficulty because I don't know what a lot of the variables are and syntax etc. Basically want to…
ediblecode
  • 11,701
  • 19
  • 68
  • 116
3
votes
2 answers

How to implement VBOs for large meshes and get a smooth animation?

I am creating an animation in Maya that is a minute long, and I intend to render it in OpenGL. I'm doing this is as a project at college. The scene consists of just a human face making distorted expressions. The mesh has about 2200 quad faces. I…
adi
  • 69
  • 3
2
votes
3 answers

Macro tool for maya

On seeing Photoshop Action, I am curious to develop a macro tool for Maya using python. So I started working on it. Here is my sample, path = "C:/Desktop/file.txt" a = open(path, 'w') #cmds.scriptEditorInfo(ch = True, chf =…
sasecse
  • 69
  • 4
  • 16
2
votes
1 answer

Maya API: how to change UI Time Working Unit

I need to change the time working unit of Maya using the API. (see Window->Settings/Preferences->Preferences->Settings->Working Units->Time) So I do: MTime::Unit mayaTime = MTime::k120FP; status = MTime::setUIUnit(mayaTime); [import…
Korchkidu
  • 4,908
  • 8
  • 49
  • 69
2
votes
1 answer

Switch statement using variables in the case condition

Is it possible to create Switch statements that use variables in the case condition, in Maya Mel Script language? Something along the lines (stupid example for the sake of explanation): $val1 = "foo"; $val2 = "bar"; // imagine $input as an argument…
DiogoNeves
  • 1,727
  • 2
  • 17
  • 36
2
votes
1 answer

How to query any constraint's target list without knowing the constraint type?

In Maya, I have a list of constraints gathered by the following code. I want to iterate the constraints and query the targets for each of them: cons = ls(type='constraint') for con in cons: targets = constraint(query=True, targetList=True) The…
Soviut
  • 88,194
  • 49
  • 192
  • 260
2
votes
2 answers

How to convert ANM files to Maya Acii?

I had these bunch of maya files on my hard drive. Unfortunately, my hard drive crashed, and I had to give it for data recovery. Now, those maya files got recovered as .anm files. Is there a way to convert them back to maya ascii or maya binary…
Saurabh
  • 451
  • 2
  • 4
  • 18
2
votes
1 answer

How to record ARCamera Position and Rotation over time and save it to a file?

I have been trying to create an ARView for over two days now that can record the position of the camera in space over time and then save this to a keyframe file. Basically, I want to create an app that lets you record virtual camera movements that…
Herbert
  • 21
  • 5
2
votes
2 answers

How can I change the rotation values at different keys in playback bar in maya using python?

So I am trying to map all the rotation angles present into the range of 0
2
votes
1 answer

convert string array to float MEL

I having a trouble with a code in MAYA 2020. I want to create a new expression into a default value of a Arnold aiUserDataInt I need the default value of a aiUserDataInt = attribute from a geometry that I crate name "ID" so, my code looks…
2
votes
2 answers

Maya Script to select a channel?

I am looking for a way to select a channel in Maya ( ex, Translate Y or Rotate Z or something like that ) instead of manually selecting a channel by using a mouse click-in attribute editor. Does anyone know a script that allows me to do so? Thank…
MCoo k
  • 21
  • 3
2
votes
1 answer

Print using Stand Output in MEL

In Maya, with Python, I can write to the Command Response Window (I think it's called that - the single line window at the bottom right of the screen): import sys def console_it(s): sys.stdout.write(s) console_it("Hello world") What's the…
Ghoul Fool
  • 6,249
  • 10
  • 67
  • 125