From c6ff722a1fcc632eacebcfc94417df466742ce5f Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 8 Apr 2021 17:35:06 +0200 Subject: Spreadsheet: support showing data of specific node Previously, the spreadsheet editor could only show data of the original and of the final evaluated object. Now it is possible to show the data at some intermediate stages too. For that the mode has to be set to "Node" in the spreadsheet editor. Furthermore, the preview of a specific node has to be activated by clicking the new icon in the header of geometry nodes. The exact ui of this feature might be refined in upcoming commits. It is already very useful for debugging node groups in it's current state though. Differential Revision: https://developer.blender.org/D10875 --- .../blender/blenkernel/intern/geometry_component_volume.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/blender/blenkernel/intern/geometry_component_volume.cc') diff --git a/source/blender/blenkernel/intern/geometry_component_volume.cc b/source/blender/blenkernel/intern/geometry_component_volume.cc index fd2327e0bf5..94ed07a63de 100644 --- a/source/blender/blenkernel/intern/geometry_component_volume.cc +++ b/source/blender/blenkernel/intern/geometry_component_volume.cc @@ -97,4 +97,18 @@ Volume *VolumeComponent::get_for_write() return volume_; } +bool VolumeComponent::owns_direct_data() const +{ + return ownership_ == GeometryOwnershipType::Owned; +} + +void VolumeComponent::ensure_owns_direct_data() +{ + BLI_assert(this->is_mutable()); + if (ownership_ != GeometryOwnershipType::Owned) { + volume_ = BKE_volume_copy_for_eval(volume_, false); + ownership_ = GeometryOwnershipType::Owned; + } +} + /** \} */ -- cgit v1.2.3