[Bf-extensions-cvs] [f1f99ebd] blender2.8: Added open .3b file feature
Kalle-Samuli Riihikoski
noreply at git.blender.org
Tue Nov 13 13:44:22 CET 2018
Commit: f1f99ebdea7ae24d0e77305882bdd0a790311588
Author: Kalle-Samuli Riihikoski
Date: Tue Nov 13 14:41:23 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBAf1f99ebdea7ae24d0e77305882bdd0a790311588
Added open .3b file feature
===================================================================
M io_coat3D/__init__.py
===================================================================
diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index 1ea67078..acb107fc 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -585,7 +585,8 @@ class SCENE_OT_import(bpy.types.Operator):
if(found_obj == True):
exportfile = coat3D.exchangedir
path3b_n = coat3D.exchangedir
- path3b_n += ('last_saved_3b_file.txt')
+ path3b_n += ('%slast_saved_3b_file.txt' % (os.sep))
+ print('osoite:', path3b_n)
exportfile += ('%sBlender' % (os.sep))
exportfile += ('%sexport.txt'%(os.sep))
if(os.path.isfile(exportfile)):
@@ -595,6 +596,13 @@ class SCENE_OT_import(bpy.types.Operator):
coat['active_coat'] = line
export_file.close()
os.remove(exportfile)
+ if(os.path.isfile(path3b_n)):
+ export_file = open(path3b_n)
+ for line in export_file:
+ objekti.coat3D.applink_3b_path = line
+ export_file.close()
+ os.remove(path3b_n)
+
obj_names = objekti.coat3D.applink_group
@@ -902,7 +910,7 @@ class VIEW3D_MT_Coat_Dynamic_Menu(bpy.types.Menu):
layout.operator("export_applink.pilgway_3d_coat", text="Copy selected object(s) into 3D-Coat")
layout.separator()
if(context.selected_objects[0].coat3D.applink_3b_path != ''):
- layout.operator("open_3dcoat.pilgway_3d_coat", text="Open " +context.selected_objects[0].coat3D.applink_3b_just_name)
+ layout.operator("open_3dcoat.pilgway_3d_coat", text="Open .3b file" +context.selected_objects[0].coat3D.applink_3b_just_name)
layout.separator()
else:
More information about the Bf-extensions-cvs
mailing list