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

How to make cmds.duplicate() execute immediately when called in maya

How to make cmds.duplicate execute immediately when called in maya? Instead of waiting for the entire script to run and then executing it in batches. For example, for this script below, all execution results will appear immediately after the entire…
0
votes
0 answers

Collision deformer - Maya Python API

I'm developing a collision deformer-based Maya PythonApi. At that point, the deformer is working, and I can apply it on the go, but nothing happens when it collides with another geo. In the second script, you can find the connections from the second…
0
votes
1 answer

How do I connect Qt Signals and slots on Maya?

How do I signals and slots implemented on Maya? I have been reading about Qt signals and slots and I am trying to get this to work on Maya API(OpenMaya), but until now without success. I wish someone can point me in the right direction. I would like…
0
votes
1 answer

‘module’ object has no attribute ‘MStatus' in Maya python Api 2020

I am trying to build a command in python for Maya following a course on youtube and it's showing this error "# Error: RuntimeError: file line 2: AttributeError: file C:/Users/saeed/OneDrive/Documents/maya/2020/Plugins/vertexParticle.py line 23:…
0
votes
0 answers

Maya, turn off Segment Scale Compensate and keep pose unchanged in python?

I have already make many animations using Segment Scale Compensate, I need to import these animations to Unity, unfortunately, while SSC is enabled, animations won't work fine in Unity. Since I have many animations, I don't want to modify them…
0
votes
0 answers

Curves plugin for Maya

I work on a project with curves and sweep on Maya 2022. After testing curves, I'm a little bit dissapointed. Curves are complicated to edit/manipulate. I made some research/tests on different software (houdini, max...) and I would like to try…
kopacabana
  • 437
  • 3
  • 17
0
votes
1 answer

venv with renamed python exectuable

I'm trying to create a virtual environment using a custom python build e.g. mayapy.exe -m venv myVenv but I keep getting the following error: Error: [WinError 2] The system cannot find the file specified This is a known issue ->…
0
votes
1 answer

Getting rotation from matrix, OpenMaya

I'm working with OpenMaya and I need to get the Euler rotation from a matrix but i'm getting an error while I launch this simple code: code: import maya.OpenMaya as OpenMaya import maya.cmds as…
0
votes
1 answer

Maya C++ API : Function causes undefined crash without entering the function

I'm currently working on a plugin to stream data from Maya to a custom 3D engine. When I'm fetching existing data: Point Light Function Including the commented function above causes the Maya to crash after the plugin is succesfully…
Binate
  • 1
  • 4
0
votes
0 answers

Maya python api multiply node

So I'm creating a basic multiply node which can have multiple inputs. I want to multiply 2 attributes and get output in third attribute. It is working fine but its not live. so basically I have created 3 attribute 2 input 1 output and created…
Akshat
  • 1
  • 1
0
votes
0 answers

convert Doxygen HTML documentation to JSON/XML (aka reverse-generate documentation)

Maya has a pretty good HTML documentation for their C++ API (which I'm pretty sure comes from Doxygen). However, the Python docs/API is lacking (eg no method return type information). If I had access to the docs in a structured way…
benblo
  • 877
  • 8
  • 18
0
votes
1 answer

How do you use an Iterator without that has no __iter__ method?

While trying some basic programming in Maya I came across the "MitMeshPolygon" method. Which was described as: "This class is the iterator for polygonal surfaces…
0
votes
1 answer

Get used UV tiles of a Polygonal Mesh

Background info Polygonal meshes use UV sets to map image textures to their surface. Using UDIM textures you can use integer tiles to apply different textures as within what integer bounds the UV tile is, e.g. tile [0, 0] can have a different…
Roy Nieterau
  • 1,226
  • 2
  • 15
  • 26
0
votes
1 answer

Get the parameter flags and default values for a Maya command

I am trying to get the flags and default values for any given maya command. In python I would generally use the inspect module, but as pymel is only a wrapper I don't see that as an option here. I was hoping the api would have something that could…
m3trik
  • 333
  • 2
  • 13
0
votes
1 answer

How to apply color and shading to an object using maya-api in c++

i'd like to know how to apply color and shading to an object in c++ (using maya-api map a 2D texture), Here is my code: MString MNEUT_FILE("G:/repos_cpp/data/eye_base.obj"); MGlobal::executeCommand(MString("file -import -namespace \"EYETemp\"…
jituan
  • 1
  • 1