Cleanup: Remove unused function

Also remove two DispList references I missed in the previous commit.
This commit is contained in:
Hans Goudey 2022-08-17 12:03:26 -04:00
parent 6718afdc8a
commit a73cc81646
4 changed files with 2 additions and 38 deletions

View File

@ -58,7 +58,6 @@ struct Object *BKE_mball_basis_find(struct Scene *scene, struct Object *ob);
* Return or compute bounding-box for given meta-ball object.
*/
struct BoundBox *BKE_mball_boundbox_get(struct Object *ob);
float *BKE_mball_make_orco(struct Object *ob, struct ListBase *dispbase);
/**
* Copy some properties from a meta-ball obdata to all other meta-ball obdata belonging to the same

View File

@ -279,41 +279,6 @@ BoundBox *BKE_mball_boundbox_get(Object *ob)
return ob->runtime.bb;
}
float *BKE_mball_make_orco(Object *ob, ListBase *dispbase)
{
BoundBox *bb;
DispList *dl;
float *data, *orco, *orcodata;
float loc[3], size[3];
int a;
/* restore size and loc */
bb = ob->runtime.bb;
loc[0] = (bb->vec[0][0] + bb->vec[4][0]) / 2.0f;
size[0] = bb->vec[4][0] - loc[0];
loc[1] = (bb->vec[0][1] + bb->vec[2][1]) / 2.0f;
size[1] = bb->vec[2][1] - loc[1];
loc[2] = (bb->vec[0][2] + bb->vec[1][2]) / 2.0f;
size[2] = bb->vec[1][2] - loc[2];
dl = static_cast<DispList *>(dispbase->first);
orcodata = static_cast<float *>(MEM_mallocN(sizeof(float[3]) * dl->nr, __func__));
data = dl->verts;
orco = orcodata;
a = dl->nr;
while (a--) {
orco[0] = (data[0] - loc[0]) / size[0];
orco[1] = (data[1] - loc[1]) / size[1];
orco[2] = (data[2] - loc[2]) / size[2];
data += 3;
orco += 3;
}
return orcodata;
}
bool BKE_mball_is_basis(const Object *ob)
{
/* Meta-Ball Basis Notes from Blender-2.5x

View File

@ -101,7 +101,7 @@ typedef enum eDepsObjectComponentType {
DEG_OB_COMP_ANIMATION,
/* Transform Component (Parenting/Constraints) */
DEG_OB_COMP_TRANSFORM,
/* Geometry Component (#Mesh / #DispList). */
/* Geometry Component (#Mesh / #Curves, etc.). */
DEG_OB_COMP_GEOMETRY,
/* Evaluation-Related Outer Types (with Sub-data) */

View File

@ -2215,7 +2215,7 @@ void DepsgraphRelationBuilder::build_shapekeys(Key *key)
* ==========================
*
* The evaluation of geometry on objects is as follows:
* - The actual evaluated of the derived geometry (e.g. Mesh, DispList)
* - The actual evaluated of the derived geometry (e.g. #Mesh, #Curves, etc.)
* occurs in the Geometry component of the object which references this.
* This includes modifiers, and the temporary "ubereval" for geometry.
* Therefore, each user of a piece of shared geometry data ends up evaluating