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
0 answers

how to connect to maya's commandport with node webkit?

I'm building a tool to control maya with it and I'm trying to connect to maya's commandport through node webkit to send commands but with no success. I opened the port from maya with mel: commandPort -n "127.0.0.1:6000"; string $p = `commandPort -q…
ABA3DD
  • 33
  • 4
3
votes
3 answers

Getting the name of the mesh that shader was assigned to

How do I get the name of the mesh that the shader was assigned to, using python? Example, lambert02 --> AreaA_01_geo, lambert03 --> AreaA_03_geo, lambert04 --> AreaA_04_geo I tried using Shader = cmds.ls(type = 'surfaceShader') for i in Shader: …
yan
  • 631
  • 9
  • 30
3
votes
1 answer

Documenting Pythons @property "attributes" with docstrings

I gather that docstrings are more of a personal preference than anything, but I wanted to get the opinion of some people smarter than I ... Is this a legitimate way to document the get/set nature pythons @property descriptor attributes? class…
Pax
  • 237
  • 3
  • 11
3
votes
3 answers

How get back a proper json that was stored with fileInfo without the escape sequences?

I cannot retrieve the exact JSON string dump (json.dumps) that I store in Maya's fileInfo. >>> import pymel.core as pc >>> json.dumps({'foo': 123}) '{"foo": 123}' >>> pc.fileInfo['foo'] = json.dumps({'foo': 123}) >>> pc.fileInfo['foo'] u'{\\"foo\\":…
Bleeding Fingers
  • 6,993
  • 7
  • 46
  • 74
3
votes
2 answers

Maya API to C++

I was reading about the Maya API to C++ and didn't quite understand the idea. Upon implementing the API, Can I create an environment, or a GUI in 3D world in Visual Studio? This question is related to my previous one about the Maya API. Question If…
Oded
  • 795
  • 2
  • 12
  • 32
3
votes
1 answer

Applying a file as a texture in Maya python

I'm trying to take a file texture that I added previously in my code and add it to a selected mesh in maya. I'm pretty new to python and scripting in general and I've been struggling with this for a couple days now, so my code is probably a…
user3225017
  • 35
  • 2
  • 4
3
votes
3 answers

How to create an empty node in Maya MEL language

I would like to create an empty node in Maya (mel language), in which I can store my attributes (visible to the end-user).The reason why I would need an empty node, is because I don't need any locator information or additional standard Maya…
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
3
votes
1 answer

Maya Python API 2.0 has no MItDag, so how traverse DAG graph?

This question is specific to Autodesk Maya. Using Maya 2014, SP 2. (Downloading SP 3 now...) When using Version 1 of Maya Python API, to traverse DAG graph this works: import maya.OpenMaya as OM dagIterator = OM.MItDag( OM.MItDag.kDepthFirst,…
ToolmakerSteve
  • 18,547
  • 14
  • 94
  • 196
3
votes
2 answers

Change Python version in Maya

I'm trying to change the version of python within maya. Specifically, I want maya (maya 2013) script editor to use python2.7 and all other packages/modules attached to that version. I also want to be able to import pymel and maya from eclipse. I've…
ejmoli
  • 145
  • 1
  • 9
3
votes
1 answer

MDGModifier return values

I'm updating my command to use MDGModifier::commandToExecute instead of MGlobal::executeCommand in order to provide the undo mechanism. The problem is that my sequence of commands depends on values returned from previous commands, and since…
3
votes
1 answer

Maya export to Three.js JSON

I get a problem when I export my model from Maya to JSON threeJS A lot of vertices look to be in a wrong position : You can download the model obj here : https://dl.dropbox.com/u/5045633/JS_obj/130227_kyary001.OBJ the model js here :…
Makio64
  • 123
  • 1
  • 9
3
votes
3 answers

Maya to three.js with animation

I have a rigged (skeleton and soft bind) model in Maya. The model is all one seamless low poly with a single jpeg texture mapped. There is simple animation of the skeleton. (joint rotation). I need to get it to work with ThreeJs (webGL). Do I…
user2047963
  • 39
  • 1
  • 2
3
votes
1 answer

How do I change the python version in Maya 2013?

I am aiming to write a python script in Maya 2013 that uses a SWIG wrapped pyd library which is compiled using Python 2.7. I cannot rebuild the pyd in Python 2.6.4 which is the version that Maya is bound to. Maya of course then gives this…
vokuheila
  • 185
  • 2
  • 11
3
votes
1 answer

maya python api - render camera and store in variable

I'm working with Maya 2012 and what I want to do is render a camera view. I have found that it's possible to do this using the MEL command 'render' (calling it through python). However, as far as I know, this command renders the image and saves it…
3
votes
0 answers

How is the Shininess of a blinn material calculated by the Collada (dae) - exporter?

I'm using Maya 2013 and the fbx_dae-exporter. When I export a 3d-model with a blinn material with the Eccentricity set to 0.3 the shininess in the dae-file is set to 1.245731 I would like to support collada 1.5 in my application and I get different…
mrgremlin
  • 321
  • 2
  • 15