diff options
author | Jacques Lucke <jacques@blender.org> | 2021-04-08 18:35:06 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-04-08 18:35:37 +0300 |
commit | c6ff722a1fcc632eacebcfc94417df466742ce5f (patch) | |
tree | 0b86327190d845c1d6b6975434caf5e2d3ac2528 /source/blender/blenkernel/intern/geometry_set.cc | |
parent | 5e77ff79ccdaffb2df4d54c97f17359c017c9b85 (diff) |
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
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_set.cc')
-rw-r--r-- | source/blender/blenkernel/intern/geometry_set.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/geometry_set.cc b/source/blender/blenkernel/intern/geometry_set.cc index 3b027c05f39..fd86f4e550c 100644 --- a/source/blender/blenkernel/intern/geometry_set.cc +++ b/source/blender/blenkernel/intern/geometry_set.cc @@ -207,6 +207,19 @@ void GeometrySet::clear() components_.clear(); } +/* Make sure that the geometry can be cached. This does not ensure ownership of object/collection + * instances. */ +void GeometrySet::ensure_owns_direct_data() +{ + for (GeometryComponentType type : components_.keys()) { + const GeometryComponent *component = this->get_component_for_read(type); + if (!component->owns_direct_data()) { + GeometryComponent &component_for_write = this->get_component_for_write(type); + component_for_write.ensure_owns_direct_data(); + } + } +} + /* Returns a read-only mesh or null. */ const Mesh *GeometrySet::get_mesh_for_read() const { |