Cleanup: Fix outdated comments referring to DispList
This commit is contained in:
@@ -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);
|
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)
|
* The main object update call, for object matrix, constraints, keys and modifiers.
|
||||||
* requires flags to be set!
|
* Requires flags to be set!
|
||||||
*
|
*
|
||||||
* Ideally we shouldn't have to pass the rigid body world,
|
* Ideally we shouldn't have to pass the rigid body world,
|
||||||
* but need bigger restructuring to avoid id.
|
* but need bigger restructuring to avoid id.
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ bool BKE_displist_surfindex_get(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ****************** Make #DispList ********************* */
|
|
||||||
#ifdef __INTEL_COMPILER
|
#ifdef __INTEL_COMPILER
|
||||||
/* ICC with the optimization -02 causes crashes. */
|
/* ICC with the optimization -02 causes crashes. */
|
||||||
# pragma intel optimization_level 1
|
# pragma intel optimization_level 1
|
||||||
@@ -1334,7 +1333,7 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph,
|
|||||||
|
|
||||||
if (geometry.has_curves()) {
|
if (geometry.has_curves()) {
|
||||||
/* Create a copy of the original curve and add necessary pointers to evaluated and edit mode
|
/* 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
|
* - 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
|
* have a copy of the original curve data. (Any evaluated data was placed in
|
||||||
* #Object.runtime.curve_cache).
|
* #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])
|
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) {
|
LISTBASE_FOREACH (const DispList *, dl, dispbase) {
|
||||||
const int tot = dl->type == DL_INDEX3 ? dl->nr : dl->nr * dl->parts;
|
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]);
|
minmax_v3v3_v3(min, max, &dl->verts[i * 3]);
|
||||||
}
|
}
|
||||||
if (tot != 0) {
|
if (tot != 0) {
|
||||||
doit = true;
|
empty = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!doit) {
|
if (empty) {
|
||||||
/* there's no geometry in displist, use zero-sized boundbox */
|
|
||||||
zero_v3(min);
|
zero_v3(min);
|
||||||
zero_v3(max);
|
zero_v3(max);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,8 @@
|
|||||||
/** \file
|
/** \file
|
||||||
* \ingroup bke
|
* \ingroup bke
|
||||||
*
|
*
|
||||||
* MetaBalls are created from a single Object (with a name without number in it),
|
* MetaBalls are created from a single Object (with a name without number in it).
|
||||||
* here the DispList and BoundBox also is located.
|
|
||||||
* All objects with the same name (but with a number in it) are added to this.
|
* 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>
|
#include <cctype>
|
||||||
|
|||||||
@@ -2591,7 +2591,7 @@ static void scene_graph_update_tagged(Depsgraph *depsgraph, Main *bmain, bool on
|
|||||||
// DEG_debug_graph_relations_validate(depsgraph, bmain, scene);
|
// DEG_debug_graph_relations_validate(depsgraph, bmain, scene);
|
||||||
/* Flush editing data if needed. */
|
/* Flush editing data if needed. */
|
||||||
prepare_mesh_for_viewport_render(bmain, view_layer);
|
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. */
|
* by depsgraph or manual, no layer check here, gets correct flushed. */
|
||||||
DEG_evaluate_on_refresh(depsgraph);
|
DEG_evaluate_on_refresh(depsgraph);
|
||||||
/* Update sound system. */
|
/* 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_image_editors_update_frame(bmain, scene->r.cfra);
|
||||||
BKE_sound_set_cfra(scene->r.cfra);
|
BKE_sound_set_cfra(scene->r.cfra);
|
||||||
DEG_graph_relations_update(depsgraph);
|
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.
|
* 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
|
* NOTE: Only update for new frame on first iteration. Second iteration is for ensuring user
|
||||||
|
|||||||
@@ -989,7 +989,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
|
|||||||
int a, tot;
|
int a, tot;
|
||||||
|
|
||||||
/* shape keys are no longer applied to the mesh itself, but rather
|
/* 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. */
|
* shape key is always set in the mesh coordinates. */
|
||||||
for (me = bmain->meshes.first; me; me = me->id.next) {
|
for (me = bmain->meshes.first; me; me = me->id.next) {
|
||||||
if ((key = blo_do_versions_newlibadr(fd, lib, me->key)) && key->refkey) {
|
if ((key = blo_do_versions_newlibadr(fd, lib, me->key)) && key->refkey) {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ enum class NodeType {
|
|||||||
ANIMATION,
|
ANIMATION,
|
||||||
/* Transform Component (Parenting/Constraints) */
|
/* Transform Component (Parenting/Constraints) */
|
||||||
TRANSFORM,
|
TRANSFORM,
|
||||||
/* Geometry Component (#Mesh / #DispList) */
|
/* Geometry Component (#Mesh, #Curves, etc.) */
|
||||||
GEOMETRY,
|
GEOMETRY,
|
||||||
/* Sequencer Component (Scene Only) */
|
/* Sequencer Component (Scene Only) */
|
||||||
SEQUENCER,
|
SEQUENCER,
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
|
|
||||||
#define SELECT 1
|
#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);
|
static void lattice_batch_cache_clear(Lattice *lt);
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@@ -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
|
/* No assumption should be made that the resulting objects is a mesh, as conversion can
|
||||||
* fail. */
|
* fail. */
|
||||||
object_data_convert_curve_to_mesh(bmain, depsgraph, newob);
|
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);
|
BKE_object_free_curve_cache(newob);
|
||||||
}
|
}
|
||||||
else if (target == OB_GPENCIL) {
|
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
|
/* No assumption should be made that the resulting objects is a mesh, as conversion can
|
||||||
* fail. */
|
* fail. */
|
||||||
object_data_convert_curve_to_mesh(bmain, depsgraph, newob);
|
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);
|
BKE_object_free_curve_cache(newob);
|
||||||
}
|
}
|
||||||
else if (target == OB_GPENCIL) {
|
else if (target == OB_GPENCIL) {
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ static void rna_Curve_bevelObject_set(PointerRNA *ptr,
|
|||||||
|
|
||||||
if (ob) {
|
if (ob) {
|
||||||
/* If bevel object has got the save curve, as object, for which it's set as bevobj,
|
/* 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) {
|
if (ob->type == OB_CURVES_LEGACY && ob->data != cu) {
|
||||||
cu->bevobj = ob;
|
cu->bevobj = ob;
|
||||||
id_lib_extern((ID *)ob);
|
id_lib_extern((ID *)ob);
|
||||||
@@ -512,7 +512,7 @@ static void rna_Curve_taperObject_set(PointerRNA *ptr,
|
|||||||
|
|
||||||
if (ob) {
|
if (ob) {
|
||||||
/* If taper object has got the save curve, as object, for which it's set as bevobj,
|
/* 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) {
|
if (ob->type == OB_CURVES_LEGACY && ob->data != cu) {
|
||||||
cu->taperobj = ob;
|
cu->taperobj = ob;
|
||||||
id_lib_extern((ID *)ob);
|
id_lib_extern((ID *)ob);
|
||||||
|
|||||||
Reference in New Issue
Block a user