Advertisement
ylSiew

Untitled

Jan 19th, 2015
1,059
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. def rigToolsModulePath():
  2.     """
  3.    Returns the Main path to the RigTools root module folder
  4.    """
  5.     return os.path.join( os.path.dirname(os.path.dirname(__file__)), '' )
  6.  
  7.  
  8. def start():
  9.     """
  10.    This method acts as the entry point to the RigTools setup
  11.    :return:
  12.    """
  13.  
  14.     # add current module path to the sys.path
  15.     modulePath = os.path.join( rigToolsModulePath() )
  16.     sys.path.append(modulePath)
  17.  
  18.     # import setup script at lowest priority in order to allow Maya to build
  19.     # the main window (MayaWindow) first along with the menubar (gMainFileMenu)
  20.     # evalDeferred() scope runs in Maya's own global scope, so imports
  21.     # must be re-defined here (sys.path scope is not taken into account)
  22.     mc.evalDeferred( 'import rigTools.setup.setup as setup; setup.start()'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement