diff options
author | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2011-06-09 02:14:16 +0400 |
---|---|---|
committer | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2011-06-09 02:14:16 +0400 |
commit | 8b9e2e0fd06d74fe44c613aa8f4976a1837f68c4 (patch) | |
tree | c0c37e4bb9bbd8530fdabe6db87703436ca0718a /io_coat3D/coat.py | |
parent | 40786f0993267c22685bb4aad8c0e2c321e85086 (diff) |
-complete applink dynamic menu.
-fixed the bug when two or more objects dosen't have materials.
Diffstat (limited to 'io_coat3D/coat.py')
-rw-r--r-- | io_coat3D/coat.py | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/io_coat3D/coat.py b/io_coat3D/coat.py index 4744611e..0f3706ca 100644 --- a/io_coat3D/coat.py +++ b/io_coat3D/coat.py @@ -294,13 +294,14 @@ 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 objekti = scene.objects[activeobj] coat3D.loca = objekti.location coat3D.rota = objekti.rotation_euler - coa = bpy.context.scene.objects.active.coat3D + coa = act_name.coat3D exportfile = coat3D.exchangedir path3b_n = coat3D.exchangedir @@ -550,18 +551,52 @@ class VIEW3D_MT_Coat_Dynamic_Menu(bpy.types.Menu): ob = context if ob.mode == 'OBJECT': - - + layout.operator("import_applink.pilgway_3d_coat", text="Import") layout.separator() layout.operator("export_applink.pilgway_3d_coat", text="Export") layout.separator() + layout.menu("VIEW3D_MT_ImportMenu") + layout.separator() + + layout.menu("VIEW3D_MT_ExportMenu") + layout.separator() + layout.operator("import_applink.pilgway_3d_deltex",text="Delete Textures") layout.separator() + + layout.separator() + + +class VIEW3D_MT_ImportMenu(bpy.types.Menu): + bl_label = "Import Settings" + def draw(self, context): + layout = self.layout + coat3D = bpy.context.scene.coat3D + settings = context.tool_settings + layout.operator_context = 'INVOKE_REGION_WIN' + layout.prop(coat3D,"importmesh") + layout.prop(coat3D,"importmod") + layout.prop(coat3D,"smooth_on") + layout.prop(coat3D,"importtextures") + +class VIEW3D_MT_ExportMenu(bpy.types.Menu): + bl_label = "Export Settings" + + def draw(self, context): + layout = self.layout + coat3D = bpy.context.scene.coat3D + settings = context.tool_settings + layout.operator_context = 'INVOKE_REGION_WIN' + layout.prop(coat3D,"exportover") + if(coat3D.exportover): + layout.prop(coat3D,"exportmod") + layout.prop(coat3D,"exportfile") + layout.prop(coat3D,"export_pos") def register(): bpy.utils.register_module(__name__) |