[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24283] trunk/blender: renamed bpy. sys to bpy.utils, since it used to be a attempt to replace pythons sys which is bundled now
Campbell Barton
ideasman42 at gmail.com
Tue Nov 3 19:08:26 CET 2009
Revision: 24283
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24283
Author: campbellbarton
Date: 2009-11-03 19:08:25 +0100 (Tue, 03 Nov 2009)
Log Message:
-----------
renamed bpy.sys to bpy.utils, since it used to be a attempt to replace pythons sys which is bundled now
Modified Paths:
--------------
trunk/blender/release/scripts/io/export_fbx.py
trunk/blender/release/scripts/io/export_obj.py
trunk/blender/release/scripts/io/netrender/client.py
trunk/blender/release/scripts/modules/bpy_sys.py
trunk/blender/source/blender/python/intern/bpy_interface.c
Modified: trunk/blender/release/scripts/io/export_fbx.py
===================================================================
--- trunk/blender/release/scripts/io/export_fbx.py 2009-11-03 17:51:22 UTC (rev 24282)
+++ trunk/blender/release/scripts/io/export_fbx.py 2009-11-03 18:08:25 UTC (rev 24283)
@@ -237,14 +237,14 @@
# FORCE_CWD - dont use the basepath, just add a ./ to the filename.
# use when we know the file will be in the basepath.
# '''
-# fname = bpy.sys.expandpath(fname_orig)
+# fname = bpy.utils.expandpath(fname_orig)
# # fname = Blender.sys.expandpath(fname_orig)
# fname_strip = os.path.basename(fname)
# # fname_strip = strip_path(fname)
# if FORCE_CWD:
# fname_rel = '.' + os.sep + fname_strip
# else:
-# fname_rel = bpy.sys.relpath(fname, basepath)
+# fname_rel = bpy.utils.relpath(fname, basepath)
# # fname_rel = Blender.sys.relpath(fname, basepath)
# if fname_rel.startswith('//'): fname_rel = '.' + os.sep + fname_rel[2:]
# return fname, fname_strip, fname_rel
@@ -349,7 +349,7 @@
fbxpath = filename
# get the path component of filename
- tmp_exists = bpy.sys.exists(fbxpath)
+ tmp_exists = bpy.utils.exists(fbxpath)
# tmp_exists = Blender.sys.exists(fbxpath)
if tmp_exists != 2: # a file, we want a path
@@ -363,7 +363,7 @@
# Draw.PupMenu('Error%t|Directory does not exist!')
return
- tmp_exists = bpy.sys.exists(fbxpath)
+ tmp_exists = bpy.utils.exists(fbxpath)
# tmp_exists = Blender.sys.exists(fbxpath)
if tmp_exists != 2:
@@ -398,7 +398,7 @@
# path may alredy exist
# TODO - might exist but be a file. unlikely but should probably account for it.
- if bpy.sys.exists(new_fbxpath) == 0:
+ if bpy.utils.exists(new_fbxpath) == 0:
# if Blender.sys.exists(new_fbxpath) == 0:
os.mkdir(new_fbxpath)
@@ -3456,7 +3456,7 @@
# - bpy.data.remove_scene: line 366
# - bpy.sys.time move to bpy.sys.util?
# - new scene creation, activation: lines 327-342, 368
-# - uses bpy.sys.expandpath, *.relpath - replace at least relpath
+# - uses bpy.utils.expandpath, *.relpath - replace at least relpath
# SMALL or COSMETICAL
# - find a way to get blender version, and put it in bpy.util?, old was Blender.Get('version')
Modified: trunk/blender/release/scripts/io/export_obj.py
===================================================================
--- trunk/blender/release/scripts/io/export_obj.py 2009-11-03 17:51:22 UTC (rev 24282)
+++ trunk/blender/release/scripts/io/export_obj.py 2009-11-03 18:08:25 UTC (rev 24283)
@@ -223,11 +223,11 @@
copyCount = 0
# for bImage in uniqueImages.values():
-# image_path = bpy.sys.expandpath(bImage.filename)
+# image_path = bpy.utils.expandpath(bImage.filename)
# if bpy.sys.exists(image_path):
# # Make a name for the target path.
# dest_image_path = dest_dir + image_path.split('\\')[-1].split('/')[-1]
-# if not bpy.sys.exists(dest_image_path): # Image isnt alredy there
+# if not bpy.utils.exists(dest_image_path): # Image isnt alredy there
# print('\tCopying "%s" > "%s"' % (image_path, dest_image_path))
# copy_file(image_path, dest_image_path)
# copyCount+=1
Modified: trunk/blender/release/scripts/io/netrender/client.py
===================================================================
--- trunk/blender/release/scripts/io/netrender/client.py 2009-11-03 17:51:22 UTC (rev 24282)
+++ trunk/blender/release/scripts/io/netrender/client.py 2009-11-03 18:08:25 UTC (rev 24283)
@@ -46,7 +46,7 @@
if name == "":
name = "".join(["%02X" % ord(c) for c in ob.name])
- cache_path = bpy.sys.expandpath(point_cache.filepath) if point_cache.external else default_path
+ cache_path = bpy.utils.expandpath(point_cache.filepath) if point_cache.external else default_path
index = "%02i" % point_cache.index
@@ -111,14 +111,14 @@
# LIBRARIES
###########################
for lib in bpy.data.libraries:
- job.addFile(bpy.sys.expandpath(lib_path))
+ job.addFile(bpy.utils.expandpath(lib_path))
###########################
# IMAGES
###########################
for image in bpy.data.images:
if image.source == "FILE" and not image.packed_file:
- job.addFile(bpy.sys.expandpath(image.filename))
+ job.addFile(bpy.utils.expandpath(image.filename))
###########################
# FLUID + POINT CACHE
@@ -129,7 +129,7 @@
for object in bpy.data.objects:
for modifier in object.modifiers:
if modifier.type == 'FLUID_SIMULATION' and modifier.settings.type == "DOMAIN":
- addFluidFiles(job, bpy.sys.expandpath(modifier.settings.path))
+ addFluidFiles(job, bpy.utils.expandpath(modifier.settings.path))
elif modifier.type == "CLOTH":
addPointCache(job, object, modifier.point_cache, default_path)
elif modifier.type == "SOFT_BODY":
Modified: trunk/blender/release/scripts/modules/bpy_sys.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy_sys.py 2009-11-03 17:51:22 UTC (rev 24282)
+++ trunk/blender/release/scripts/modules/bpy_sys.py 2009-11-03 18:08:25 UTC (rev 24283)
@@ -26,5 +26,5 @@
return path
import types
-bpy.sys = types.ModuleType("bpy.sys")
-bpy.sys.expandpath = expandpath
+bpy.utils = types.ModuleType("bpy.utils")
+bpy.utils.expandpath = expandpath
Modified: trunk/blender/source/blender/python/intern/bpy_interface.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_interface.c 2009-11-03 17:51:22 UTC (rev 24282)
+++ trunk/blender/source/blender/python/intern/bpy_interface.c 2009-11-03 18:08:25 UTC (rev 24283)
@@ -200,7 +200,7 @@
}
bpy_import_test("bpy_ops"); /* adds its self to bpy.ops */
- bpy_import_test("bpy_sys"); /* adds its self to bpy.sys */
+ bpy_import_test("bpy_utils"); /* adds its self to bpy.sys */
bpy_import_test("bpy_ext"); /* extensions to our existing types */
}
More information about the Bf-blender-cvs
mailing list