Revision: 37891
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37891
Author:   campbellbarton
Date:     2011-06-28 09:42:17 +0000 (Tue, 28 Jun 2011)
Log Message:
-----------
make drawing faces in the UV editor an image space option, re-using the mesh 
option was lazy and doesn't make much sense.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_image.py
    trunk/blender/source/blender/editors/uvedit/uvedit_draw.c
    trunk/blender/source/blender/makesdna/DNA_space_types.h
    trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_image.py  2011-06-28 
06:56:39 UTC (rev 37890)
+++ trunk/blender/release/scripts/startup/bl_ui/space_image.py  2011-06-28 
09:42:17 UTC (rev 37891)
@@ -616,10 +616,9 @@
 
             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")

Modified: trunk/blender/source/blender/editors/uvedit/uvedit_draw.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_draw.c   2011-06-28 
06:56:39 UTC (rev 37890)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_draw.c   2011-06-28 
09:42:17 UTC (rev 37891)
@@ -474,7 +474,7 @@
        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);

Modified: trunk/blender/source/blender/makesdna/DNA_space_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_space_types.h     2011-06-28 
06:56:39 UTC (rev 37890)
+++ trunk/blender/source/blender/makesdna/DNA_space_types.h     2011-06-28 
09:42:17 UTC (rev 37891)
@@ -754,7 +754,7 @@
 #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)

Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c    2011-06-28 
06:56:39 UTC (rev 37890)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c    2011-06-28 
09:42:17 UTC (rev 37891)
@@ -990,7 +990,12 @@
        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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to