Newbie. Using the following code to check if a grayscale image (a mask texture in Maya) has all black pixels in the RGB channels (meaning it is empty). This works, but is a bit slow on large images (2048×2048 is around 15 seconds). Looking for how I can speed this up / do this more efficiently. EDIT: This is the
Tag: maya
Filtering Lists / Conditions on Lists with Python in Maya
I’m new to python and after a lot of time trying to solve a problem, I’m pretty lost so I thought I’d ask my first question here. I have a main file with a referenced file in Maya, where I am trying to list the connections of a certain node, for which the source is in the referenced file and
When the viewport isolates a object, ogsRender() still renders all objects
the viewport like this: 3 objects, 1 selected(the green one). my code: When I execute them one by one, the result is as expected. only the “green one” is in the screenshot. When I execute them together, isolate becomes invalid. all 3 objects are in the screenshot. Why?? Answer This is because the Viewport is locked when the script is
Get the direction an object’s axis is pointing in Maya
Using python I’m trying to confirm that a given transform node in Maya has it’s Y axis pointing up, Z axis pointing forward, and X axis pointing to the side, like in the picture below. The transform node might be a child to another transform node in a hierarchy of unknown depth. My first thought was to use xform rotate
Any way to set multiple keys and values at once in Maya using python?
I’m looking for a solution, that allows to set list of values over given list of times at once, without loop, like this: There are commands and that allow to set animation keys at a given time But non of them allow to set range of value over the range of time (frames). The same value can be put on