How to create a Python library directory in PyCharm for Maya
A brief introduction on creating a new python library using PyCharm for use in Autodesk Maya. Libraries are related code that is packaged together.
Create a new directory in PyCharm, click ‘New’ > ‘Python Package’:
Give it a name and click ‘OK’
Libraries are used in python to contain related code together as a ‘packaged’ library
You can see that a new folder has been created and it contains
Create a new file in this directory called ‘controllerLibrary.py’:
Lets put something in this file to confirm that we can find it within Maya, a print command is an easy place to start:
Print "I am a controller library"
Then from within Maya we’ll run the following command to confirm our new library is being found.
from conLibrary import controllerLibrary reload(controllerLibrary)
We can see in the output that the print statement we defined in the