There are many ways to do that, if you are not familiar with this process, here are a few of the simplest methods:
Option 1 - Set python path through Maya.env file
Maya will read this file at startup.
b) Open the file with any text editor and change the directory to the location. The location should be the animBot parent directory, i.e. for the directory “/net/maya/animBot_installation/1.0.0/animBot”, you will use the following:
c) Copy this file to every user maya preference directory: <user>/maya/<version>, i.e. ..john/maya/2020
d) Restart Maya.
Option 2 - Set python path directly in Maya
There is a way to add a new path to maya python path after you launched it and BEFORE launching animBot, by running the following code in Maya's Script Editor (replace the directory accordingly):
import sys myPath = "/net/maya/animBot_installation/1.0.0/" if myPath not in sys.path: sys.path.insert(0, myPath)
In this method, user will need to run this every Maya session, so it's recommended including it in the animBot launch script, like so:
import sys myPath = "/net/maya/animBot_installation/1.0.0/" if myPath not in sys.path: sys.path.insert(0, myPath) import animBot animBot.toggle()
How do I know if it worked?
Launch Maya, open the Script Editor and run the following python command:
import animBot animBot.toggle()
If you get the error above, it means it failed. Please double check the setup. More information about Python in Maya.
It's important to NOT include "animBot" at the end of the path, we want the parent directory.
/net/maya/animBot_installation/1.0.0/ Correct! /net/maya/animBot_installation/1.0.0/animBot Wrong!
If you successfully added the animBot location to Maya's python path, there will be no error and animBot will show up on top of Maya's timeline: