Missing "OpenMaya.MTimeArray.__setitem__() " in Maya 2022.5?

Missing "OpenMaya.MTimeArray.__setitem__() " in Maya 2022.5?

swchung
Participant Participant
311 Views
1 Reply
Message 1 of 2

Missing "OpenMaya.MTimeArray.__setitem__() " in Maya 2022.5?

swchung
Participant
Participant

Expectation:

documentation.png

 

Real:

real.png

 

Where's the lost & found for APIs? ㄟ( ▔, ▔ )ㄏ

Accepted solutions (1)
312 Views
1 Reply
Reply (1)
Message 2 of 2

swchung
Participant
Participant
Accepted solution

I asked about this issue to Autodesk Support and I was able to get an answer.

 

The problem was because I imported API v1 instead of v2.

 

API v1: from maya import OpenMaya

API v2: from maya.api import OpenMaya

 

In API v2 I can use MTimeArray.__setitem__() without any problem. Thanks to the support team.