Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOren Titane (Genome36) <orentitane@gmail.com>2015-08-20 09:07:22 +0300
committerMitchell Stokes <mogurijin@gmail.com>2015-08-20 09:08:15 +0300
commit6d145221a1ec1846f3d5a0855f45d1a1bd4e1915 (patch)
tree79bad54842ac3234e9b7352073b3c8ff231c84c7
parentd7fa659c6f9d4922bbcf63d15a120786e1f6ee68 (diff)
Game Engine Publishing | Lib folder creation bug
This revision fixes a bug with the lib folder creation. As Moguri stated in his add-on wiki, when downloading blender packages for different operating systems, you unpack them in the lib folder (assuming the folder was already created) and press the auto add platform button. Only problem is that when auto-downloading the packages from http://download.blender.org/release/ with the add-on, the lib folder is not created automatically for a new user. Reviewers: #game_engine, moguri Subscribers: Genome36 Projects: #game_engine, #addons Differential Revision: https://developer.blender.org/D723
-rw-r--r--game_engine_publishing.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/game_engine_publishing.py b/game_engine_publishing.py
index 98f6e3c6..644fce07 100644
--- a/game_engine_publishing.py
+++ b/game_engine_publishing.py
@@ -27,7 +27,7 @@ import stat
bl_info = {
"name": "Game Engine Publishing",
- "author": "Mitchell Stokes (Moguri)",
+ "author": "Mitchell Stokes (Moguri), Oren Titane (Genome36)",
"version": (0, 1, 0),
"blender": (2, 72, 0),
"location": "Render Properties > Publishing Info",
@@ -310,7 +310,11 @@ class PublishAutoPlatforms(bpy.types.Operator):
def execute(self, context):
ps = context.scene.ge_publish_settings
+ # verify lib folder
lib_path = bpy.path.abspath(ps.lib_path)
+ if not os.path.exists(lib_path):
+ self.report({'ERROR'}, "Could not add platforms, lib folder (%s) does not exist" % lib_path)
+ return {'CANCELLED'}
for lib in [i for i in os.listdir(lib_path) if os.path.isdir(os.path.join(lib_path, i))]:
print("Found folder:", lib)
@@ -352,7 +356,11 @@ class PublishDownloadPlatforms(bpy.types.Operator):
remote_platforms = []
ps = context.scene.ge_publish_settings
+
+ # create lib folder if not already available
lib_path = bpy.path.abspath(ps.lib_path)
+ if not os.path.exists(lib_path):
+ os.makedirs(lib_path)
print("Retrieving list of platforms from blender.org...", end=" ", flush=True)