> Describe the problem.
For example, Mesh.vtx cannot be indexed correctly with numpy.int64.
> What Version of Maya are you using?
Maya 2011 SP1 64bit
> On what operating system? (be as specific as possible and include service
> packs, 64bit vs 32bit, etc)
Mac OS X Lion/Snow Leopard, Windows 7 64bit
> What Version of PyMEL are you using?
1.0.0
> What is the expected output? What do you see instead?
It is counter-intuitive that int-like objects cannot be used as indices. It
should work without casting to Python built-in int.
> If possible, provide a few lines of code to reproduce the problem. It helps
> us if your code will reproduce the problem from a new scene.
import sys
sys.path.append('/path/to/numpy')
import pymel.core as pm
import numpy as np
vtx_id = np.arange(10) # create arbitrary list of numpy.int64
mesh = pm.polySphere()[0]
mesh.vtx[vtx_id[5]] # this refers to wrong vertex
# Result: MeshVertex(u'pSphereShape1.vtx[0]') #
mesh.vtx[int(vtx_id[5])] # this works
# Result: MeshVertex(u'pSphereShape1.vtx[5]') #
> Does maya.cmds exhibit the same problem?
Never tried.
> Please provide any additional information below.
Original issue reported on code.google.com by dukec...@gmail.com on 25 Oct 2011 at 5:33
Original issue reported on code.google.com by
dukec...@gmail.com
on 25 Oct 2011 at 5:33