| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | # ##### BEGIN GPL LICENSE BLOCK ##### | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | #  This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  | #  modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  | #  as published by the Free Software Foundation; either version 2 | 
					
						
							|  |  |  | #  of the License, or (at your option) any later version. | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | #  This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  | #  but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  | #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  | #  GNU General Public License for more details. | 
					
						
							| 
									
										
										
										
											2009-11-07 22:07:46 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | #  You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  | #  along with this program; if not, write to the Free Software Foundation, | 
					
						
							| 
									
										
										
										
											2010-02-12 13:34:04 +00:00
										 |  |  | #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # ##### END GPL LICENSE BLOCK ##### | 
					
						
							| 
									
										
										
										
											2009-10-31 20:16:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-07-31 03:15:37 +00:00
										 |  |  | # <pep8-80 compliant> | 
					
						
							| 
									
										
										
										
											2009-12-05 22:03:07 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-03 23:11:00 +00:00
										 |  |  | """
 | 
					
						
							|  |  |  | Give access to blender data and utility functions. | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-29 10:47:43 +00:00
										 |  |  | __all__ = ( | 
					
						
							|  |  |  |     "app", | 
					
						
							|  |  |  |     "context", | 
					
						
							|  |  |  |     "data", | 
					
						
							|  |  |  |     "ops", | 
					
						
							|  |  |  |     "path", | 
					
						
							|  |  |  |     "props", | 
					
						
							|  |  |  |     "types", | 
					
						
							|  |  |  |     "utils", | 
					
						
							| 
									
										
										
										
											2016-07-29 21:22:27 +10:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2011-06-29 10:47:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-13 09:28:05 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-29 10:47:43 +00:00
										 |  |  | # internal blender C module | 
					
						
							| 
									
										
										
										
											2017-11-29 18:00:41 +11:00
										 |  |  | from _bpy import ( | 
					
						
							|  |  |  |     app, | 
					
						
							|  |  |  |     context, | 
					
						
							|  |  |  |     data, | 
					
						
							| 
									
										
										
										
											2017-11-13 19:43:34 +11:00
										 |  |  |     msgbus, | 
					
						
							| 
									
										
										
										
											2017-11-29 18:00:41 +11:00
										 |  |  |     props, | 
					
						
							|  |  |  |     types, | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2009-11-13 09:28:05 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # python modules | 
					
						
							| 
									
										
										
										
											2017-11-29 18:00:41 +11:00
										 |  |  | from . import ( | 
					
						
							| 
									
										
										
										
											2020-10-08 17:43:08 +11:00
										 |  |  |     ops, | 
					
						
							| 
									
										
										
										
											2017-11-29 18:00:41 +11:00
										 |  |  |     path, | 
					
						
							|  |  |  |     utils, | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2009-09-28 04:29:01 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-07-29 01:24:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:31:39 +00:00
										 |  |  | def main(): | 
					
						
							|  |  |  |     import sys | 
					
						
							| 
									
										
										
										
											2009-11-22 11:23:19 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-11 11:52:28 +00:00
										 |  |  |     # Possibly temp. addons path | 
					
						
							| 
									
										
										
										
											2017-03-29 15:07:41 +11:00
										 |  |  |     from os.path import join, dirname | 
					
						
							|  |  |  |     sys.path.extend([ | 
					
						
							|  |  |  |         join(dirname(dirname(dirname(__file__))), "addons", "modules"), | 
					
						
							|  |  |  |         join(utils.user_resource('SCRIPTS'), "addons", "modules"), | 
					
						
							|  |  |  |     ]) | 
					
						
							| 
									
										
										
										
											2010-03-21 14:56:26 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:31:39 +00:00
										 |  |  |     # fake module to allow: | 
					
						
							|  |  |  |     #   from bpy.types import Panel | 
					
						
							| 
									
										
										
										
											2015-11-16 09:39:06 +11:00
										 |  |  |     sys.modules.update({ | 
					
						
							| 
									
										
										
										
											2016-07-29 21:22:27 +10:00
										 |  |  |         "bpy.app": app, | 
					
						
							|  |  |  |         "bpy.app.handlers": app.handlers, | 
					
						
							|  |  |  |         "bpy.app.translations": app.translations, | 
					
						
							|  |  |  |         "bpy.types": types, | 
					
						
							|  |  |  |     }) | 
					
						
							| 
									
										
										
										
											2015-11-16 09:39:06 +11:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # Initializes Python classes. | 
					
						
							|  |  |  |     # (good place to run a profiler or trace). | 
					
						
							|  |  |  |     utils.load_scripts() | 
					
						
							| 
									
										
										
										
											2009-11-22 11:23:19 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-28 10:00:04 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:31:39 +00:00
										 |  |  | main() | 
					
						
							| 
									
										
										
										
											2011-06-29 10:47:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-12 06:31:39 +00:00
										 |  |  | del main |