Fixed bug ##22580, 'All Edges' display doesn't work unless enter & exit edit mode...
authorNicholas Bishop <nicholasbishop@gmail.com>
Sun, 13 Jun 2010 02:54:55 +0000 (02:54 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Sun, 13 Jun 2010 02:54:55 +0000 (02:54 +0000)
* Pass the appropriate mesh flag into dm->drawEdges
* Added the object and draw update notifiers to the RNA property

source/blender/editors/space_view3d/drawobject.c
source/blender/makesrna/intern/rna_mesh.c

index 7172da557442786cdc0d11e7b7a5e8b03a7faf00..45bab2ed16e40001757170268a25efced5ce55a9 100644 (file)
@@ -2725,7 +2725,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
                }
                
                if((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_SOLID)==0)
-                       dm->drawEdges(dm, (dt==OB_WIRE || totface==0), 0);
+                       dm->drawEdges(dm, (dt==OB_WIRE || totface==0), me->drawflag & ME_ALLEDGES);
 
                if (dt!=OB_WIRE && draw_wire==2) {
                        glDepthMask(1);
index 28c7f7eeb580e2dcce515f4f199c9099c2e3afb4..b289373f349f4dda9e5395ea72ee16b4696605ca 100644 (file)
@@ -33,6 +33,8 @@
 #include "DNA_meshdata_types.h"
 #include "DNA_object_types.h"
 
+#include "WM_types.h"
+
 #ifdef RNA_RUNTIME
 
 #include "DNA_scene_types.h"
@@ -1806,6 +1808,7 @@ static void rna_def_mesh(BlenderRNA *brna)
        prop= RNA_def_property(srna, "all_edges", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_ALLEDGES);
        RNA_def_property_ui_text(prop, "All Edges", "Displays all edges for wireframe in all view modes in the 3D view");
+       RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
 
        prop= RNA_def_property(srna, "draw_faces", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWFACES);