Cleanup: removed unused derivedDeform and derivedFinal
This commit is contained in:
@@ -66,7 +66,6 @@ void BKE_object_free_curve_cache(struct Object *ob);
|
||||
|
||||
void BKE_object_free(struct Object *ob);
|
||||
void BKE_object_free_derived_caches(struct Object *ob);
|
||||
void BKE_object_free_derived_mesh_caches(struct Object *ob);
|
||||
void BKE_object_free_caches(struct Object *object);
|
||||
|
||||
void BKE_object_modifier_hook_reset(struct Object *ob, struct HookModifierData *hmd);
|
||||
|
||||
@@ -1289,13 +1289,9 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm, Scene *scene)
|
||||
int i, j, numGrids, highGridSize, lowGridSize;
|
||||
const bool has_mask = CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK);
|
||||
|
||||
/* create subsurf DM from original mesh at high level */
|
||||
if (ob->derivedDeform) {
|
||||
cddm = CDDM_copy(ob->derivedDeform);
|
||||
}
|
||||
else {
|
||||
cddm = CDDM_from_mesh(me);
|
||||
}
|
||||
/* Create subsurf DM from original mesh at high level. */
|
||||
/* TODO: use mesh_deform_eval when sculpting on deformed mesh. */
|
||||
cddm = CDDM_from_mesh(me);
|
||||
DM_set_only_copy(cddm, &CD_MASK_BAREMESH);
|
||||
|
||||
highdm = subsurf_dm_create_local(scene,
|
||||
@@ -1369,12 +1365,8 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm, Scene *scene)
|
||||
DerivedMesh *cddm, *subdm;
|
||||
const bool has_mask = CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK);
|
||||
|
||||
if (ob->derivedDeform) {
|
||||
cddm = CDDM_copy(ob->derivedDeform);
|
||||
}
|
||||
else {
|
||||
cddm = CDDM_from_mesh(me);
|
||||
}
|
||||
/* TODO: use mesh_deform_eval when sculpting on deformed mesh. */
|
||||
cddm = CDDM_from_mesh(me);
|
||||
DM_set_only_copy(cddm, &CD_MASK_BAREMESH);
|
||||
|
||||
subdm = subsurf_dm_create_local(scene,
|
||||
|
||||
@@ -430,7 +430,6 @@ void BKE_object_free_derived_caches(Object *ob)
|
||||
MEM_SAFE_FREE(ob->runtime.bb);
|
||||
|
||||
object_update_from_subsurf_ccg(ob);
|
||||
BKE_object_free_derived_mesh_caches(ob);
|
||||
|
||||
/* Restore initial pointer. */
|
||||
if (ob->runtime.mesh_orig != NULL) {
|
||||
@@ -457,20 +456,6 @@ void BKE_object_free_derived_caches(Object *ob)
|
||||
DRW_gpencil_freecache(ob);
|
||||
}
|
||||
|
||||
void BKE_object_free_derived_mesh_caches(struct Object *ob)
|
||||
{
|
||||
if (ob->derivedFinal) {
|
||||
ob->derivedFinal->needsFree = 1;
|
||||
ob->derivedFinal->release(ob->derivedFinal);
|
||||
ob->derivedFinal = NULL;
|
||||
}
|
||||
if (ob->derivedDeform) {
|
||||
ob->derivedDeform->needsFree = 1;
|
||||
ob->derivedDeform->release(ob->derivedDeform);
|
||||
ob->derivedDeform = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void BKE_object_free_caches(Object *object)
|
||||
{
|
||||
ModifierData *md;
|
||||
@@ -1427,9 +1412,6 @@ void BKE_object_copy_data(Main *bmain, Object *ob_dst, const Object *ob_src, con
|
||||
|
||||
BKE_object_copy_particlesystems(ob_dst, ob_src, flag_subdata);
|
||||
|
||||
ob_dst->derivedDeform = NULL;
|
||||
ob_dst->derivedFinal = NULL;
|
||||
|
||||
BLI_listbase_clear((ListBase *)&ob_dst->drawdata);
|
||||
BLI_listbase_clear(&ob_dst->pc_ids);
|
||||
|
||||
|
||||
@@ -6220,8 +6220,6 @@ static void direct_link_object(FileData *fd, Object *ob)
|
||||
BKE_object_empty_draw_type_set(ob, ob->empty_drawtype);
|
||||
}
|
||||
|
||||
ob->derivedDeform = NULL;
|
||||
ob->derivedFinal = NULL;
|
||||
BKE_object_runtime_reset(ob);
|
||||
link_list(fd, &ob->pc_ids);
|
||||
|
||||
|
||||
@@ -374,8 +374,6 @@ typedef struct Object {
|
||||
struct FluidsimSettings *fluidsimSettings
|
||||
DNA_DEPRECATED; // XXX deprecated... replaced by mantaflow, keep for readfile
|
||||
|
||||
struct DerivedMesh *derivedDeform, *derivedFinal;
|
||||
|
||||
ListBase pc_ids;
|
||||
|
||||
/** Settings for Bullet rigid body. */
|
||||
|
||||
Reference in New Issue
Block a user