[Bf-blender-cvs] [ec94ab5] PSketch: PSculpt: Rate/Timer support

Joshua Leung noreply at git.blender.org
Sun Jan 31 14:29:41 CET 2016


Commit: ec94ab56b6adf7f8ca220b5ddc86a7dfcd6934c5
Author: Joshua Leung
Date:   Mon Feb 1 02:03:29 2016 +1300
Branches: PSketch
https://developer.blender.org/rBec94ab56b6adf7f8ca220b5ddc86a7dfcd6934c5

PSculpt: Rate/Timer support

* Twist and Reset also support the rate control now
* Reduced the speed of the timer, to make it more controllable

===================================================================

M	source/blender/blenkernel/intern/scene.c
M	source/blender/blenloader/intern/versioning_270.c
M	source/blender/blenloader/intern/versioning_defaults.c
M	source/blender/editors/armature/pose_sculpt.c

===================================================================

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index a91533c..e98352e 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -656,7 +656,7 @@ void BKE_scene_init(Scene *sce)
 	for (a = 0; a < PSCULPT_TOT_BRUSH; a++) {
 		psculpt->brush[a].strength = 0.5f;
 		psculpt->brush[a].size = 50;
-		psculpt->brush[a].rate = 0.1f;
+		psculpt->brush[a].rate = 0.01f;
 		psculpt->brush[a].flag = PSCULPT_BRUSH_FLAG_USE_PRESSURE | PSCULPT_BRUSH_FLAG_USE_FALLOFF;
 	}
 	psculpt->brush[PSCULPT_BRUSH_CURL].strength = 0.25f;
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 7c12b8b..030b8bf 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1070,7 +1070,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
 				for (i = 0; i < PSCULPT_TOT_BRUSH; i++) {
 					pset->brush[i].strength = 0.5f;
 					pset->brush[i].size = 50;
-					pset->brush[i].rate = 0.1f;
+					pset->brush[i].rate = 0.01f;
 					pset->brush[i].flag = PSCULPT_BRUSH_FLAG_USE_PRESSURE | PSCULPT_BRUSH_FLAG_USE_FALLOFF;
 				}
 				pset->brush[PSCULPT_BRUSH_CURL].strength = 0.25f;
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index cdd82eb..4cf3f3a 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -255,7 +255,7 @@ void BLO_update_defaults_startup_blend(Main *bmain)
 				for (i = 0; i < PSCULPT_TOT_BRUSH; i++) {
 					pset->brush[i].strength = 0.5f;
 					pset->brush[i].size = 50;
-					pset->brush[i].rate = 0.1f;
+					pset->brush[i].rate = 0.01f;
 					pset->brush[i].flag = PSCULPT_BRUSH_FLAG_USE_PRESSURE | PSCULPT_BRUSH_FLAG_USE_FALLOFF;
 				}
 				pset->brush[PSCULPT_BRUSH_CURL].strength = 0.25f;
diff --git a/source/blender/editors/armature/pose_sculpt.c b/source/blender/editors/armature/pose_sculpt.c
index 54602d7..2cd4151 100644
--- a/source/blender/editors/armature/pose_sculpt.c
+++ b/source/blender/editors/armature/pose_sculpt.c
@@ -1653,7 +1653,7 @@ static int psculpt_brush_invoke(bContext *C, wmOperator *op, const wmEvent *even
 	psculpt_brush_apply_event(C, op, event);
 	
 	/* register timer for increasing influence by hovering over an area */
-	if (ELEM(pset->brushtype, PSCULPT_BRUSH_CURL, PSCULPT_BRUSH_STRETCH))
+	if (ELEM(pset->brushtype, PSCULPT_BRUSH_CURL, PSCULPT_BRUSH_STRETCH, PSCULPT_BRUSH_TWIST, PSCULPT_BRUSH_RESET))
 	{
 		PSculptBrushData *brush = psculpt_get_brush(scene);
 		pso->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, brush->rate);




More information about the Bf-blender-cvs mailing list