Cleanup: Fix outdated comments referring to DispList

This commit is contained in:
Hans Goudey 2022-08-17 11:57:21 -04:00
parent 316194c384
commit 6718afdc8a
Notes: blender-bot 2023-02-14 07:25:46 +01:00
Referenced by commit fc26e3fe19, Cleanup: Fix typo in comment
9 changed files with 15 additions and 26 deletions

View File

@ -474,8 +474,8 @@ void BKE_object_handle_data_update(struct Depsgraph *depsgraph,
*/
void BKE_object_handle_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
/**
* The main object update call, for object matrix, constraints, keys and #DispList (modifiers)
* requires flags to be set!
* The main object update call, for object matrix, constraints, keys and modifiers.
* Requires flags to be set!
*
* Ideally we shouldn't have to pass the rigid body world,
* but need bigger restructuring to avoid id.

View File

@ -114,7 +114,6 @@ bool BKE_displist_surfindex_get(
return true;
}
/* ****************** Make #DispList ********************* */
#ifdef __INTEL_COMPILER
/* ICC with the optimization -02 causes crashes. */
# pragma intel optimization_level 1
@ -1334,7 +1333,7 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph,
if (geometry.has_curves()) {
/* Create a copy of the original curve and add necessary pointers to evaluated and edit mode
* data. This is needed for a few reasons:
* data. This is neeOB_SURFded for a few reasons:
* - Existing code from before curve evaluation was changed to use #GeometrySet expected to
* have a copy of the original curve data. (Any evaluated data was placed in
* #Object.runtime.curve_cache).
@ -1364,7 +1363,7 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph,
void BKE_displist_minmax(const ListBase *dispbase, float min[3], float max[3])
{
bool doit = false;
bool empty = true;
LISTBASE_FOREACH (const DispList *, dl, dispbase) {
const int tot = dl->type == DL_INDEX3 ? dl->nr : dl->nr * dl->parts;
@ -1372,12 +1371,11 @@ void BKE_displist_minmax(const ListBase *dispbase, float min[3], float max[3])
minmax_v3v3_v3(min, max, &dl->verts[i * 3]);
}
if (tot != 0) {
doit = true;
empty = false;
}
}
if (!doit) {
/* there's no geometry in displist, use zero-sized boundbox */
if (empty) {
zero_v3(min);
zero_v3(max);
}

View File

@ -4,11 +4,8 @@
/** \file
* \ingroup bke
*
* MetaBalls are created from a single Object (with a name without number in it),
* here the DispList and BoundBox also is located.
* MetaBalls are created from a single Object (with a name without number in it).
* All objects with the same name (but with a number in it) are added to this.
*
* texture coordinates are patched within the displist
*/
#include <cctype>

View File

@ -2591,7 +2591,7 @@ static void scene_graph_update_tagged(Depsgraph *depsgraph, Main *bmain, bool on
// DEG_debug_graph_relations_validate(depsgraph, bmain, scene);
/* Flush editing data if needed. */
prepare_mesh_for_viewport_render(bmain, view_layer);
/* Update all objects: drivers, matrices, #DispList, etc. flags set
/* Update all objects: drivers, matrices, etc. flags set
* by depsgraph or manual, no layer check here, gets correct flushed. */
DEG_evaluate_on_refresh(depsgraph);
/* Update sound system. */
@ -2666,7 +2666,7 @@ void BKE_scene_graph_update_for_newframe_ex(Depsgraph *depsgraph, const bool cle
BKE_image_editors_update_frame(bmain, scene->r.cfra);
BKE_sound_set_cfra(scene->r.cfra);
DEG_graph_relations_update(depsgraph);
/* Update all objects: drivers, matrices, #DispList, etc. flags set
/* Update all objects: drivers, matrices, etc. flags set
* by depsgraph or manual, no layer check here, gets correct flushed.
*
* NOTE: Only update for new frame on first iteration. Second iteration is for ensuring user

View File

@ -989,7 +989,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
int a, tot;
/* shape keys are no longer applied to the mesh itself, but rather
* to the evaluated #Mesh / #DispList, so here we ensure that the basis
* to the evaluated #Mesh, so here we ensure that the basis
* shape key is always set in the mesh coordinates. */
for (me = bmain->meshes.first; me; me = me->id.next) {
if ((key = blo_do_versions_newlibadr(fd, lib, me->key)) && key->refkey) {

View File

@ -64,7 +64,7 @@ enum class NodeType {
ANIMATION,
/* Transform Component (Parenting/Constraints) */
TRANSFORM,
/* Geometry Component (#Mesh / #DispList) */
/* Geometry Component (#Mesh, #Curves, etc.) */
GEOMETRY,
/* Sequencer Component (Scene Only) */
SEQUENCER,

View File

@ -27,12 +27,6 @@
#define SELECT 1
/**
* TODO
* - 'DispList' is currently not used
* (we could avoid using since it will be removed)
*/
static void lattice_batch_cache_clear(Lattice *lt);
/* ---------------------------------------------------------------------- */

View File

@ -3237,7 +3237,7 @@ static int object_convert_exec(bContext *C, wmOperator *op)
/* No assumption should be made that the resulting objects is a mesh, as conversion can
* fail. */
object_data_convert_curve_to_mesh(bmain, depsgraph, newob);
/* meshes doesn't use displist */
/* Meshes doesn't use the "curve cache". */
BKE_object_free_curve_cache(newob);
}
else if (target == OB_GPENCIL) {
@ -3272,7 +3272,7 @@ static int object_convert_exec(bContext *C, wmOperator *op)
/* No assumption should be made that the resulting objects is a mesh, as conversion can
* fail. */
object_data_convert_curve_to_mesh(bmain, depsgraph, newob);
/* meshes doesn't use displist */
/* Meshes don't use the "curve cache". */
BKE_object_free_curve_cache(newob);
}
else if (target == OB_GPENCIL) {

View File

@ -437,7 +437,7 @@ static void rna_Curve_bevelObject_set(PointerRNA *ptr,
if (ob) {
/* If bevel object has got the save curve, as object, for which it's set as bevobj,
* there could be infinity loop in #DispList calculation. */
* there could be an infinite loop in curve evaluation. */
if (ob->type == OB_CURVES_LEGACY && ob->data != cu) {
cu->bevobj = ob;
id_lib_extern((ID *)ob);
@ -512,7 +512,7 @@ static void rna_Curve_taperObject_set(PointerRNA *ptr,
if (ob) {
/* If taper object has got the save curve, as object, for which it's set as bevobj,
* there could be infinity loop in #DispList calculation. */
* there could be an infinite loop in curve evaluation. */
if (ob->type == OB_CURVES_LEGACY && ob->data != cu) {
cu->taperobj = ob;
id_lib_extern((ID *)ob);