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

PYMEL Maya UI crazyness

I'm having trouble with a script i judged simple, yet here I am! The thing is I have no real problem with the ACTUAL script, but with the Maya UI. It seems I can't avoid the creation of multiple windows, nor delete it using deleteUI("nemeOfUI").…
Mendel Reis
  • 55
  • 2
  • 14
0
votes
1 answer

Open Maya callBacks in Python or C++ query all callbacks in Memory

Hello, I'm wondering if there is a way to query all **User Created callbacks in Maya?, And in the same way, if I can query what objects or nodes are connected to them. I want to manage better the cleanliness in the memory at every time and not let…
Nestor Colt
  • 379
  • 4
  • 18
0
votes
1 answer

Using MProgressWindow inside MPxNode::compute

Can I use a MProgressWindow inside MPxNode::compute method? My plug-in implementation doesn't reserve MProgressWindow even when it is not being used by another process. MStatus Node::compute(const MPlug & plug, MDataBlock & data) { if…
Danilo
  • 175
  • 1
  • 11
0
votes
2 answers

Script is printing "select" and "unselect" in the editor console:

In Maya, when running a Python script, the script editor is reporting back every time the script select and unselects something. It is messy and I would rather have that happen under the hood. Is there a way for the script editor to not report those…
winteralfs
  • 459
  • 6
  • 25
0
votes
1 answer

How to change Maya UI text font color?

I want to change the font color of a text in an UI, but it's seems that there is nothing in the text command doc to do this. It's possible to change the background color, but nothing about the font itself. I searched around the internet and found…
UKDP
  • 226
  • 5
  • 21
0
votes
2 answers

Trouble with MFnNurbsSurface.closestPoint in OpenMaya api 2.0

I've recently become aware of the python OpenMaya api v2.0, so I've been going through my code and trying to update it to use the 2.0 version. For the most part it has made a lot more sense to me than the older version of OpenMaya... I've run into…
silent_sight
  • 492
  • 1
  • 8
  • 16
0
votes
0 answers

Using maya.cmds from within the compute function of a custom node (Maya 2016 SP6, Python API)

I have a custom node that uses cmds.setAttr() from within its compute function to update the attributes of two nodes that are connected to it (the purpose of the node is to sync two attribute without locking them). The node works as expected,…
0
votes
0 answers

Running mayapy on mac

I am trying to run a python script using maya's python interpreter. I am writing this script to be placed in a pipeline, so that maya runs in batchmode. Nothing is happening when I run this command: maya -batch -script maya.py $1 I get the…
luii
  • 319
  • 3
  • 5
  • 16
0
votes
0 answers

Can someone explain why Maya is renaming my models on import?

I am working with a large 3D modeled house dataset. Some of the prefabs in the house are conjoined for example all doors in house are a single prefab. When importing to Maya the prefabs are being broken up and renamed. I just need to keep the names…
luii
  • 319
  • 3
  • 5
  • 16
0
votes
1 answer

Is there a way to represent geometric object as a value in maya programmatically?

I am trying to group similar objects (models with transforms) in a maya project by their vertices programmatically and wanted to know if there was a value I could compute to check for similar objects ? The models I am working with is furniture from…
luii
  • 319
  • 3
  • 5
  • 16
0
votes
0 answers

Maya custom dependency node compute function debug statements printing in reverse order (Maya 2016 SP6, Python API)

I am having a bizarre issue where the compute function of my node is printing out debug information in reverse order. I am trying to make a custom sync node that will allow me to synchronize the attributes of two input nodes without locking those…
0
votes
1 answer

Null pointer error when attempting to get data from MDataHandle passed to a helper function in custom node (Maya 2016 SP6, Python API)

I'm having an issue where the MObject returned by MDataHandle.data() is a null pointer when called from within a helper function. I have a custom node with a couple of generic attributes (supports kDouble, k3Double, and k3Float) which need to be…
0
votes
0 answers

Pymel OpenMaya dependency?

Where can I get the Open dependency for pymel? I do not see anywhere in the docs where this is stated Traceback (most recent call last): File "test.py", line 1, in import pymel.core File…
luii
  • 319
  • 3
  • 5
  • 16
0
votes
1 answer

Cmds.radioMenuItemCollection - get selected

Hey all I am trying to get the name of the selected menuItem(radioButton) in a popupMenu. I know in cmds.radioCollection they have a flag called "select" but for cmds.radioMenuItemCollection the flag select doesn't exist. How can I get the name of…
Adam Baker
  • 44
  • 8
0
votes
0 answers

Creating pop up menu items from list in Python

I am trying to create a UI that creates pop up menu items from a list. I've been about to do this with just a normal radial button set up: Cams = cmds.listCameras(p=True) PBCamera = cmds.radioCollection() cmds.button(l="go",…
Adam Baker
  • 44
  • 8