maya

Using external GUI libraries to make user interfaces in Autodesk Maya

I develop tools in Autodesk Maya. Many of the tools I build have simple windowed GUIs for the animators and modellers to use. These GUIs often contain what you'd normally expect to see in any basic window; labels, lists, menus, buttons, textfields, etc. However, there are limitations to the complexity of the UIs you can build with the...

How to modify existing panels in Maya using MEL or Python?

I've been writing tools in Maya for years using MEL and Python. I'd consider myself an expert in custom window/gui design in Maya except for one area; modifying existing panels and editors. Typically, I'm building tools that need totally custom UIs, so its customary for me to build them from scratch. However, recently I've found mysel...

Running unit tests with Nose inside a Python environment such as Autodesk Maya?

I'd like to start creating unit tests for my Maya scripts. These scripts must be run inside the Maya environment and rely on the maya.cmds module namespace. How can I run Nose tests from inside a running environment such as Maya? ...

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 problem, there is no general constraint command for manipulating all constraints. Inste...

Why is Maya 2009 TreeView control giving a syntax error on drag?

I'm using the TreeView control in Maya 2009 but I'm getting a syntax error on drag and drop. My code is as follows (simplified for brevity): class View(event.Dispatcher): def __init__(self): self.window = cmds.window() tree_view = cmds.treeView( numberOfButtons=1, allowReparenting=True, dragAndDropComman...

How do I attach a MEL UI to Maya's UV Texture Editor?

I do know how to create a MEL UI window and add content to it. I don't know how to "pin" that UI to a Maya window such as the UV Texture Editor. Ideally I would like to have the ability to control which side of the UV Texture Editor my UI attaches to and have it move and minimize with the window. Is such a thing possible? ...

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 hinge joint. Other types of parameters that needs a lot of tweaks end up in separate source fi...

Maya .ma matrix scale translation

A perhaps slightly off-topic subject, but Maya is giving me serious grief on a specific scale translation matrix transformation, and I have nowhere else to turn. Everything works fine with my Maya .ma (Maya ASCII) importer until Maya descides to add an .spt attribute (typically setAttr ".spt" -type "double3" 1 2 3 ;). From this somewhat...

How to access the notes field of an object in Maya

Is it possible to access the 'notes' field of an object through the Maya scripting interface? I'm trying to get it to work inside Python, but I assume any pointer into the right direction of which class/function I need to use in the API will help me out. ...

MEL: How do I select an end effector of a particular IK handle?

Hi there, Everytime I create a new IK handle in Maya via MEL, it creates an end effector named "effector1", or "effector2", depending on what is in my scene. I don't want to rely on the auto-name of the end effector, so I'm wondering if there is a way to either: a) name the effector at the create-time of the IK handle, or b) select t...

running a method within another method. python

I am calling a method within another. and the error for this script i am getting is NameError: name 'mnDialog' is not defined Is there a reason for it? I think it has something to do with executing a command which isn't on the global level. (i didn't have the impression that python has a global and local variable declaration.) What i...

how (in maya) can i get the 3D position of the mouse?

hello... i have created a dragger context in maya using the following code, pos holds my 2D coordinates of mouse cursor, i want to convert it into 3D coordinate to be the source of the ray i want to launch,, i want it either through python scripting or through the python api,, import maya.cmds as mc mc.draggerContext( 'testContext', ...

compiling maya (3d application ) with qt

including the maya ( 3d application ) classes in qt program gives lot of errors..... i have added all required include paths and libs...the same problem persists .... this is pro file for my qt project TARGET = FileCon TEMPLATE = app SOURCES += main.cpp \ dialog.cpp HEADERS += dialog.h \ ConvertFunction.h FORMS += dialog.ui LIB...

Does Maya Mel have a good API to a IDE ?

Hi, I'm developing in MAYA and looking for a good API to connect my models and to be able to control them programatically. thanks. ...

Creating a simple hierarchy structure in Maya using mel/python

So I want to create a very simple structure out of group and locator nodes in Maya which will then be exported for use in my game level. e.g. Group_Root group_parent - group1 - locator1 - group2 - locator2 - group3 There is only one Group_Root in the file, there are many group_parents ( each uniquely named ...

Maya API to C++

Hi, 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 someone could give me a good place to begin, it would be great. Thanks, Oded. ...

Importing models from Maya to OpenGL with c#

How do I import Maya model to OpenGL with C#? If you have any sample, it would be very useful. ...

draw texts using maya api

Hello there, Is it possible to draw a scalable openGL generated text in maya viewport using maya api, I tried to use the function 'drawText' in M3DView class but it wont draw a scalable text, the result seems to be like a maya annotation texts also it does not response to other openGL functions except glColor. I want to scale the g...

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 would be ideal if this class returned a tuple with all 3 coordinates and if you could edi...

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 characters, and I’d like to export them as MD2 from Maya. Here are some of the things I h...