Forcing multires update when doing multires baking
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 30 Nov 2011 11:04:57 +0000 (11:04 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 30 Nov 2011 11:04:57 +0000 (11:04 +0000)
Prevents issues with missed strokes baked into image when baking from sculpt mode.

source/blender/editors/object/object_bake.c

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