Merging r48407 through r48409 from trunk into soc-2011-tomato

This commit is contained in:
Sergey Sharybin
2012-06-29 14:34:29 +00:00
4 changed files with 19 additions and 4 deletions

View File

@@ -119,7 +119,8 @@ enum {
G_DEBUG_FFMPEG = (1 << 1),
G_DEBUG_PYTHON = (1 << 2), /* extra python info */
G_DEBUG_EVENTS = (1 << 3), /* input/window/screen events */
G_DEBUG_WM = (1 << 4) /* operator, undo */
G_DEBUG_WM = (1 << 4), /* operator, undo */
G_DEBUG_JOBS = (1 << 5) /* jobs time profiling */
};
#define G_DEBUG_ALL (G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM)

View File

@@ -313,10 +313,13 @@ static void ringsel_finish(bContext *C, wmOperator *op)
edgering_sel(lcd, cuts, 1);
if (lcd->do_cut) {
/* Enable gridfill, so that intersecting loopcut works as one would expect.
* Note though that it will break edgeslide in this specific case.
* See [#31939]. */
BM_mesh_esubdivide(em->bm, BM_ELEM_SELECT,
0.0f, 0.0f, 0.0f,
cuts,
SUBDIV_SELECT_LOOPCUT, SUBD_PATH, 0, FALSE, 0);
SUBDIV_SELECT_LOOPCUT, SUBD_PATH, 0, TRUE, 0);
/* force edge slide to edge select mode in in face select mode */
if (em->selectmode & SCE_SELECT_FACE) {
@@ -336,7 +339,8 @@ static void ringsel_finish(bContext *C, wmOperator *op)
DAG_id_tag_update(lcd->ob->data, 0);
}
else {
/* XXX Is this piece of code ever used now? Simple loop select is now
* in editmesh_select.c (around line 1000)... */
/* sets as active, useful for other tools */
if (em->selectmode & SCE_SELECT_VERTEX)
BM_select_history_store(em->bm, lcd->eed->v1); /* low priority TODO, get vertrex close to mouse */

View File

@@ -54,7 +54,7 @@
#include "wm_event_types.h"
#include "wm.h"
#include "PIL_time.h"
/* ********************** Threaded Jobs Manager ****************************** */
@@ -127,6 +127,7 @@ struct wmJob {
/* we use BLI_threads api, but per job only 1 thread runs */
ListBase threads;
double start_time;
};
/* finds:
@@ -343,6 +344,9 @@ void WM_jobs_start(wmWindowManager *wm, wmJob *steve)
/* restarted job has timer already */
if (steve->wt == NULL)
steve->wt = WM_event_add_timer(wm, steve->win, TIMERJOBS, steve->timestep);
if (G.debug & G_DEBUG_JOBS)
steve->start_time = PIL_check_seconds_timer();
}
else printf("job fails, not initialized\n");
}
@@ -465,6 +469,11 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt)
// if (steve->stop) printf("job ready but stopped %s\n", steve->name);
// else printf("job finished %s\n", steve->name);
if (G.debug & G_DEBUG_JOBS) {
printf("Job '%s' finished in %f seconds\n", steve->name,
PIL_check_seconds_timer() - steve->start_time);
}
steve->running = 0;
BLI_end_threads(&steve->threads);

View File

@@ -1144,6 +1144,7 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
#endif
BLI_argsAdd(ba, 1, NULL, "--debug-value", "<value>\n\tSet debug value of <value> on startup\n", set_debug_value, NULL);
BLI_argsAdd(ba, 1, NULL, "--debug-jobs", "\n\tEnable time profiling for background jobs.", debug_mode_generic, (void *)G_DEBUG_JOBS);
BLI_argsAdd(ba, 1, NULL, "--verbose", "<verbose>\n\tSet logging verbosity level.", set_verbosity, NULL);