Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/displist.cc
| Show First 20 Lines • Show All 1,518 Lines • ▼ Show 20 Lines | if (geometry.has_curve()) { | ||||
| * added to the curve here, it will also contain a copy of the original curve's data. This is | * added to the curve here, it will also contain a copy of the original curve's data. This is | ||||
| * essential, because it maintains the expected behavior for evaluated curve data from before | * essential, because it maintains the expected behavior for evaluated curve data from before | ||||
| * the CurveEval data type was introduced, when an evaluated object's curve data was just a | * the CurveEval data type was introduced, when an evaluated object's curve data was just a | ||||
| * copy of the original curve and everything else ended up in #CurveCache. */ | * copy of the original curve and everything else ended up in #CurveCache. */ | ||||
| CurveComponent &curve_component = geometry.get_component_for_write<CurveComponent>(); | CurveComponent &curve_component = geometry.get_component_for_write<CurveComponent>(); | ||||
| cow_curve.curve_eval = curve_component.get_for_write(); | cow_curve.curve_eval = curve_component.get_for_write(); | ||||
| BKE_object_eval_assign_data(ob, &cow_curve.id, false); | BKE_object_eval_assign_data(ob, &cow_curve.id, false); | ||||
| } | } | ||||
| else if (geometry.has_mesh()) { | |||||
| /* Most areas of Blender don't yet know how to look in #geometry_set_eval for evaluated mesh | |||||
| * data, and look in #data_eval instead. When the object evaluates to a curve, that field | |||||
| * must be used for the evaluated curve data, but otherwise we can use the field to store a | |||||
| * pointer to the mesh, so more areas can retrieve the mesh. */ | |||||
| MeshComponent &mesh_component = geometry.get_component_for_write<MeshComponent>(); | |||||
| Mesh *mesh_eval = mesh_component.get_for_write(); | |||||
| BKE_object_eval_assign_data(ob, &mesh_eval->id, false); | |||||
| } | |||||
| ob->runtime.geometry_set_eval = new GeometrySet(std::move(geometry)); | ob->runtime.geometry_set_eval = new GeometrySet(std::move(geometry)); | ||||
| } | } | ||||
| boundbox_displist_object(ob); | boundbox_displist_object(ob); | ||||
| } | } | ||||
| 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]) | ||||
| ▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines | |||||