diff --git a/release/scripts/Axiscopy.py b/release/scripts/Axiscopy.py index dbed4300b9c..a66e4904b6b 100644 --- a/release/scripts/Axiscopy.py +++ b/release/scripts/Axiscopy.py @@ -103,7 +103,6 @@ def main(): Draw.PupMenu("Error%t|Meshes must be single user") return - # remove linked if len(obs) < 1: Draw.PupMenu("Error: you must select at least 2 objects") return diff --git a/release/scripts/export_obj.py b/release/scripts/export_obj.py index bdc782b05b6..89501798c06 100644 --- a/release/scripts/export_obj.py +++ b/release/scripts/export_obj.py @@ -171,7 +171,11 @@ def copy_images(dest_dir): # Get MTex images if matname != None: mat= Material.Get(matname) - for mtex in mat.getTextures(): + for mtex in mat.getTex* The ambient and emit data we can retrieve from Blender are single values, that this script copies to an RGB triplet, giving shades of gray. A config option can be set to export RGB mirror color as either or both. +* In AC3D 4 "compatibility mode": +** Shininess of materials is taken from the shader specularity value in Blender, mapped from [0.0, 2.0] to [0, 128]. +** Crease angle is exported, but in Blender it is limited to [1, 80], since there are other more powerful ways to control surface smoothing. In AC3D 4.0 crease's range is [0.0, 180.0]. +* Blender groups are not supported yet.tures(): if mtex and mtex.tex.type == Blender.Texture.Types.IMAGE: try: uniqueImages[mtex.tex.image.name] = None @@ -526,7 +530,7 @@ def write_ui(filename): pup_block = [\ ('Context...'),\ ('Selection Only', EXPORT_SEL_ONLY, 'Only export objects in visible selection. Else export whole scene.'),\ - ('All Scenes', EXPORT_ALL_SCENES, 'Each scene as a seperate OBJ file.'),\ + ('All Scenes', EXPORT_ALL_SCENES, 'Each scene as a separate OBJ file.'),\ ('Animation', EXPORT_ANIMATION, 'Each frame as a numbered OBJ file.'),\ ('Object Prefs...'),\ ('Apply Modifiers', EXPORT_APPLY_MODIFIERS, 'Use transformed mesh data from each object. May break vert order for morph targets.'),\ diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c index 8707d424216..65566f887f3 100644 --- a/source/blender/src/editmesh_mods.c +++ b/source/blender/src/editmesh_mods.c @@ -1205,26 +1205,47 @@ int vertgroup_select(short mode) handles face/edge vert context and facegroup_select/edgegroup_select/vertgroup_select do all the work */ + void select_mesh_group_menu() { short ret; - int selcount; + int selcount, first_item=1; + char str[512] = "Select Grouped%t"; /* total max length is 392 at the moment */ + + if(G.scene->selectmode & SCE_SELECT_VERTEX) { + first_item=0; + strcat(str, "|Verts...| Similar Normal %x1| Same Face Users %x2| Shared Vertex Groups%x3"); + } + + if(G.scene->selectmode & SCE_SELECT_EDGE) { + if (!first_item) strcat(str, "|%l"); + else first_item=1; + + strcat(str, "|Edges...| Similar Length %x10| Similar Direction %x20| Same Face Users%x30| Similar Face Angle%x40| Similar Crease%x50"); + } if(G.scene->selectmode & SCE_SELECT_FACE) { - ret= pupmenu("Select Grouped Faces %t|Same Material %x1|Same Image %x2|Similar Area %x3|Similar Perimeter %x4|Similar Normal %x5|Similar Co-Planer %x6"); - if (ret<1) return; - selcount= facegroup_select(ret); - + if (!first_item) strcat(str, "|%l"); + strcat(str, "|Faces...| Same Material %x100| Same Image %x200| Similar Area %x300| Similar Perimeter %x400| Similar Normal %x500| Similar Co-Planer %x600"); + + } + + ret= pupmenu(str); + if (ret<1) return; + + if (ret<10) { + selcount= vertgroup_select(ret); if (selcount) { /* update if data was selected */ - G.totfacesel+=selcount; + EM_select_flush(); /* so that selected verts, go onto select faces */ + G.totvertsel += selcount; allqueue(REDRAWVIEW3D, 0); - BIF_undo_push("Select Grouped Faces"); + BIF_undo_push("Select Grouped Verts"); } - - } else if(G.scene->selectmode & SCE_SELECT_EDGE) { - ret= pupmenu("Select Grouped Edges%t|Similar Length %x1|Similar Direction %x2|Same Face Users%x3|Similar Adjacent Face Angle%x4|Similar Crease%x5"); - if (ret<1) return; - selcount= edgegroup_select(ret); + return; + } + + if (ret<100) { + selcount= edgegroup_select(ret/10); if (selcount) { /* update if data was selected */ /*EM_select_flush();*/ /* dont use because it can end up selecting more edges and is not usefull*/ @@ -1232,20 +1253,18 @@ void select_mesh_group_menu() allqueue(REDRAWVIEW3D, 0); BIF_undo_push("Select Grouped Edges"); } - - } else if(G.scene->selectmode & SCE_SELECT_VERTEX) { - ret= pupmenu("Select Grouped Verts%t|Similar Normal %x1|Same Face Users %x2|Shared Vertex Groups%x3"); - if (ret<1) return; - selcount= vertgroup_select(ret); - - if (selcount) { /* update if data was selected */ - EM_select_flush(); /* so that selected verts, go onto select faces */ - G.totedgesel+=selcount; - allqueue(REDRAWVIEW3D, 0); - BIF_undo_push("Select Grouped Verts"); - } + return; } + if (ret<1000) { + selcount= facegroup_select(ret/100); + if (selcount) { /* update if data was selected */ + G.totfacesel+=selcount; + allqueue(REDRAWVIEW3D, 0); + BIF_undo_push("Select Grouped Faces"); + } + return; + } }