Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle-Samuli Riihikoski <haikalle@gmail.com>2011-06-09 02:14:16 +0400
committerKalle-Samuli Riihikoski <haikalle@gmail.com>2011-06-09 02:14:16 +0400
commit8b9e2e0fd06d74fe44c613aa8f4976a1837f68c4 (patch)
treec0c37e4bb9bbd8530fdabe6db87703436ca0718a /io_coat3D
parent40786f0993267c22685bb4aad8c0e2c321e85086 (diff)
-complete applink dynamic menu.
-fixed the bug when two or more objects dosen't have materials.
Diffstat (limited to 'io_coat3D')
-rw-r--r--io_coat3D/coat.py41
-rw-r--r--io_coat3D/tex.py2
2 files changed, 39 insertions, 4 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__)
diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py
index 3d2c9d51..92e5dc72 100644
--- a/io_coat3D/tex.py
+++ b/io_coat3D/tex.py
@@ -68,7 +68,7 @@ def gettex(mat_list, objekti, scene,export):
if tex_slot.texture.image is not None:
tex_slot.texture.image.reload()
else:
- coa = bpy.context.scene.objects.active.coat3D
+ coa = objekti.coat3D
nimi = objname(coa.objectdir)
if(coa.texturefolder):
osoite = os.path.dirname(coa.texturefolder) + os.sep