[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45681] trunk/blender/source/blender/ editors/mesh: bmesh todos:
Campbell Barton
ideasman42 at gmail.com
Mon Apr 16 11:34:44 CEST 2012
Revision: 45681
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45681
Author: campbellbarton
Date: 2012-04-16 09:34:43 +0000 (Mon, 16 Apr 2012)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/blender/editors/mesh/editmesh_select.c
trunk/blender/source/blender/editors/mesh/editmesh_tools.c
trunk/blender/source/blender/editors/mesh/editmesh_utils.c
Modified: trunk/blender/source/blender/editors/mesh/editmesh_select.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_select.c 2012-04-16 09:13:32 UTC (rev 45680)
+++ trunk/blender/source/blender/editors/mesh/editmesh_select.c 2012-04-16 09:34:43 UTC (rev 45681)
@@ -2066,7 +2066,7 @@
/* 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);
Modified: trunk/blender/source/blender/editors/mesh/editmesh_tools.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_tools.c 2012-04-16 09:13:32 UTC (rev 45680)
+++ trunk/blender/source/blender/editors/mesh/editmesh_tools.c 2012-04-16 09:34:43 UTC (rev 45681)
@@ -143,8 +143,7 @@
/* 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,
Modified: trunk/blender/source/blender/editors/mesh/editmesh_utils.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_utils.c 2012-04-16 09:13:32 UTC (rev 45680)
+++ trunk/blender/source/blender/editors/mesh/editmesh_utils.c 2012-04-16 09:34:43 UTC (rev 45681)
@@ -517,7 +517,6 @@
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 @@
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 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);
More information about the Bf-blender-cvs
mailing list