make drawing faces in the UV editor an image space option, re-using the mesh option...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 28 Jun 2011 09:42:17 +0000 (09:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 28 Jun 2011 09:42:17 +0000 (09:42 +0000)
release/scripts/startup/bl_ui/space_image.py
source/blender/editors/uvedit/uvedit_draw.c
source/blender/makesdna/DNA_space_types.h
source/blender/makesrna/intern/rna_space.c

index 9f69ca170764e90bf4a0f429879e5721d1c79d58..b1322d453fce37a68d744202e0ae02df6aba8593 100644 (file)
@@ -616,10 +616,9 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
 
             split = layout.split()
             col = split.column()
+            col.prop(uvedit, "show_faces")
             col.prop(uvedit, "show_smooth_edges", text="Smooth")
             col.prop(uvedit, "show_modified_edges", text="Modified")
-            #col.prop(uvedit, "show_edges")
-            #col.prop(uvedit, "show_faces")
 
             col = split.column()
             col.prop(uvedit, "show_stretch", text="Stretch")
index 8d73da0063c8821d505503910c320fa7b836fb14..453bea0969b8e74ff79e2e526ec8020dc48e3103 100644 (file)
@@ -474,7 +474,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
        if(sima->flag & SI_DRAW_STRETCH) {
                draw_uvs_stretch(sima, scene, em, activetf);
        }
-       else if(me->drawflag & ME_DRAWFACES) {
+       else if(!(sima->flag & SI_NO_DRAWFACES)) {
                /* draw transparent faces */
                UI_GetThemeColor4ubv(TH_FACE, col1);
                UI_GetThemeColor4ubv(TH_FACE_SELECT, col2);
index 2b039060e47b20a6f5f91e8193cb2108eb23470e..ff9f2269f53f1c3cd71e09056a8e7d0cf26b8457 100644 (file)
@@ -754,7 +754,7 @@ enum FileSortTypeE {
 #define SI_EDITTILE            (1<<1)
 #define SI_CLIP_UV             (1<<2)
 #define SI_DRAWTOOL            (1<<3)
-#define SI_DEPRECATED1  (1<<4) /* stick UVs to others in the same location */
+#define SI_NO_DRAWFACES        (1<<4)
 #define SI_DRAWSHADOW   (1<<5)
 #define SI_SELACTFACE   (1<<6) /* deprecated */
 #define SI_DEPRECATED2 (1<<7)
index f4753e2efbe9bfa3836d3f62ffd96515a288919a..b79d5395eec7a668e757a3e68b5cbff9070c4a10 100644 (file)
@@ -990,7 +990,12 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS);
        RNA_def_property_ui_text(prop, "Normalized Coordinates", "Display UV coordinates from 0.0 to 1.0 rather than in pixels");
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
-       
+
+       prop= RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SI_NO_DRAWFACES);
+       RNA_def_property_ui_text(prop, "Draw Faces", "Draw faces over the image");
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+
        prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_array(prop, 2);
        RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_cursor_location_get", "rna_SpaceImageEditor_cursor_location_set", NULL);