Questions tagged [maya-api]

This tag deals with [tag:maya] API questions, as opposed to Maya scripting interfaces.

is a subtag for Maya that deals with the API questions. C++ Application Programmer Interface provides better performance than MEL or Python. You can add new objects to Maya using the API, and code executes approximately ten times faster than when you perform the same task using MEL. Also, you are able to execute MEL commands from the API.

169 questions
0
votes
1 answer

re-ordering polygon face index in maya

I have been wrestling with a problem in Maya for a while, and I cannot find a solution either on or off this site. I made the account so I could pose a direct question to the community and hope to get an answer. The problem is thus: During modeling,…
XJZeng
  • 13
  • 5
0
votes
1 answer

How to fix "maya standalone could not be found" error?

I'm trying to import maya.standalone in Python(IDLE). I declared the environment variable but still I'm getting the error below. import maya.standalone ImportError: DLL load failed: The specified module could not be found. Here's my code: import…
0
votes
1 answer

Importing animations in Maya via Python give odd results

I've trying to build and rebuild a format for game engines, and when trying to put it back to Maya it gives weird results. This is not really an error or anything of the sort, but the results from the animation are weird. I really need to have it in…
Seyren Windsor
  • 115
  • 1
  • 2
  • 12
0
votes
1 answer

Get MDagPath to created node in postConstructor (Maya Python API)

When using the maya python API to create a new node type, I need to run a "maya.cmds.getAttr" on an attribute immediately after the node is created. What is the proper way to get a dagPath to the node you just created in the postConstructor method?
stowaway
  • 77
  • 9
0
votes
1 answer

Non Maya c++ object attribute in a MPxNode

I'm developing a C++ plugin and I would like to know a way to work with a non-Maya class objects through the scene. I mean, I want to have an instance of a class external to Maya API as attribute of the Node class. The class is quite complex and is…
jgonzac
  • 175
  • 2
  • 9
0
votes
2 answers

Maya Python API: Program not closing when running script

I've got a short Maya script that just rotates the camera continuously in a circle. Problem is, when I try to run the script, once it's running I can't close the application until I kill the script. I'm using cmds.refresh() but that only refreshes…
ClydeTheGhost
  • 1,473
  • 2
  • 17
  • 31
0
votes
1 answer

Maya: duplicate AnimCurve in the API/C++

Is there any easy way to copy any type of AnimCurve? I see using MFnAnimCurve it may become quite bloated. P.S.: using Maya 2013 right now.
St0fF
  • 1,553
  • 12
  • 22
0
votes
1 answer

Pass custom data to attributes of MPxLocator (Maya API)

In a cpp class using Maya API, I initiate a custom MPxLocator instance called myLocatorNode and pass its attributes some variables: MDagModifier dagMod; MDGModifier mdgMod; myObj=dagMod.createNode("myLocatorNode",
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
0
votes
1 answer

Maya 2015: fit view issue when create custom node

I have a simple scene like this: Where CTRL_set and CTRL_setsubControl are two custom nodes. When I press F for focus to selection, it gives me this: The mesh go far far away also if I select the mesh (and not the custom node) before press F.…
Ale_32
  • 648
  • 1
  • 6
  • 16
0
votes
2 answers

Change icon on mel script on shelf using mel or python

I have used the addNewShelfTab and scriptToShelf command in MEL to create an icon for my mini mel script. I want to be able to change the icon for this button from the default like you can from the Shelf Editor by using either MEL or Python. How can…
shaveenk
  • 1,983
  • 7
  • 25
  • 37
0
votes
2 answers

how can i get translate values in maya python api?

Actually i'am new to api and am trying to get the translation values(x,y,z) but the problem is i cant get when i specify only "translate" instead of "translateX", "translateY", "translateZ" in every separate line. is there any way to get what i…
Anvesh Chary
  • 65
  • 1
  • 11
-1
votes
1 answer

maya api custom node,get plug in CompoundAttribute

I have written a custom MPXnode that is only used to store data, in the Initialize() section of mpxnode: MFnCompoundAttribute compAttr; MFnNumericAttribute numericAttr; arrayCacheObj = numericAttr.create("doubleArrayC", "dAC",…
Hisen
  • 1
  • 3
-1
votes
1 answer

Change an objects mesh Node in Python Script?

Lets say I have a simple cube and a sphere, is their a way I can make the cubes mesh node match that of the sphere in python? Similar to the Modify --> Replace method. I have tried cmds.nodeCast but I dont want to switch them. Just to copy exactly…
maddog95
  • 3
  • 1
-1
votes
2 answers

What is this C++ Function Declaration

Im new to C++ and what im working on the docs tell me to look at the example code only it doesnt explain anything so im trying to decipher it. i came a across this declaration of a function but i dont fully understand it. just the first function i…
cronicryo
  • 437
  • 1
  • 4
  • 15
-1
votes
1 answer

Maya export uvset from one model to another

Basically I want a way to export the uvs from one model to another as a part of our pipeline where rig and texture/lookdev models(created simultaneously) need to be merged I would like a solution other than importing the model into the scene and…
Gaurav
  • 21
  • 2
1 2 3
11
12