Fix Blend From Shape having no effect after exiting edit mode.

Also added a UI string for mesh selection mode property to show
up in undo stack.
This commit is contained in:
2010-01-26 17:39:45 +00:00
parent d5ca236948
commit 722f57ca75
2 changed files with 4 additions and 1 deletions

View File

@@ -1558,7 +1558,7 @@ typedef struct UndoMesh {
EditFaceC *faces;
EditSelectionC *selected;
int totvert, totedge, totface, totsel;
short selectmode;
int selectmode, shapenr;
RetopoPaintData *retopo_paint_data;
char retopo_mode;
CustomData vdata, edata, fdata;
@@ -1598,6 +1598,7 @@ static void *editMesh_to_undoMesh(void *emv)
um= MEM_callocN(sizeof(UndoMesh), "undomesh");
um->selectmode = em->selectmode;
um->shapenr = em->shapenr;
for(eve=em->verts.first; eve; eve= eve->next) um->totvert++;
for(eed=em->edges.first; eed; eed= eed->next) um->totedge++;
@@ -1700,6 +1701,7 @@ static void undoMesh_to_editMesh(void *umv, void *emv)
memset(em, 0, sizeof(EditMesh));
em->selectmode = um->selectmode;
em->shapenr = um->shapenr;
init_editmesh_fastmalloc(em, um->totvert, um->totedge, um->totface);

View File

@@ -835,6 +835,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "selectmode", 1);
RNA_def_property_array(prop, 3);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_editmesh_select_mode_set");
RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Which mesh elements selection works on.");
RNA_def_property_update(prop, 0, "rna_Scene_editmesh_select_mode_update");
prop= RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_FACTOR);