Cleanup: misc DrivedMesh stuff.
This commit is contained in:
parent
befd87ac62
commit
b1e86ff385
|
@ -60,7 +60,6 @@
|
|||
#include "BKE_anim.h"
|
||||
#include "BKE_constraint.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BKE_deform.h"
|
||||
#include "BKE_displist.h"
|
||||
#include "BKE_idprop.h"
|
||||
|
|
|
@ -1233,7 +1233,7 @@ static void shapekey_layers_to_keyblocks(Mesh *mesh_src, Mesh *mesh_dst, int act
|
|||
cos = CustomData_get_layer_n(&mesh_src->vdata, CD_SHAPEKEY, i);
|
||||
kb->totelem = mesh_src->totvert;
|
||||
|
||||
kb->data = kbcos = MEM_malloc_arrayN(kb->totelem, 3 * sizeof(float), "kbcos DerivedMesh.c");
|
||||
kb->data = kbcos = MEM_malloc_arrayN(kb->totelem, 3 * sizeof(float), __func__);
|
||||
if (kb->uid == actshape_uid) {
|
||||
MVert *mvert = mesh_src->mvert;
|
||||
|
||||
|
@ -1254,7 +1254,7 @@ static void shapekey_layers_to_keyblocks(Mesh *mesh_src, Mesh *mesh_dst, int act
|
|||
MEM_freeN(kb->data);
|
||||
|
||||
kb->totelem = mesh_src->totvert;
|
||||
kb->data = MEM_calloc_arrayN(kb->totelem, 3 * sizeof(float), "kb->data derivedmesh.c");
|
||||
kb->data = MEM_calloc_arrayN(kb->totelem, 3 * sizeof(float), __func__);
|
||||
fprintf(stderr, "%s: lost a shapekey layer: '%s'! (bmesh internal error)\n", __func__, kb->name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -166,7 +166,7 @@ void BKE_object_handle_data_update(
|
|||
/* TODO(sergey): Only used by legacy depsgraph. */
|
||||
if (adt) {
|
||||
/* evaluate drivers - datalevel */
|
||||
/* XXX: for mesh types, should we push this to derivedmesh instead? */
|
||||
/* XXX: for mesh types, should we push this to evaluated mesh instead? */
|
||||
BKE_animsys_evaluate_animdata(depsgraph, scene, data_id, adt, ctime, ADT_RECALC_DRIVERS);
|
||||
}
|
||||
|
||||
|
|
|
@ -719,7 +719,7 @@ void BKE_sculptsession_bm_to_me(Object *ob, bool reorder)
|
|||
if (ob && ob->sculpt) {
|
||||
sculptsession_bm_to_me_update_data_only(ob, reorder);
|
||||
|
||||
/* ensure the objects DerivedMesh mesh doesn't hold onto arrays now realloc'd in the mesh [#34473] */
|
||||
/* ensure the objects evaluated mesh doesn't hold onto arrays now realloc'd in the mesh [#34473] */
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
}
|
||||
}
|
||||
|
@ -857,7 +857,7 @@ static bool sculpt_modifiers_active(Scene *scene, Sculpt *sd, Object *ob)
|
|||
}
|
||||
|
||||
/**
|
||||
* \param need_mask So the DerivedMesh thats returned has mask data
|
||||
* \param need_mask So taht the evaluated mesh that is returned has mask data.
|
||||
*/
|
||||
void BKE_sculpt_update_mesh_elements(
|
||||
Depsgraph *depsgraph, Scene *scene, Sculpt *sd, Object *ob,
|
||||
|
@ -1107,7 +1107,7 @@ static bool check_sculpt_object_deformed(Object *object, const bool for_construc
|
|||
|
||||
/* Active modifiers means extra deformation, which can't be handled correct
|
||||
* on birth of PBVH and sculpt "layer" levels, so use PBVH only for internal brush
|
||||
* stuff and show final DerivedMesh so user would see actual object shape.
|
||||
* stuff and show final evaluated mesh so user would see actual object shape.
|
||||
*/
|
||||
deformed |= object->sculpt->modifiers_active;
|
||||
|
||||
|
@ -1151,7 +1151,7 @@ PBVH *BKE_sculpt_object_pbvh_ensure(Object *ob, Mesh *me_eval_deform)
|
|||
}
|
||||
|
||||
/* always build pbvh from original mesh, and only use it for drawing if
|
||||
* this derivedmesh is just original mesh. it's the multires subsurf dm
|
||||
* this evaluated mesh is just original mesh. it's the multires subsurf dm
|
||||
* that this is actually for, to support a pbvh on a modified mesh */
|
||||
if (!pbvh && ob->type == OB_MESH) {
|
||||
Mesh *me = BKE_object_get_original_mesh(ob);
|
||||
|
|
|
@ -300,7 +300,7 @@ static void shrinkwrap_calc_normal_projection_cb_ex(
|
|||
}
|
||||
|
||||
if (calc->vert) {
|
||||
/* calc->vert contains verts from derivedMesh */
|
||||
/* calc->vert contains verts from evaluated mesh. */
|
||||
/* this coordinated are deformed by vertexCos only for normal projection (to get correct normals) */
|
||||
/* for other cases calc->varts contains undeformed coordinates and vertexCos should be used */
|
||||
if (calc->smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL) {
|
||||
|
|
Loading…
Reference in New Issue