[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2633] trunk/py/scripts/addons/ io_coat3D/coat.py: Fix a bug from last commit.
Campbell Barton
ideasman42 at gmail.com
Mon Nov 21 06:27:22 CET 2011
Suggest use:
os.path.join(os.path.expanduser("~"), '3D-CoatV3', 'Exchange')
Rather than lots of os.sep's:
+ os.sep +
On Sun, Nov 20, 2011 at 5:26 AM, Kalle-Samuli Riihikoski
<haikalle at gmail.com> wrote:
> Revision: 2633
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2633
> Author: haikalle
> Date: 2011-11-19 18:26:53 +0000 (Sat, 19 Nov 2011)
> Log Message:
> -----------
> Fix a bug from last commit.
>
> Modified Paths:
> --------------
> trunk/py/scripts/addons/io_coat3D/coat.py
>
> Modified: trunk/py/scripts/addons/io_coat3D/coat.py
> ===================================================================
> --- trunk/py/scripts/addons/io_coat3D/coat.py 2011-11-19 16:29:14 UTC (rev 2632)
> +++ trunk/py/scripts/addons/io_coat3D/coat.py 2011-11-19 18:26:53 UTC (rev 2633)
> @@ -30,16 +30,20 @@
> platform = os.sys.platform
> coat3D = bpy.context.scene.coat3D
> Blender_export = ""
> -
> - exchange = coat3D.exchangedir
>
> + if(platform == 'win32'):
> + exchange = os.path.expanduser("~") + os.sep + 'Documents' + os.sep + '3D-CoatV3' + os.sep +'Exchange'
> + else:
> + exchange = os.path.expanduser("~") + os.sep + '3D-CoatV3' + os.sep + 'Exchange'
> + if(not(os.path.isdir(exchange))):
> + exchange = coat3D.exchangedir
> +
> if(os.path.isdir(exchange)):
> bpy.coat3D['status'] = 1
> if(platform == 'win32'):
> exchange_path = os.path.expanduser("~") + os.sep + 'Documents' + os.sep + '3DC2Blender' + os.sep + 'Exchange_folder.txt'
> else:
> exchange_path = os.path.expanduser("~") + os.sep + '3DC2Blender' + os.sep + 'Exchange_folder.txt'
> - print("wwwew")
> file = open(exchange_path, "w")
> file.write("%s"%(coat3D.exchangedir))
> file.close()
> @@ -538,7 +542,8 @@
> layout.operator("import3b_applink.pilgway_3d_coat", text="Bring from 3D-Coat")
> layout.separator()
> else:
> - if(os.path.isfile(Blender_export)):
> + if(os.path.isfile(Blender_export)):
> +
>
> layout.operator("import3b_applink.pilgway_3d_coat", text="Bring from 3D-Coat")
> layout.separator()
> @@ -566,7 +571,7 @@
> layout.operator_context = 'INVOKE_REGION_WIN'
> layout.prop(coat3D,"exportover")
> if(coat3D.exportover):
> - layout.prop(coat3D,"exportmod")
> + layout.prop(coat3D,"exportmod")
>
> class VIEW3D_MT_ExtraMenu(bpy.types.Menu):
> bl_label = "Extra"
>
> _______________________________________________
> Bf-extensions-cvs mailing list
> Bf-extensions-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-extensions-cvs
>
--
- Campbell
More information about the Bf-extensions-cvs
mailing list