[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30572] trunk/blender/source/blender/ editors/sculpt_paint/paint_ops.c: Unified size only works for sculpt, so only modify it in sculpt mode.

Brecht Van Lommel brecht at blender.org
Wed Jul 21 11:39:22 CEST 2010


Revision: 30572
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30572
Author:   blendix
Date:     2010-07-21 11:39:21 +0200 (Wed, 21 Jul 2010)

Log Message:
-----------
Unified size only works for sculpt, so only modify it in sculpt mode.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c	2010-07-21 09:25:00 UTC (rev 30571)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c	2010-07-21 09:39:21 UTC (rev 30572)
@@ -78,10 +78,11 @@
 	/*int type = RNA_enum_get(op->ptr, "type");*/
 	Paint *paint = paint_get_active(CTX_data_scene(C));
 	Brush *br = paint_brush(paint);
+	Object *ob = CTX_data_active_object(C);
 	float factor = RNA_float_get(op->ptr, "scalar");
 
 	if (br) {
-		if (U.sculpt_paint_settings & SCULPT_PAINT_USE_UNIFIED_SIZE) {
+		if (ob && (ob->mode & OB_MODE_SCULPT) && (U.sculpt_paint_settings & SCULPT_PAINT_USE_UNIFIED_SIZE)) {
 			U.sculpt_paint_unified_size *= factor;
 		}
 		else {





More information about the Bf-blender-cvs mailing list