Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-08-19 17:25:41 +0300
committerJacques Lucke <jacques@blender.org>2022-08-19 17:25:41 +0300
commit35a41a49a8e0c77e3efce80609fb8af9b20e9768 (patch)
tree1a7087e3bc696afe326e8851a6d2f0a08ec74347 /source
parente4f1d719080ab15f4a33034a1eccacace4600b04 (diff)
parent16084066009ed954761b7652edd926c00733a437 (diff)
Merge branch 'blender-v3.3-release'
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_curves.hh4
-rw-r--r--source/blender/blenkernel/intern/curves_geometry.cc6
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.cc11
-rw-r--r--source/blender/geometry/intern/resample_curves.cc2
4 files changed, 21 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh
index fc8a00af4a1..4c2e68af650 100644
--- a/source/blender/blenkernel/BKE_curves.hh
+++ b/source/blender/blenkernel/BKE_curves.hh
@@ -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;
/**
diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc
index 6fdcb56fc91..e60523c23da 100644
--- a/source/blender/blenkernel/intern/curves_geometry.cc
+++ b/source/blender/blenkernel/intern/curves_geometry.cc
@@ -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();
+}
+
/** \} */
/* -------------------------------------------------------------------- */
diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index be0b011345f..4c2ec5508e9 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -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)) {
diff --git a/source/blender/geometry/intern/resample_curves.cc b/source/blender/geometry/intern/resample_curves.cc
index e252e28805e..e4cb99a9eac 100644
--- a/source/blender/geometry/intern/resample_curves.cc
+++ b/source/blender/geometry/intern/resample_curves.cc
@@ -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();