From 04d0261c37ccd28e8466312f5a2d8260c5a4c9e9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 2 Jan 2010 23:14:01 +0000 Subject: new python submodule. eg. from bpy.app import binary_path, version, version_string, home can add constant variables from blender here as needed (maybe functions too... bpy.app.memory_usage() ?) --- release/scripts/modules/bpy/__init__.py | 6 +----- release/scripts/modules/bpy/app.py | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 release/scripts/modules/bpy/app.py (limited to 'release/scripts/modules/bpy') diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py index 65bf75b43e9..6209cbe4f0e 100644 --- a/release/scripts/modules/bpy/__init__.py +++ b/release/scripts/modules/bpy/__init__.py @@ -27,6 +27,7 @@ context = _bpy.context # python modules from bpy import utils +from bpy import app from bpy import ops as _ops_module @@ -100,9 +101,4 @@ def _main(): load_scripts() -# constants -version = _bpy._VERSION -version_string = _bpy._VERSION_STR -home = _bpy._HOME - _main() diff --git a/release/scripts/modules/bpy/app.py b/release/scripts/modules/bpy/app.py new file mode 100644 index 00000000000..da45ab8eb30 --- /dev/null +++ b/release/scripts/modules/bpy/app.py @@ -0,0 +1,26 @@ +# ##### 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# + +# constants +import _bpy +version = _bpy._VERSION +version_string = _bpy._VERSION_STR +home = _bpy._HOME +binary_path = _bpy._BINPATH -- cgit v1.2.3