[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43393] branches/bmesh/blender: svn merge ^/trunk/blender -r43381:43392

Campbell Barton ideasman42 at gmail.com
Sun Jan 15 11:33:50 CET 2012


Revision: 43393
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43393
Author:   campbellbarton
Date:     2012-01-15 10:33:41 +0000 (Sun, 15 Jan 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r43381:43392

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43381

Modified Paths:
--------------
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/bmesh/blender/source/blender/blenkernel/BKE_brush.h
    branches/bmesh/blender/source/blender/blenkernel/intern/brush.c
    branches/bmesh/blender/source/blender/editors/armature/armature_ops.c
    branches/bmesh/blender/source/blender/editors/curve/curve_ops.c
    branches/bmesh/blender/source/blender/editors/mesh/mesh_ops.c
    branches/bmesh/blender/source/blender/editors/metaball/mball_ops.c
    branches/bmesh/blender/source/blender/editors/object/object_ops.c
    branches/bmesh/blender/source/blender/editors/physics/physics_ops.c
    branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_image.c
    branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_ops.c
    branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_stroke.c
    branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_vertex.c
    branches/bmesh/blender/source/blender/editors/sculpt_paint/sculpt.c
    branches/bmesh/blender/source/blender/editors/space_action/action_ops.c
    branches/bmesh/blender/source/blender/editors/space_graph/graph_ops.c
    branches/bmesh/blender/source/blender/editors/space_nla/nla_ops.c
    branches/bmesh/blender/source/blender/editors/space_node/node_ops.c
    branches/bmesh/blender/source/blender/editors/space_sequencer/sequencer_ops.c
    branches/bmesh/blender/source/blender/editors/space_view3d/view3d_ops.c
    branches/bmesh/blender/source/blender/makesdna/DNA_brush_types.h
    branches/bmesh/blender/source/blender/makesrna/intern/rna_brush.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_scene.c
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_operators.c

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:39992-43381
   + /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:39992-43392


Property changes on: branches/bmesh/blender/release
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender/release:31524-42516,42522-42548,42551-42585,42587-42655,42681-42757,42779-42870,42921-42927,42954-42957,42974-43085,43093-43278,43295-43381
   + /trunk/blender/release:31524-42516,42522-42548,42551-42585,42587-42655,42681-42757,42779-42870,42921-42927,42954-42957,42974-43085,43093-43278,43295-43392

Modified: branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d.py	2012-01-15 09:20:29 UTC (rev 43392)
+++ branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d.py	2012-01-15 10:33:41 UTC (rev 43393)
@@ -645,8 +645,8 @@
 
         layout.separator()
 
-        layout.operator("armature.select_all", text="Select/Deselect All")
-        layout.operator("armature.select_inverse", text="Inverse")
+        layout.operator("armature.select_all", text="Select/Deselect All").action = 'TOGGLE'
+        layout.operator("armature.select_all", text="Inverse").action = 'INVERT'
 
         layout.separator()
 

Modified: branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2012-01-15 09:20:29 UTC (rev 43392)
+++ branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2012-01-15 10:33:41 UTC (rev 43393)
@@ -476,16 +476,16 @@
         parent.prop(ups, "use_unified_strength", text="Strength")
 
     @staticmethod
-    def prop_unified_size(parent, context, brush, prop_name, icon='NONE', text=""):
+    def prop_unified_size(parent, context, brush, prop_name, icon='NONE', text="", slider=False):
         ups = context.tool_settings.unified_paint_settings
         ptr = ups if ups.use_unified_size else brush
-        parent.prop(ptr, prop_name, icon=icon, text=text)
+        parent.prop(ptr, prop_name, icon=icon, text=text, slider=slider)
 
     @staticmethod
-    def prop_unified_strength(parent, context, brush, prop_name, icon='NONE', text=""):
+    def prop_unified_strength(parent, context, brush, prop_name, icon='NONE', text="", slider=False):
         ups = context.tool_settings.unified_paint_settings
         ptr = ups if ups.use_unified_strength else brush
-        parent.prop(ptr, prop_name, icon=icon, text=text)
+        parent.prop(ptr, prop_name, icon=icon, text=text, slider=slider)
 
 class VIEW3D_PT_tools_brush(PaintPanel, Panel):
     bl_label = "Brush"
@@ -545,10 +545,10 @@
             if ((ups.use_unified_size and ups.use_locked_size) or
                 ((not ups.use_unified_size) and brush.use_locked_size)):
                 self.prop_unified_size(row, context, brush, "use_locked_size", icon='LOCKED')
-                row.prop(brush, "unprojected_radius", text="Radius", slider=True)
+                self.prop_unified_size(row, context, brush, "unprojected_radius", slider=True, text="Radius")
             else:
                 self.prop_unified_size(row, context, brush, "use_locked_size", icon='UNLOCKED')
-                row.prop(brush, "size", slider=True)
+                self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
 
             self.prop_unified_size(row, context, brush, "use_pressure_size")
 
@@ -563,12 +563,12 @@
                     else:
                         row.prop(brush, "use_space_atten", toggle=True, text="", icon='UNLOCKED')
 
-                row.prop(brush, "strength", text="Strength", slider=True)
+                self.prop_unified_strength(row, context, brush, "strength")
                 self.prop_unified_strength(row, context, brush, "use_pressure_strength")
 
             if tool == 'ROTATE':
                 row = col.row(align=True)
-                row.prop(brush, "strength", text="Strength", slider=True)
+                self.prop_unified_strength(row, context, brush, "strength")
                 self.prop_unified_strength(row, context, brush, "use_pressure_strength")
 
             if tool != 'SMOOTH':
@@ -656,11 +656,11 @@
             col.prop(brush, "color", text="")
 
             row = col.row(align=True)
-            row.prop(brush, "size", slider=True)
+            self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
             self.prop_unified_size(row, context, brush, "use_pressure_size")
 
             row = col.row(align=True)
-            row.prop(brush, "strength", text="Strength", slider=True)
+            self.prop_unified_strength(row, context, brush, "strength")
             self.prop_unified_strength(row, context, brush, "use_pressure_strength")
 
             row = col.row(align=True)
@@ -682,11 +682,11 @@
             col = layout.column()
 
             row = col.row(align=True)
-            row.prop(brush, "size", slider=True)
+            self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
             self.prop_unified_size(row, context, brush, "use_pressure_size")
 
             row = col.row(align=True)
-            row.prop(brush, "strength", text="Strength", slider=True)
+            self.prop_unified_strength(row, context, brush, "strength")
             self.prop_unified_strength(row, context, brush, "use_pressure_strength")
 
             row = col.row(align=True)
@@ -700,11 +700,11 @@
             col.prop(brush, "color", text="")
 
             row = col.row(align=True)
-            row.prop(brush, "size", slider=True)
+            self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
             self.prop_unified_size(row, context, brush, "use_pressure_size")
 
             row = col.row(align=True)
-            row.prop(brush, "strength", text="Strength", slider=True)
+            self.prop_unified_strength(row, context, brush, "strength")
             self.prop_unified_strength(row, context, brush, "use_pressure_strength")
 
             # XXX - TODO

Modified: branches/bmesh/blender/source/blender/blenkernel/BKE_brush.h
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/BKE_brush.h	2012-01-15 09:20:29 UTC (rev 43392)
+++ branches/bmesh/blender/source/blender/blenkernel/BKE_brush.h	2012-01-15 10:33:41 UTC (rev 43393)
@@ -59,7 +59,8 @@
 int brush_clone_image_delete(struct Brush *brush);
 
 /* jitter */
-void brush_jitter_pos(struct Brush *brush, float *pos, float *jitterpos);
+void brush_jitter_pos(const struct Scene *scene, struct Brush *brush,
+					  float *pos, float *jitterpos);
 
 /* brush curve */
 void brush_curve_preset(struct Brush *b, /*enum CurveMappingPreset*/int preset);
@@ -67,8 +68,8 @@
 float brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */
 
 /* sampling */
-void brush_sample_tex(struct Brush *brush, const float xy[2], float rgba[4], const int thread);
-void brush_imbuf_new(struct Brush *brush, short flt, short texfalloff, int size,
+void brush_sample_tex(const struct Scene *scene, struct Brush *brush, const float xy[2], float rgba[4], const int thread);
+void brush_imbuf_new(const struct Scene *scene, struct Brush *brush, short flt, short texfalloff, int size,
 	struct ImBuf **imbuf, int use_color_correction);
 
 /* painting */
@@ -92,18 +93,27 @@
 
 /* unified strength and size */
 
-int  brush_size(struct Brush *brush);
-void brush_set_size(struct Brush *brush, int value);
+int  brush_size(const struct Scene *scene, struct Brush *brush);
+void brush_set_size(struct Scene *scene, struct Brush *brush, int value);
 
+float brush_unprojected_radius(const struct Scene *scene, struct Brush *brush);
+void  brush_set_unprojected_radius(struct Scene *scene, struct Brush *brush, float value);
+
+float brush_alpha(const struct Scene *scene, struct Brush *brush);
+
 int  brush_use_locked_size(const struct Scene *scene, struct Brush *brush);
 int  brush_use_alpha_pressure(const struct Scene *scene, struct Brush *brush);
 int  brush_use_size_pressure(const struct Scene *scene, struct Brush *brush);
 
-float brush_unprojected_radius(struct Brush *brush);
-void  brush_set_unprojected_radius(struct Brush *brush, float value);
+/* scale unprojected radius to reflect a change in the brush's 2D size */
+void brush_scale_unprojected_radius(float *unprojected_radius,
+									int new_brush_size,
+									int old_brush_size);
 
-float brush_alpha(struct Brush *brush);
-void  brush_set_alpha(struct Brush *brush, float value);
+/* scale brush size to reflect a change in the brush's unprojected radius */
+void brush_scale_size(int *brush_size,
+					  float new_unprojected_radius,
+					  float old_unprojected_radius);
 
 /* debugging only */
 void brush_debug_print_state(struct Brush *br);

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/brush.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/brush.c	2012-01-15 09:20:29 UTC (rev 43392)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/brush.c	2012-01-15 10:33:41 UTC (rev 43393)
@@ -487,14 +487,14 @@
 }
 
 /* Brush Sampling */
-void brush_sample_tex(Brush *brush, const float xy[2], float rgba[4], const int thread)
+void brush_sample_tex(const Scene *scene, Brush *brush, const float xy[2], float rgba[4], const int thread)
 {
 	MTex *mtex= &brush->mtex;
 
 	if (mtex && mtex->tex) {
 		float co[3], tin, tr, tg, tb, ta;
 		int hasrgb;

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list