PyCharm doesn't see maya.cmds contents
I'm running PyCharm Community 2019.2, developing python for maya 2020.
I have this in my source file:
import maya.cmds as cmds
cmds.ls()
PyCharm highlights the command name "ls" and the message when I mouse over it is:
Cannot find reference 'ls' in '__init__.py'
This has always worked before, but I'm at a new job with a new setup and a newer version of maya now. What do I need to do for PyCharm to correctly find the contents of maya.cmds ?
I
Please sign in to leave a comment.
Hi,
Some discussions on the topic:
https://youtrack.jetbrains.com/issue/PY-8377
https://intellij-support.jetbrains.com/hc/en-us/community/posts/205811499-Interpreter-re-configuration-from-editor-to-run-time-Is-this-possible-
So, it seems for a solution you may want to try MayaCharm plugin: https://plugins.jetbrains.com/plugin/8218-mayacharm/versions
Or, python stubs workaround from https://youtrack.jetbrains.com/issue/PY-8377#focus=Comments-27-3663638.0-0