From 17381c7b90eb3acde53eca013ae5a5a55699f17d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Oct 2020 12:32:22 +0100 Subject: Multires: Remove simple subdivision type The simple subdivision as a type only causes issues like no-continuous normals across edges, inability to reliably switch the type and things like this. The new subdivision operators supports wider variety of how to add details to the model, which are more powerful than a single one-time decision on the subdivision type. The versioning code is adjusting topology converter to specify all edges as infinitely sharp. The reason for this (instead of using settings.is_simple) is because in a longer term the simple subdivision will be removed from Subsurf modifier as well, and will be replaced with more efficient bmesh-based modifier. This is finished up version of D8436. Differential Revision: https://developer.blender.org/D9350 --- source/blender/editors/object/object_bake.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/object/object_bake.c') diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index ae1aae27b7f..bb8597bf02c 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -97,7 +97,6 @@ typedef struct MultiresBakerJobData { int len; } ob_image; DerivedMesh *lores_dm, *hires_dm; - bool simple; int lvl, tot_lvl; ListBase images; } MultiresBakerJobData; @@ -247,7 +246,7 @@ static DerivedMesh *multiresbake_create_loresdm(Scene *scene, Object *ob, int *l return dm; } -static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *lvl, bool *simple) +static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *lvl) { Mesh *me = (Mesh *)ob->data; MultiresModifierData *mmd = get_multires_modifier(scene, ob, 0); @@ -264,7 +263,6 @@ static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *l CustomData_set_only_copy(&cddm->polyData, CD_MASK_BAREMESH.pmask); *lvl = mmd->totlvl; - *simple = mmd->simple != 0; tmp_mmd.lvl = mmd->totlvl; tmp_mmd.sculptlvl = mmd->totlvl; @@ -386,7 +384,7 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op) bkr.ob_image.array = bake_object_image_get_array(ob); bkr.ob_image.len = ob->totcol; - bkr.hires_dm = multiresbake_create_hiresdm(scene, ob, &bkr.tot_lvl, &bkr.simple); + bkr.hires_dm = multiresbake_create_hiresdm(scene, ob, &bkr.tot_lvl); bkr.lores_dm = multiresbake_create_loresdm(scene, ob, &bkr.lvl); RE_multires_bake_images(&bkr); @@ -441,7 +439,7 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj) data->ob_image.len = ob->totcol; /* create low-resolution DM (to bake to) and hi-resolution DM (to bake from) */ - 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->lores_dm = multiresbake_create_loresdm(scene, ob, &lvl); data->lvl = lvl; @@ -491,7 +489,6 @@ static void multiresbake_startjob(void *bkv, short *stop, short *do_update, floa bkr.hires_dm = data->hires_dm; bkr.tot_lvl = data->tot_lvl; bkr.lvl = data->lvl; - bkr.simple = data->simple; /* needed for proper progress bar */ bkr.tot_obj = tot_obj; -- cgit v1.2.3