[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4649] contrib/py/scripts/addons/ oscurart_mesh_cache_tools.py: Improves for set folder path.
Eugenio Pignataro
info at oscurart.com.ar
Sun Aug 4 02:41:01 CEST 2013
Revision: 4649
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4649
Author: oscurart
Date: 2013-08-04 00:41:01 +0000 (Sun, 04 Aug 2013)
Log Message:
-----------
Improves for set folder path.
Modified Paths:
--------------
contrib/py/scripts/addons/oscurart_mesh_cache_tools.py
Modified: contrib/py/scripts/addons/oscurart_mesh_cache_tools.py
===================================================================
--- contrib/py/scripts/addons/oscurart_mesh_cache_tools.py 2013-08-03 17:03:15 UTC (rev 4648)
+++ contrib/py/scripts/addons/oscurart_mesh_cache_tools.py 2013-08-04 00:41:01 UTC (rev 4649)
@@ -166,19 +166,18 @@
bl_description = "Copy Filepath"
bl_options = {'REGISTER', 'UNDO'}
- @classmethod
- def poll(cls, context):
- return(bpy.context.scene.muu_pc2_relative_path != "")
-
def execute(self, context):
filefolder = os.path.dirname(bpy.data.filepath)
os.chdir(filefolder)
- if os.path.exists("%s" % (os.path.join(filefolder,bpy.context.scene.muu_pc2_relative_path))):
- print("Folder Already Exists.")
+ if bpy.context.scene.muu_pc2_relative_path != "":
+ if os.path.exists("%s" % (os.path.join(filefolder,bpy.context.scene.muu_pc2_relative_path))):
+ print("Folder Already Exists.")
+ else:
+ os.mkdir("%s" % (os.path.join(filefolder,bpy.context.scene.muu_pc2_relative_path)))
+ bpy.context.scene.muu_pc2_folder = "%s" % (os.path.join(filefolder,bpy.context.scene.muu_pc2_relative_path))
else:
- os.mkdir("%s" % (os.path.join(filefolder,bpy.context.scene.muu_pc2_relative_path)))
+ bpy.context.scene.muu_pc2_folder = "%s" % (filefolder)
- bpy.context.scene.muu_pc2_folder = "%s" % (os.path.join(filefolder,bpy.context.scene.muu_pc2_relative_path))
return {'FINISHED'}
def OscLinkedGroupToLocal():
More information about the Bf-extensions-cvs
mailing list