LumaPictures / pymel

Python in Maya Done Right
Other
478 stars 130 forks source link

ls() return type issue #440

Closed ypypjay closed 3 years ago

ypypjay commented 3 years ago

I'm currently learning pymel to gain the advantage of oop. But it seems pycharm or vs code autocomplete feature cannot correctly recognize the returned type of ls() function. For example,if I input following snippet:

meshes = ls(selection = True)
for mesh in meshes:
    mesh.methodname()

The IDE can only identify 'mesh' variable as PyNode ,rather than the exact child class,such as Transform or Mesh.And thus,the IDE cannot provide the child classes' methods autocompletion,which is very painful. I am wondering if there is any solution for this issue? Much appreciated.