Multires baker: renamed Number of Rays to Samples after discussion with Brecht

This commit is contained in:
Sergey Sharybin 2012-12-19 12:30:39 +00:00
parent 1dbb84c1c9
commit cdb6aad54c
6 changed files with 11 additions and 10 deletions

@ -1,4 +1,5 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -614,7 +615,7 @@ class RENDER_PT_bake(RenderButtonsPanel, Panel):
if rd.bake_type == 'AO':
col = split.column()
col.prop(rd, "bake_bias")
col.prop(rd, "bake_rays_number")
col.prop(rd, "bake_samples")
if __name__ == "__main__": # only for live edit.

@ -432,7 +432,7 @@ static Scene *scene_add(Main *bmain, const char *name)
sce->r.bake_osa = 5;
sce->r.bake_flag = R_BAKE_CLEAR;
sce->r.bake_normal_space = R_BAKE_SPACE_TANGENT;
sce->r.bake_rays_number = 256;
sce->r.bake_samples = 256;
sce->r.scemode = R_DOCOMP | R_DOSEQ | R_EXTENSION;
sce->r.stamp = R_STAMP_TIME | R_STAMP_FRAME | R_STAMP_DATE | R_STAMP_CAMERA | R_STAMP_SCENE | R_STAMP_FILENAME | R_STAMP_RENDERTIME;
sce->r.stamp_font_id = 12;

@ -8424,8 +8424,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
Scene *scene;
for (scene = main->scene.first; scene; scene = scene->id.next) {
if (scene->r.bake_rays_number == 0)
scene->r.bake_rays_number = 256;
if (scene->r.bake_samples == 0)
scene->r.bake_samples = 256;
}
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */

@ -317,7 +317,7 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
bkr.mode = scene->r.bake_mode;
bkr.use_lores_mesh = scene->r.bake_flag & R_BAKE_LORES_MESH;
bkr.bias = scene->r.bake_biasdist;
bkr.number_of_rays = scene->r.bake_rays_number;
bkr.number_of_rays = scene->r.bake_samples;
bkr.raytrace_structure = scene->r.raytrace_structure;
bkr.octree_resolution = scene->r.ocres;
bkr.threads = scene->r.mode & R_FIXED_THREADS ? scene->r.threads : 0;
@ -355,7 +355,7 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
bkj->use_lores_mesh = scene->r.bake_flag & R_BAKE_LORES_MESH;
bkj->bake_clear = scene->r.bake_flag & R_BAKE_CLEAR;
bkj->bias = scene->r.bake_biasdist;
bkj->number_of_rays = scene->r.bake_rays_number;
bkj->number_of_rays = scene->r.bake_samples;
bkj->raytrace_structure = scene->r.raytrace_structure;
bkj->octree_resolution = scene->r.ocres;
bkj->threads = scene->r.mode & R_FIXED_THREADS ? scene->r.threads : 0;

@ -492,7 +492,7 @@ typedef struct RenderData {
short bake_osa, bake_filter, bake_mode, bake_flag;
short bake_normal_space, bake_quad_split;
float bake_maxdist, bake_biasdist;
int bake_rays_number;
short bake_samples, bake_pad;
/* path to render output */
char pic[1024]; /* 1024 = FILE_MAX */

@ -3895,11 +3895,11 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"Calculate heights against unsubdivided low resolution mesh");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "bake_rays_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bake_rays_number");
prop = RNA_def_property(srna, "bake_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bake_samples");
RNA_def_property_range(prop, 64, 1024);
RNA_def_property_int_default(prop, 256);
RNA_def_property_ui_text(prop, "Number of Rays", "Number of rays used for ambient occlusion baking from multires");
RNA_def_property_ui_text(prop, "Samples", "Number of samples used for ambient occlusion baking from multires");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* stamp */