Module slumMayaPlugin
[hide private]
[frames] | no frames]

Source Code for Module slumMayaPlugin

 1  # 
 2  # slumMayaPlugin -      the plugin loader. Maya calls the initializePlugin and 
 3  #                                       unitializePlugin in this file everytime the plugin 
 4  #                                       is laoded/unloaded 
 5  # 
 6  #    Copyright (C) 2008 - Roberto Hradec 
 7  # 
 8  # --------------------------------------------------------------------------- 
 9  #        This file is part of SLUM. 
10  # 
11  #    SLUM is free software: you can redistribute it and/or modify 
12  #    it under the terms of the GNU General Public License as published by 
13  #    the Free Software Foundation, either version 3 of the License, or 
14  #    (at your option) any later version. 
15  # 
16  #    SLUM is distributed in the hope that it will be useful, 
17  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
18  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
19  #    GNU General Public License for more details. 
20  # 
21  #    You should have received a copy of the GNU General Public License 
22  #    along with SLUM.  If not, see <http://www.gnu.org/licenses/>. 
23  # --------------------------------------------------------------------------- 
24   
25  import maya.OpenMayaMPx as OpenMayaMPx 
26  import slumMaya 
27   
28  pluginName = "slum" 
29  PluginNodeId = 0xC0000 
30  searchPath = ['SLUM_SEARCH_PATH', 'MAYA_SCRIPT_PATH', 'PYTHONPATH'] 
31   
32 -def initializePlugin(mobject):
33 global nodeFactory 34 mplugin = OpenMayaMPx.MFnPlugin(mobject) 35 nodeFactory = slumMaya.nodeFactory( 36 mplugin, 37 pluginName, 38 PluginNodeId, 39 searchPath 40 ) 41 nodeFactory.register() 42 43 slumMaya.customGLView.initialize(mplugin)
44
45 -def uninitializePlugin(mobject):
46 global nodeFactory 47 mplugin = OpenMayaMPx.MFnPlugin(mobject) 48 nodeFactory.unregister() 49 50 slumMaya.customGLView.uninitialize(mplugin)
51