Merge branch 'blender-v3.3-release'

This commit is contained in:
Jacques Lucke 2022-08-19 16:25:41 +02:00
commit 35a41a49a8
4 changed files with 21 additions and 2 deletions

View File

@ -338,12 +338,14 @@ class CurvesGeometry : public ::CurvesGeometry {
/** Calculates the data described by #evaluated_lengths_for_curve if necessary. */
void ensure_evaluated_lengths() const;
void ensure_can_interpolate_to_evaluated() const;
/**
* Evaluate a generic data to the standard evaluated points of a specific curve,
* defined by the resolution attribute or other factors, depending on the curve type.
*
* \warning This function expects offsets to the evaluated points for each curve to be
* calculated. That can be ensured with #ensure_evaluated_offsets.
* calculated. That can be ensured with #ensure_can_interpolate_to_evaluated.
*/
void interpolate_to_evaluated(int curve_index, GSpan src, GMutableSpan dst) const;
/**

View File

@ -939,6 +939,12 @@ void CurvesGeometry::ensure_evaluated_lengths() const
this->runtime->length_cache_dirty = false;
}
void CurvesGeometry::ensure_can_interpolate_to_evaluated() const
{
this->ensure_evaluated_offsets();
this->ensure_nurbs_basis_cache();
}
/** \} */
/* -------------------------------------------------------------------- */

View File

@ -2341,6 +2341,17 @@ static TreeTraversalAction outliner_find_objects_to_delete(TreeElement *te, void
return TRAVERSE_SKIP_CHILDS;
}
/* Do not allow to delete children objects of an override collection. */
TreeElement *te_parent = te->parent;
if (outliner_is_collection_tree_element(te_parent)) {
TreeStoreElem *tselem_parent = TREESTORE(te_parent);
ID *id_parent = tselem_parent->id;
BLI_assert(GS(id_parent->name) == ID_GR);
if (ID_IS_OVERRIDE_LIBRARY_REAL(id_parent)) {
return TRAVERSE_SKIP_CHILDS;
}
}
ID *id = tselem->id;
if (ID_IS_OVERRIDE_LIBRARY_REAL(id)) {

View File

@ -368,7 +368,7 @@ Curves *resample_to_evaluated(const CurveComponent &src_component,
dst_curves.fill_curve_types(selection, CURVE_TYPE_POLY);
MutableSpan<int> dst_offsets = dst_curves.offsets_for_write();
src_curves.ensure_evaluated_offsets();
src_curves.ensure_can_interpolate_to_evaluated();
threading::parallel_for(selection.index_range(), 4096, [&](IndexRange range) {
for (const int i : selection.slice(range)) {
dst_offsets[i] = src_curves.evaluated_points_for_curve(i).size();