forked from bartvdbraak/blender
bmesh todos:
- dont do name based object lookup to find the object for a mesh undo state (possibly object is renamed inbetween undos which would crash) - remove some todo comments for things that are working as they should.
This commit is contained in:
parent
869c69b149
commit
4ebcae7158
@ -2066,7 +2066,7 @@ static void walker_deselect_nth(BMEditMesh *em, int nth, int offset, BMHeader *h
|
||||
/* Walk over selected elements starting at active */
|
||||
BMW_init(&walker, bm, walktype,
|
||||
mask_vert, mask_edge, mask_face,
|
||||
BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */
|
||||
BMW_FLAG_NOP, /* don't use BMW_FLAG_TEST_HIDDEN here since we want to desel all */
|
||||
BMW_NIL_LAY);
|
||||
|
||||
BLI_assert(walker.order == BMW_BREADTH_FIRST);
|
||||
|
@ -143,8 +143,7 @@ void MESH_OT_subdivide(wmOperatorType *ot)
|
||||
/* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
|
||||
/* BMESH_TODO, this currently does nothing, just add to stop UI from erroring out! */
|
||||
RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor (BMESH TODO)", 0.0f, 1.0f);
|
||||
RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor", 0.0f, 1.0f);
|
||||
|
||||
RNA_def_boolean(ot->srna, "quadtri", 0, "Quad/Tri Mode", "Tries to prevent ngons");
|
||||
RNA_def_enum(ot->srna, "quadcorner", prop_mesh_cornervert_types, SUBD_STRAIGHT_CUT,
|
||||
|
@ -517,7 +517,6 @@ static void *getEditMesh(bContext *C)
|
||||
typedef struct UndoMesh {
|
||||
Mesh me;
|
||||
int selectmode;
|
||||
char obname[MAX_ID_NAME - 2];
|
||||
} UndoMesh;
|
||||
|
||||
/* undo simply makes copies of a bmesh */
|
||||
@ -527,7 +526,6 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata)
|
||||
Mesh *obme = obdata;
|
||||
|
||||
UndoMesh *um = MEM_callocN(sizeof(UndoMesh), "undo Mesh");
|
||||
BLI_strncpy(um->obname, em->ob->id.name + 2, sizeof(um->obname));
|
||||
|
||||
/* make sure shape keys work */
|
||||
um->me.key = obme->key ? copy_key_nolib(obme->key) : NULL;
|
||||
@ -544,12 +542,10 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata)
|
||||
static void undoMesh_to_editbtMesh(void *umv, void *em_v, void *UNUSED(obdata))
|
||||
{
|
||||
BMEditMesh *em = em_v, *em_tmp;
|
||||
Object *ob;
|
||||
Object *ob = em->ob;
|
||||
UndoMesh *um = umv;
|
||||
BMesh *bm;
|
||||
|
||||
/* BMESH_TODO - its possible the name wont be found right?, should fallback */
|
||||
ob = (Object *)find_id("OB", um->obname);
|
||||
ob->shapenr = em->bm->shapenr;
|
||||
|
||||
BMEdit_Free(em);
|
||||
|
Loading…
Reference in New Issue
Block a user