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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/DirectXExporter.py6
-rw-r--r--release/scripts/ac3d_export.py4
-rw-r--r--release/scripts/ac3d_import.py2
-rw-r--r--release/scripts/blender2cal3d.py2
-rw-r--r--release/scripts/bvh_export.py6
-rw-r--r--release/scripts/bvh_import.py6
-rw-r--r--release/scripts/lightwave_export.py6
-rw-r--r--release/scripts/lightwave_import.py6
-rw-r--r--release/scripts/nendo_export.py4
-rw-r--r--release/scripts/nendo_import.py6
-rw-r--r--release/scripts/obj_export.py4
-rw-r--r--release/scripts/obj_import.py4
-rw-r--r--release/scripts/off_export.py4
-rw-r--r--release/scripts/off_import.py4
-rw-r--r--release/scripts/radiosity_export.py6
-rw-r--r--release/scripts/radiosity_import.py6
-rw-r--r--release/scripts/raw_export.py6
-rw-r--r--release/scripts/raw_import.py6
-rw-r--r--release/scripts/slp_import.py6
-rw-r--r--release/scripts/truespace_export.py6
-rw-r--r--release/scripts/truespace_import.py6
-rw-r--r--release/scripts/videoscape_export.py6
-rw-r--r--release/scripts/wings_export.py6
-rw-r--r--release/scripts/wings_import.py6
-rw-r--r--release/scripts/wrl2export.py8
-rw-r--r--source/blender/src/header_info.c106
26 files changed, 122 insertions, 116 deletions
diff --git a/release/scripts/DirectXExporter.py b/release/scripts/DirectXExporter.py
index 60f802e538b..f6f2bbd8bf6 100644
--- a/release/scripts/DirectXExporter.py
+++ b/release/scripts/DirectXExporter.py
@@ -1,11 +1,11 @@
#!BPY
""" Registration info for Blender menus:
-Name: 'DirectX'
+Name: 'DirectX (.X)...'
Blender: 232
Group: 'Export'
-Submenu: 'Only mesh data...' mesh
-Submenu: 'Animation(not armature yet)...' anim
+Submenu: 'Only Mesh Data...' mesh
+Submenu: 'Animation (not armature yet)...' anim
Tip: 'Export to DirectX text file format format.'
"""
# $Id$
diff --git a/release/scripts/ac3d_export.py b/release/scripts/ac3d_export.py
index 9e45d8ab109..d5b25486937 100644
--- a/release/scripts/ac3d_export.py
+++ b/release/scripts/ac3d_export.py
@@ -1,7 +1,7 @@
#!BPY
""" Registration info for Blender menus:
-Name: 'AC3D'
+Name: 'AC3D (.ac)...'
Blender: 232
Group: 'Export'
Submenu: 'All meshes...' all
@@ -420,4 +420,4 @@ def fs_callback(filename):
if __script__['arg'] == 'config':
Draw.Register(gui, event, b_event)
else:
- Blender.Window.FileSelector(fs_callback, "AC3D Export")
+ Blender.Window.FileSelector(fs_callback, "Export AC3D")
diff --git a/release/scripts/ac3d_import.py b/release/scripts/ac3d_import.py
index 2cc8f6ad08a..16792f819bd 100644
--- a/release/scripts/ac3d_import.py
+++ b/release/scripts/ac3d_import.py
@@ -1,7 +1,7 @@
#!BPY
""" Registration info for Blender menus:
-Name: 'AC3D...'
+Name: 'AC3D (.ac)...'
Blender: 232
Group: 'Import'
Tip: 'Import an AC3D (.ac) file.'
diff --git a/release/scripts/blender2cal3d.py b/release/scripts/blender2cal3d.py
index 7e81529d26b..a6c04d8cb54 100644
--- a/release/scripts/blender2cal3d.py
+++ b/release/scripts/blender2cal3d.py
@@ -1,7 +1,7 @@
#!BPY
"""
-Name: 'Cal3D v0.5'
+Name: 'Cal3D v0.5...'
Blender: 232
Group: 'Export'
Tip: 'Export armature/bone data to the Cal3D library.'
diff --git a/release/scripts/bvh_export.py b/release/scripts/bvh_export.py
index 9309b76c476..a2370ed66a6 100644
--- a/release/scripts/bvh_export.py
+++ b/release/scripts/bvh_export.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Motion Capture (*.bvh)'
+Name: 'Motion Capture (.bvh)...'
Blender: 232
Group: 'Export'
-Tip: 'Export a (*.bvh) motion capture file'
+Tip: 'Export a (.bvh) motion capture file'
"""
# $Id$
@@ -386,4 +386,4 @@ def saveBVH(filename):
file.close()
print 'done'
-Blender.Window.FileSelector(saveBVH, 'SELECT NEW BVH FILE')
+Blender.Window.FileSelector(saveBVH, 'Export BVH')
diff --git a/release/scripts/bvh_import.py b/release/scripts/bvh_import.py
index cde0e0dfde8..9c6255633bb 100644
--- a/release/scripts/bvh_import.py
+++ b/release/scripts/bvh_import.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Motion Capture (*.bvh)'
+Name: 'Motion Capture (.bvh)...'
Blender: 232
Group: 'Import'
-Tip: 'Import a (*.bvh) motion capture file'
+Tip: 'Import a (.bvh) motion capture file'
"""
# $Id$
@@ -441,4 +441,4 @@ def loadBVH(filename):
# Main file loop
lineIdx += 1
-Blender.Window.FileSelector(loadBVH)
+Blender.Window.FileSelector(loadBVH, "Import BVH")
diff --git a/release/scripts/lightwave_export.py b/release/scripts/lightwave_export.py
index 56e137cc380..3fcb759062d 100644
--- a/release/scripts/lightwave_export.py
+++ b/release/scripts/lightwave_export.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'LightWave...'
+Name: 'LightWave (.lwo)...'
Blender: 232
Group: 'Export'
-Tooltip: 'Export selected meshes to LightWave File Format (*.lwo)'
+Tooltip: 'Export selected meshes to LightWave File Format (.lwo)'
"""
# $Id$
@@ -527,4 +527,4 @@ def fs_callback(filename):
if filename.find('.lwo', -4) <= 0: filename += '.lwo'
write(filename)
-Blender.Window.FileSelector(fs_callback, "LWO Export")
+Blender.Window.FileSelector(fs_callback, "Export LWO")
diff --git a/release/scripts/lightwave_import.py b/release/scripts/lightwave_import.py
index 583e57191e6..6b8cee36370 100644
--- a/release/scripts/lightwave_import.py
+++ b/release/scripts/lightwave_import.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'LightWave...'
+Name: 'LightWave (.lwo)...'
Blender: 232
Group: 'Import'
-Tooltip: 'Import LightWave Object File Format (*.lwo)'
+Tooltip: 'Import LightWave Object File Format (.lwo)'
"""
# $Id$
@@ -171,4 +171,4 @@ def read_faces_6(lwochunk):
def fs_callback(filename):
read(filename)
-Blender.Window.FileSelector(fs_callback, "LWO Import")
+Blender.Window.FileSelector(fs_callback, "Import LWO")
diff --git a/release/scripts/nendo_export.py b/release/scripts/nendo_export.py
index 5fd6db87d53..80ce4f96c5d 100644
--- a/release/scripts/nendo_export.py
+++ b/release/scripts/nendo_export.py
@@ -1,7 +1,7 @@
#!BPY
"""
-Name: 'Nendo...'
+Name: 'Nendo (.ndo)...'
Blender: 232
Group: 'Export'
Tooltip: 'Export selected mesh to Nendo File Format (*.ndo)'
@@ -182,4 +182,4 @@ def fs_callback(filename):
if filename.find('.ndo', -4) <= 0: filename += '.ndo'
write(filename)
-Blender.Window.FileSelector(fs_callback, "Nendo Export")
+Blender.Window.FileSelector(fs_callback, "Export Nendo")
diff --git a/release/scripts/nendo_import.py b/release/scripts/nendo_import.py
index 3d42f4bfc51..d65bd20376a 100644
--- a/release/scripts/nendo_import.py
+++ b/release/scripts/nendo_import.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Nendo...'
+Name: 'Nendo (.ndo)...'
Blender: 232
Group: 'Import'
-Tooltip: 'Import Nendo Object File Format (*.ndo)'
+Tooltip: 'Import Nendo Object File Format (.ndo)'
"""
# $Id$
@@ -204,4 +204,4 @@ def make_faces(edge_table): # For Nendo
def fs_callback(filename):
read(filename)
-Blender.Window.FileSelector(fs_callback, "Nendo Import")
+Blender.Window.FileSelector(fs_callback, "Import Nendo")
diff --git a/release/scripts/obj_export.py b/release/scripts/obj_export.py
index ccbed6feae3..333f54fe59f 100644
--- a/release/scripts/obj_export.py
+++ b/release/scripts/obj_export.py
@@ -1,7 +1,7 @@
#!BPY
"""
-Name: 'Wavefront (*.obj)'
+Name: 'Wavefront (.obj)...'
Blender: 232
Group: 'Export'
Tooltip: 'Save a Wavefront OBJ File'
@@ -144,4 +144,4 @@ def save_obj(filename):
file.close()
-Window.FileSelector(save_obj, 'SELECT OBJ FILE')
+Window.FileSelector(save_obj, 'Export OBJ')
diff --git a/release/scripts/obj_import.py b/release/scripts/obj_import.py
index 364fbc590be..412a5d285a9 100644
--- a/release/scripts/obj_import.py
+++ b/release/scripts/obj_import.py
@@ -1,7 +1,7 @@
#!BPY
"""
-Name: 'Wavefront (*.obj)'
+Name: 'Wavefront (.obj)...'
Blender: 232
Group: 'Import'
Tooltip: 'Load a Wavefront OBJ File'
@@ -244,4 +244,4 @@ def load_obj(file):
if len(mesh.verts) > 0:
NMesh.PutRaw(mesh, fileName + '_' + objectName)
-Window.FileSelector(load_obj, 'SELECT OBJ FILE')
+Window.FileSelector(load_obj, 'Import OBJ')
diff --git a/release/scripts/off_export.py b/release/scripts/off_export.py
index de843561e4c..d5f6e943ece 100644
--- a/release/scripts/off_export.py
+++ b/release/scripts/off_export.py
@@ -1,7 +1,7 @@
#!BPY
"""
-Name: 'OFF...'
+Name: 'Object File Format (.off)...'
Blender: 232
Group: 'Export'
Tooltip: 'Export selected mesh to Object File Format (*.off)'
@@ -68,4 +68,4 @@ def fs_callback(filename):
if filename.find('.off', -4) <= 0: filename += '.off'
write(filename)
-Blender.Window.FileSelector(fs_callback, "OFF Export")
+Blender.Window.FileSelector(fs_callback, "Export OFF")
diff --git a/release/scripts/off_import.py b/release/scripts/off_import.py
index 44c5bf6ff05..3d5f996a472 100644
--- a/release/scripts/off_import.py
+++ b/release/scripts/off_import.py
@@ -1,7 +1,7 @@
#!BPY
"""
-Name: 'OFF...'
+Name: 'Object File Format (.off)...'
Blender: 232
Group: 'Import'
Tooltip: 'Import Object File Format (*.off)'
@@ -71,4 +71,4 @@ def read(filename):
def fs_callback(filename):
read(filename)
-Blender.Window.FileSelector(fs_callback, "OFF Import")
+Blender.Window.FileSelector(fs_callback, "Import OFF")
diff --git a/release/scripts/radiosity_export.py b/release/scripts/radiosity_export.py
index 85b8ae8e598..48b315eaf63 100644
--- a/release/scripts/radiosity_export.py
+++ b/release/scripts/radiosity_export.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Radiosity...'
+Name: 'Radiosity (.radio)...'
Blender: 232
Group: 'Export'
-Tooltip: 'Export selected mesh (with vertex colors) to Radiosity File Format (*.radio)'
+Tooltip: 'Export selected mesh (with vertex colors) to Radiosity File Format (.radio)'
"""
# $Id$
@@ -90,4 +90,4 @@ def fs_callback(filename):
if filename.find('.radio', -6) <= 0: filename += '.radio'
write(filename)
-Blender.Window.FileSelector(fs_callback, "Radio Export")
+Blender.Window.FileSelector(fs_callback, "Export Radio")
diff --git a/release/scripts/radiosity_import.py b/release/scripts/radiosity_import.py
index 8aeb66fd7d0..7a848b45ca6 100644
--- a/release/scripts/radiosity_import.py
+++ b/release/scripts/radiosity_import.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Radiosity...'
+Name: 'Radiosity (.radio)...'
Blender: 232
Group: 'Import'
-Tooltip: 'Import Radiosity File Format (*.radio) with vertex colors'
+Tooltip: 'Import Radiosity File Format (.radio) with vertex colors'
"""
# $Id$
@@ -93,4 +93,4 @@ def read(filename):
def fs_callback(filename):
read(filename)
-Blender.Window.FileSelector(fs_callback, "Radio Import")
+Blender.Window.FileSelector(fs_callback, "Import Radio")
diff --git a/release/scripts/raw_export.py b/release/scripts/raw_export.py
index 4493a6bc463..a5d42ef5794 100644
--- a/release/scripts/raw_export.py
+++ b/release/scripts/raw_export.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Raw Triangle...'
+Name: 'Raw Triangle (.raw)...'
Blender: 232
Group: 'Export'
-Tooltip: 'Export selected mesh to Raw Triangle Format (*.raw)'
+Tooltip: 'Export selected mesh to Raw Triangle Format (.raw)'
"""
# $Id$
@@ -65,4 +65,4 @@ def fs_callback(filename):
if filename.find('.raw', -4) <= 0: filename += '.raw'
write(filename)
-Blender.Window.FileSelector(fs_callback, "Raw Export")
+Blender.Window.FileSelector(fs_callback, "Export Raw")
diff --git a/release/scripts/raw_import.py b/release/scripts/raw_import.py
index a195a5dfa30..cc6cdc12480 100644
--- a/release/scripts/raw_import.py
+++ b/release/scripts/raw_import.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Raw Triangle...'
+Name: 'Raw Triangle (.raw)...'
Blender: 232
Group: 'Import'
-Tooltip: 'Import Raw Triangle File Format (*.raw)'
+Tooltip: 'Import Raw Triangle File Format (.raw)'
"""
# $Id$
@@ -66,4 +66,4 @@ def read(filename):
def fs_callback(filename):
read(filename)
-Blender.Window.FileSelector(fs_callback, "Raw Import")
+Blender.Window.FileSelector(fs_callback, "Import Raw")
diff --git a/release/scripts/slp_import.py b/release/scripts/slp_import.py
index acd3531f118..ed81a5d0e4b 100644
--- a/release/scripts/slp_import.py
+++ b/release/scripts/slp_import.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'SLP (Pro Engineer)...'
+Name: 'Pro Engineer (.slp)...'
Blender: 232
Group: 'Import'
-Tooltip: 'Import SLP (Pro Engineer) File Format (*.raw)'
+Tooltip: 'Import Pro Engineer (.slp) File Format'
"""
# $Id$
@@ -75,4 +75,4 @@ def read(filename):
def fs_callback(filename):
read(filename)
-Blender.Window.FileSelector(fs_callback, "SLP Import")
+Blender.Window.FileSelector(fs_callback, "Import SLP")
diff --git a/release/scripts/truespace_export.py b/release/scripts/truespace_export.py
index f50e00f6d8a..ad2a6bcd1d5 100644
--- a/release/scripts/truespace_export.py
+++ b/release/scripts/truespace_export.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'TrueSpace...'
+Name: 'TrueSpace (.cob)...'
Blender: 232
Group: 'Export'
-Tooltip: 'Export selected meshes to trueSpace File Format (*.cob)'
+Tooltip: 'Export selected meshes to TrueSpace File Format (.cob)'
"""
# $Id$
@@ -247,7 +247,7 @@ def fs_callback(filename):
if filename.find('.cob', -4) <= 0: filename += '.cob'
write(filename)
-Blender.Window.FileSelector(fs_callback, "COB Export")
+Blender.Window.FileSelector(fs_callback, "Export COB")
# === Matrix Differences between Blender & trueSpace ===
#
diff --git a/release/scripts/truespace_import.py b/release/scripts/truespace_import.py
index 7898fa40fa7..3ec917773b0 100644
--- a/release/scripts/truespace_import.py
+++ b/release/scripts/truespace_import.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'TrueSpace...'
+Name: 'TrueSpace (.cob)...'
Blender: 232
Group: 'Import'
-Tooltip: 'Import trueSpace Object File Format (*.cob)'
+Tooltip: 'Import TrueSpace Object File Format (.cob)'
"""
# $Id$
@@ -211,7 +211,7 @@ def read(filename):
def fs_callback(filename):
read(filename)
-Blender.Window.FileSelector(fs_callback, "COB Import")
+Blender.Window.FileSelector(fs_callback, "Import COB")
# === Matrix Differences between Blender & trueSpace ===
#
diff --git a/release/scripts/videoscape_export.py b/release/scripts/videoscape_export.py
index a647012d104..239f75faa9b 100644
--- a/release/scripts/videoscape_export.py
+++ b/release/scripts/videoscape_export.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Videoscape (with Vertex Colors)...'
+Name: 'VideoScape with Vertex Colors (.obj)...'
Blender: 232
Group: 'Export'
-Tooltip: 'Export selected mesh to VideoScape File Format (*.obj)'
+Tooltip: 'Export selected mesh to VideoScape File Format (.obj)'
"""
# $Id$
@@ -179,7 +179,7 @@ def fs_callback(filename):
if filename.find('.obj', -4) <= 0: filename += '.VIDEOSCAPE.obj'
write(filename)
-Blender.Window.FileSelector(fs_callback, "Videoscape Export")
+Blender.Window.FileSelector(fs_callback, "Export VideoScape")
# filename = "VIDEOSCAPE_" + objname + ".obj"
diff --git a/release/scripts/wings_export.py b/release/scripts/wings_export.py
index df36aec4c9f..3ad3f33b327 100644
--- a/release/scripts/wings_export.py
+++ b/release/scripts/wings_export.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Wings3D...'
+Name: 'Wings3D (.wings)...'
Blender: 232
Group: 'Export'
-Tooltip: 'Export selected mesh to Wings3D File Format (*.wings)'
+Tooltip: 'Export selected mesh to Wings3D File Format (.wings)'
"""
# $Id$
@@ -343,4 +343,4 @@ def fs_callback(filename):
if Blender.Object.GetSelected()[0].getType() != "Mesh":
Blender.Draw.PupMenu("Wings Export error|Selected object is not a mesh!")
else:
- Blender.Window.FileSelector(fs_callback, "Wings3D Export")
+ Blender.Window.FileSelector(fs_callback, "Export Wings3D")
diff --git a/release/scripts/wings_import.py b/release/scripts/wings_import.py
index b2e77ab0d16..432bb43b088 100644
--- a/release/scripts/wings_import.py
+++ b/release/scripts/wings_import.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Wings3D...'
+Name: 'Wings3D (.wings)...'
Blender: 232
Group: 'Import'
-Tooltip: 'Import Wings3D File Format (*.wings)'
+Tooltip: 'Import Wings3D File Format (.wings)'
"""
# $Id$
@@ -287,4 +287,4 @@ def read(filename):
def fs_callback(filename):
read(filename)
-Blender.Window.FileSelector(fs_callback, "Wings3D Import")
+Blender.Window.FileSelector(fs_callback, "Import Wings3D")
diff --git a/release/scripts/wrl2export.py b/release/scripts/wrl2export.py
index 2394a640395..5ab2e3be85b 100644
--- a/release/scripts/wrl2export.py
+++ b/release/scripts/wrl2export.py
@@ -1,10 +1,10 @@
#!BPY
""" Registration info for Blender menus:
-Name: 'VRML 2.0'
+Name: 'VRML 2.0 (.wrl)...'
Blender: 232
Group: 'Export'
-Submenu: 'All objects...' all
-Submenu: 'Only selected objects...' selected
+Submenu: 'All Objects...' all
+Submenu: 'Selected Objects...' selected
Tooltip: 'Export to VRML2 (.wrl) file.'
"""
@@ -969,7 +969,7 @@ if Blender.Get('version') < 225:
print " download a newer version from http://blender.org/"
else:
if ARG == 'all' or ARG == 'selected':
- Blender.Window.FileSelector(file_callback,"Save VRML 2.0")
+ Blender.Window.FileSelector(file_callback,"Export VRML 2.0")
else:
baseFileName=Blender.Get('filename')
if baseFileName.find('.') != -1:
diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c
index 6566c191291..2191f9ec933 100644
--- a/source/blender/src/header_info.c
+++ b/source/blender/src/header_info.c
@@ -201,7 +201,7 @@ void write_videoscape_fs()
}
else {
if(videosc_dir[0]==0) strcpy(videosc_dir, G.sce);
- activate_fileselect(FILE_SPECIAL, "Save Videoscape", videosc_dir,
+ activate_fileselect(FILE_SPECIAL, "Export Videoscape", videosc_dir,
write_videoscape);
}
}
@@ -214,7 +214,7 @@ void write_vrml_fs()
else {
if(videosc_dir[0]==0) strcpy(videosc_dir, G.sce);
- activate_fileselect(FILE_SPECIAL, "Save VRML 1", videosc_dir, write_vrml);
+ activate_fileselect(FILE_SPECIAL, "Export VRML 1.0", videosc_dir, write_vrml);
}
}
@@ -227,7 +227,7 @@ void write_dxf_fs()
if(videosc_dir[0]==0) strcpy(videosc_dir, G.sce);
- activate_fileselect(FILE_SPECIAL, "Save DXF", videosc_dir, write_dxf);
+ activate_fileselect(FILE_SPECIAL, "Export DXF", videosc_dir, write_dxf);
}
}
@@ -240,7 +240,7 @@ void write_stl_fs()
if(videosc_dir[0]==0) strcpy(videosc_dir, G.sce);
- activate_fileselect(FILE_SPECIAL, "SAVE STL", videosc_dir, write_stl);
+ activate_fileselect(FILE_SPECIAL, "Export STL", videosc_dir, write_stl);
}
}
/* ------------ */
@@ -673,8 +673,33 @@ static uiBlock *info_runtime_optionsmenu(void *arg_unused)
static void do_info_file_importmenu(void *arg, int event)
{
extern int BPY_menu_do_python(short menutype, int event); // BPY_interface.c
+ ScrArea *sa;
+
+ if(curarea->spacetype==SPACE_INFO) {
+ sa= find_biggest_area_of_type(SPACE_SCRIPT);
+ if (!sa) sa= closest_bigger_area();
+ areawinset(sa->win);
+ }
- BPY_menu_do_python(PYMENU_IMPORT, event);
+ /* events >=4 are registered bpython scripts */
+ if (event >= 4) BPY_menu_do_python(PYMENU_IMPORT, event - 4);
+
+ else switch(event) {
+
+ case 0: /* DXF */
+ activate_fileselect(FILE_BLENDER, "Import DXF", G.sce, BIF_read_file);
+ break;
+ case 1: /* VRML 1.0 */
+ activate_fileselect(FILE_BLENDER, "Import VRML 1.0", G.sce, BIF_read_file);
+ break;
+ case 2: /* VideoScape */
+ activate_fileselect(FILE_BLENDER, "Import VideoScape", G.sce, BIF_read_file);
+ break;
+ case 3: /* STL */
+ activate_fileselect(FILE_BLENDER, "Import STL", G.sce, BIF_read_file);
+ break;
+
+ }
allqueue(REDRAWINFO, 0);
}
@@ -689,9 +714,20 @@ static uiBlock *info_file_importmenu(void *arg_unused)
block= uiNewBlock(&curarea->uiblocks, "importmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
uiBlockSetButmFunc(block, do_info_file_importmenu, NULL);
//uiBlockSetXOfs(block, -50); // offset to parent button
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "VRML 1.0...|Ctrl F2",
+ 0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "DXF...|Shift F2",
+ 0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "VideoScape...|Alt W",
+ 0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "STL...",
+ 0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 3, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
for (pym = BPyMenuTable[PYMENU_IMPORT]; pym; pym = pym->next, i++) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, pym->name, 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, i, pym->tooltip?pym->tooltip:pym->filename);
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, pym->name, 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, i+4, pym->tooltip?pym->tooltip:pym->filename);
}
uiBlockSetDirection(block, UI_RIGHT);
@@ -703,11 +739,16 @@ static uiBlock *info_file_importmenu(void *arg_unused)
static void do_info_file_exportmenu(void *arg, int event)
{
extern int BPY_menu_do_python(short menutype, int event); // BPY_interface.c
+ ScrArea *sa;
- /* events >=3 are registered bpython scripts */
- if (event >= 3) BPY_menu_do_python(PYMENU_EXPORT, event - 3);
+ if(curarea->spacetype==SPACE_INFO) {
+ sa= find_biggest_area_of_type(SPACE_SCRIPT);
+ if (!sa) sa= closest_bigger_area();
+ areawinset(sa->win);
+ }
- /* these are no defines, easier this way, the codes are in the function below */
+ /* events >=4 are registered bpython scripts */
+ if (event >= 4) BPY_menu_do_python(PYMENU_EXPORT, event - 4);
else switch(event) {
@@ -720,6 +761,9 @@ static void do_info_file_exportmenu(void *arg, int event)
case 2:
write_videoscape_fs();
break;
+ case 3:
+ write_stl_fs();
+ break;
}
allqueue(REDRAWINFO, 0);
}
@@ -741,13 +785,15 @@ static uiBlock *info_file_exportmenu(void *arg_unused)
0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 1, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Videoscape...|Alt W",
0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "STL...",
+ 0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 3, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
/* note that we acount for the 3 previous entries with i+3: */
for (pym = BPyMenuTable[PYMENU_EXPORT]; pym; pym = pym->next, i++) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, pym->name, 0, yco-=20, menuwidth, 19,
- NULL, 0.0, 0.0, 1, i+3,
+ NULL, 0.0, 0.0, 1, i+4,
pym->tooltip?pym->tooltip:pym->filename);
}
@@ -758,45 +804,6 @@ static uiBlock *info_file_exportmenu(void *arg_unused)
return block;
}
-static void do_info_file_exportselmenu(void *arg, int event)
-{
- ScrArea *sa;
-
- if(curarea->spacetype==SPACE_INFO) {
- sa= closest_bigger_area();
- areawinset(sa->win);
- }
-
- /* these are no defines, easier this way (yeah right!),
- the codes are in the function below */
- switch(event) {
-
- case 0:
- write_stl_fs();
- break;
- }
- allqueue(REDRAWINFO, 0);
-}
-
-static uiBlock *info_file_exportselmenu(void *arg_unused)
-{
- uiBlock *block;
- short yco = 20;
-
- block= uiNewBlock(&curarea->uiblocks, "exportselectedmenu", UI_EMBOSSP,
- UI_HELV, G.curscreen->mainwin);
- uiBlockSetButmFunc(block, do_info_file_exportselmenu, NULL);
- //uiBlockSetXOfs(block, -50); // offset to parent button
-
- uiDefBut(block, BUTM, 1, "STL...",
- 0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 0, "");
-
- uiBlockSetDirection(block, UI_RIGHT);
- uiTextBoundsBlock(block, 60);
-
- return block;
-}
-
static void do_info_filemenu(void *arg, int event)
{
ScrArea *sa;
@@ -920,7 +927,6 @@ static uiBlock *info_filemenu(void *arg_unused)
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append...|Shift F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
uiDefIconTextBlockBut(block, info_file_importmenu, NULL, ICON_RIGHTARROW_THIN, "Import", 0, yco-=20, menuwidth, 19, "");
uiDefIconTextBlockBut(block, info_file_exportmenu, NULL, ICON_RIGHTARROW_THIN, "Export", 0, yco-=20, menuwidth, 19, "");
- uiDefIconTextBlockBut(block, info_file_exportselmenu, NULL, ICON_RIGHTARROW_THIN, "Export Selected", 0, yco-=20, menuwidth, 19, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");