Revision: 38762
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38762
Author:   psy-fi
Date:     2011-07-27 18:33:00 +0000 (Wed, 27 Jul 2011)
Log Message:
-----------
Smooth UV brush: GUI option to enable brush. This has the unwanted efect that 
you can now paint on uvs when this is on, investigating.

Modified Paths:
--------------
    branches/soc-2011-onion/release/scripts/startup/bl_ui/space_image.py
    branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c
    branches/soc-2011-onion/source/blender/makesdna/DNA_space_types.h
    branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c

Modified: branches/soc-2011-onion/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- branches/soc-2011-onion/release/scripts/startup/bl_ui/space_image.py        
2011-07-27 17:49:35 UTC (rev 38761)
+++ branches/soc-2011-onion/release/scripts/startup/bl_ui/space_image.py        
2011-07-27 18:33:00 UTC (rev 38762)
@@ -286,6 +286,8 @@
         layout.separator()
 
         layout.menu("IMAGE_MT_uvs_showhide")
+        layout.separator()
+        layout.prop(sima, "use_smooth_brush")
 
 
 class IMAGE_MT_uvs_select_mode(bpy.types.Menu):

Modified: 
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c   
2011-07-27 17:49:35 UTC (rev 38761)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c   
2011-07-27 18:33:00 UTC (rev 38762)
@@ -4521,7 +4521,7 @@
                if(sima) {
                        ARegion *ar= CTX_wm_region(C);
 
-                       if((sima->flag & SI_DRAWTOOL) && 
ar->regiontype==RGN_TYPE_WINDOW)
+                       if(((sima->flag & SI_DRAWTOOL) || (sima->flag & 
SI_SMOOTH_BRUSH)) && ar->regiontype==RGN_TYPE_WINDOW)
                                return 1;
                }
        }

Modified: branches/soc-2011-onion/source/blender/makesdna/DNA_space_types.h
===================================================================
--- branches/soc-2011-onion/source/blender/makesdna/DNA_space_types.h   
2011-07-27 17:49:35 UTC (rev 38761)
+++ branches/soc-2011-onion/source/blender/makesdna/DNA_space_types.h   
2011-07-27 18:33:00 UTC (rev 38762)
@@ -780,6 +780,7 @@
 
 #define SI_COLOR_CORRECTION    (1<<24)
 #define SI_ISLAND_MANAGER      (1<<25)
+#define SI_SMOOTH_BRUSH                (1<<25)
 
 /* SpaceIpo->flag (Graph Editor Settings) */
        /* OLD DEPRECEATED SETTING */

Modified: branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c
===================================================================
--- branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c  
2011-07-27 17:49:35 UTC (rev 38761)
+++ branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c  
2011-07-27 18:33:00 UTC (rev 38762)
@@ -1639,6 +1639,12 @@
        RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, 
"rna_SpaceImageEditor_paint_update");
 
+       prop= RNA_def_property(srna, "use_smooth_brush", PROP_BOOLEAN, 
PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SMOOTH_BRUSH);
+       RNA_def_property_ui_text(prop, "Smooth Brush", "Enable brush for uv 
smoothing");
+       RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, 
"rna_SpaceImageEditor_paint_update");
+
        /* grease pencil */
        prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "gpd");

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

Reply via email to