Forcing multires update when doing multires baking

Prevents issues with missed strokes baked into image when baking from sculpt mode.
This commit is contained in:
Sergey Sharybin 2011-11-30 11:04:57 +00:00
parent d24bbba150
commit ed65c46332

@ -1080,6 +1080,8 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
ob= base->object; ob= base->object;
multires_force_update(ob);
/* copy data stored in job descriptor */ /* copy data stored in job descriptor */
bkr.bake_filter= scene->r.bake_filter; bkr.bake_filter= scene->r.bake_filter;
bkr.mode= scene->r.bake_mode; bkr.mode= scene->r.bake_mode;
@ -1117,6 +1119,8 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
MultiresBakerJobData *data; MultiresBakerJobData *data;
ob= base->object; ob= base->object;
multires_force_update(ob);
data= MEM_callocN(sizeof(MultiresBakerJobData), "multiresBaker derivedMesh_data"); data= MEM_callocN(sizeof(MultiresBakerJobData), "multiresBaker derivedMesh_data");
data->lores_dm = multiresbake_create_loresdm(scene, ob, &data->lvl); data->lores_dm = multiresbake_create_loresdm(scene, ob, &data->lvl);
data->hires_dm = multiresbake_create_hiresdm(scene, ob, &data->tot_lvl, &data->simple); data->hires_dm = multiresbake_create_hiresdm(scene, ob, &data->tot_lvl, &data->simple);