diff options
author | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2011-06-09 12:52:08 +0400 |
---|---|---|
committer | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2011-06-09 12:52:08 +0400 |
commit | e72dca2851413901f142ec3dc359c0b3727ac10d (patch) | |
tree | 0d4129ace279b87c313de9d904d938b6006d5a14 | |
parent | 52ab7574530c227ecca903ca8ec59a7a00240c78 (diff) |
-Removed extra print() lines
-Fixed Blender_export issue. Thanks to Perfection Cat providing the fix.
-rw-r--r-- | io_coat3D/coat.py | 17 | ||||
-rw-r--r-- | io_coat3D/tex.py | 6 |
2 files changed, 16 insertions, 7 deletions
diff --git a/io_coat3D/coat.py b/io_coat3D/coat.py index cc89fcce..fa2c733c 100644 --- a/io_coat3D/coat.py +++ b/io_coat3D/coat.py @@ -50,6 +50,7 @@ class SCENE_PT_Main(ObjectButtonsPanel,bpy.types.Panel): import_no = 0 coat = bpy.coat3D coat3D = bpy.context.scene.coat3D + Blender_export = "" if(bpy.context.scene.objects.active): coa = bpy.context.scene.objects.active.coat3D @@ -282,7 +283,6 @@ class SCENE_OT_import(bpy.types.Operator): act_first = bpy.context.scene.objects.active for act_name in test: if act_name.type == 'MESH' and os.path.isfile(act_name.coat3D.objectdir): - print('eihan tanne voi tulla') activeobj = act_name.name mat_list = [] scene.objects[activeobj].select = True @@ -430,7 +430,6 @@ class SCENE_OT_import3b(bpy.types.Operator): path3b_file.close() os.remove(path3b_now) else: - print("ei toimi") path_on = 0 for palikka in bpy.context.scene.objects: @@ -562,7 +561,7 @@ class VIEW3D_MT_Coat_Dynamic_Menu(bpy.types.Menu): layout.menu("VIEW3D_MT_ExportMenu") layout.separator() - layout.operator("import_applink.pilgway_3d_deltex",text="Delete Textures") + layout.menu("VIEW3D_MT_ExtraMenu") layout.separator() if(len(bpy.context.selected_objects) == 1): @@ -602,6 +601,18 @@ class VIEW3D_MT_ExportMenu(bpy.types.Menu): layout.prop(coat3D,"exportfile") layout.prop(coat3D,"export_pos") +class VIEW3D_MT_ExtraMenu(bpy.types.Menu): + bl_label = "Extra" + + def draw(self, context): + layout = self.layout + coat3D = bpy.context.scene.coat3D + settings = context.tool_settings + layout.operator_context = 'INVOKE_REGION_WIN' + + layout.operator("import_applink.pilgway_3d_deltex",text="Delete all Textures") + layout.separator() + def register(): bpy.utils.register_module(__name__) diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py index 92e5dc72..d4156e5d 100644 --- a/io_coat3D/tex.py +++ b/io_coat3D/tex.py @@ -164,7 +164,7 @@ def gettex(mat_list, objekti, scene,export): bpy.ops.image.new(name=name_tex) bpy.data.images[name_tex].filepath = texcoat['color'][0] bpy.data.images[name_tex].source = 'FILE' - print('name_tex: %s'%name_tex) + bpy.data.textures.new(name_tex,type='IMAGE') @@ -179,10 +179,8 @@ def gettex(mat_list, objekti, scene,export): elif(useold != ''): - print('useold:%s'%useold) - + objekti.active_material.texture_slots[index].texture = useold - print(objekti.active_material) objekti.active_material.texture_slots[index].texture.image.filepath = texcoat['color'][0] if(objekti.data.uv_textures.active): objekti.active_material.texture_slots[index].texture_coords = 'UV' |