Cleanup: remove unused struct members from RenderStats

This commit is contained in:
Campbell Barton 2020-05-28 16:54:27 +10:00
parent 4ddb7a33a4
commit 3d2f143000
6 changed files with 11 additions and 52 deletions

View File

@ -1249,9 +1249,7 @@ bool BKE_scene_validate_setscene(Main *bmain, Scene *sce)
}
/**
* This function is needed to cope with fractional frames - including two Blender rendering
* features mblur (motion blur that renders 'sub-frames' and blurs them together),
* and fields rendering.
* This function is needed to cope with fractional frames, needed for motion blur & physics.
*/
float BKE_scene_frame_get(const Scene *scene)
{

View File

@ -437,7 +437,7 @@ static void make_renderinfo_string(const RenderStats *rs,
}
}
else {
if (rs->totvert || rs->totface || rs->tothalo || rs->totstrand || rs->totlamp) {
if (rs->totvert || rs->totface || rs->totlamp) {
spos += sprintf(spos, "| ");
}
@ -447,12 +447,6 @@ static void make_renderinfo_string(const RenderStats *rs,
if (rs->totface) {
spos += sprintf(spos, TIP_("Fa:%d "), rs->totface);
}
if (rs->tothalo) {
spos += sprintf(spos, TIP_("Ha:%d "), rs->tothalo);
}
if (rs->totstrand) {
spos += sprintf(spos, TIP_("St:%d "), rs->totstrand);
}
if (rs->totlamp) {
spos += sprintf(spos, TIP_("Li:%d "), rs->totlamp);
}
@ -463,18 +457,6 @@ static void make_renderinfo_string(const RenderStats *rs,
else {
spos += sprintf(spos, TIP_("| Mem:%.2fM, Peak: %.2fM "), rs->mem_used, rs->mem_peak);
}
if (rs->curfield) {
spos += sprintf(spos, TIP_("Field %d "), rs->curfield);
}
if (rs->curblur) {
spos += sprintf(spos, TIP_("Blur %d "), rs->curblur);
}
}
/* full sample */
if (rs->curfsa) {
spos += sprintf(spos, TIP_("| Full Sample %d "), rs->curfsa);
}
/* extra info */

View File

@ -160,8 +160,7 @@ typedef struct RenderResult {
typedef struct RenderStats {
int cfra;
int totface, totvert, totstrand, tothalo, totlamp, totpart;
short curfield, curblur, curpart, partsdone, convertdone, curfsa;
int totface, totvert, totlamp, totpart;
bool localview;
double starttime, lastframetime;
const char *infostr, *statstr;

View File

@ -674,7 +674,7 @@ bool RE_bake_engine(Render *re,
/* set render info */
re->i.cfra = re->scene->r.cfra;
BLI_strncpy(re->i.scene_name, re->scene->id.name + 2, sizeof(re->i.scene_name) - 2);
re->i.totface = re->i.totvert = re->i.totstrand = re->i.totlamp = re->i.tothalo = 0;
re->i.totface = re->i.totvert = re->i.totlamp = 0;
/* render */
engine = re->engine;
@ -812,7 +812,7 @@ int RE_engine_render(Render *re, int do_all)
/* set render info */
re->i.cfra = re->scene->r.cfra;
BLI_strncpy(re->i.scene_name, re->scene->id.name + 2, sizeof(re->i.scene_name));
re->i.totface = re->i.totvert = re->i.totstrand = re->i.totlamp = re->i.tothalo = 0;
re->i.totface = re->i.totvert = re->i.totlamp = 0;
/* render */
engine = re->engine;

View File

@ -270,8 +270,6 @@ void RE_parts_init(Render *re)
/* this is render info for caller, is not reset when parts are freed! */
re->i.totpart = 0;
re->i.curpart = 0;
re->i.partsdone = 0;
/* just for readable code.. */
xminb = re->disprect.xmin;

View File

@ -203,13 +203,6 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs)
megs_used_memory,
megs_peak_memory);
if (rs->curfield) {
fprintf(stdout, TIP_("Field %d "), rs->curfield);
}
if (rs->curblur) {
fprintf(stdout, TIP_("Blur %d "), rs->curblur);
}
BLI_timecode_string_from_time_simple(
info_time_str, sizeof(info_time_str), PIL_check_seconds_timer() - rs->starttime);
fprintf(stdout, TIP_("| Time:%s | "), info_time_str);
@ -218,23 +211,12 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs)
fprintf(stdout, "%s", rs->infostr);
}
else {
if (rs->tothalo) {
fprintf(stdout,
TIP_("Sce: %s Ve:%d Fa:%d Ha:%d La:%d"),
rs->scene_name,
rs->totvert,
rs->totface,
rs->tothalo,
rs->totlamp);
}
else {
fprintf(stdout,
TIP_("Sce: %s Ve:%d Fa:%d La:%d"),
rs->scene_name,
rs->totvert,
rs->totface,
rs->totlamp);
}
fprintf(stdout,
TIP_("Sce: %s Ve:%d Fa:%d La:%d"),
rs->scene_name,
rs->totvert,
rs->totface,
rs->totlamp);
}
/* Flush stdout to be sure python callbacks are printing stuff after blender. */