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/BKE_geometry_set.hh | |
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/BKE_geometry_set.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.hh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh index ab126ecb152..2ce8ce5749f 100644 --- a/source/blender/blenkernel/BKE_geometry_set.hh +++ b/source/blender/blenkernel/BKE_geometry_set.hh @@ -141,6 +141,12 @@ class GeometryComponent { /* The returned component should be of the same type as the type this is called on. */ virtual GeometryComponent *copy() const = 0; + /* Direct data is everything except for instances of objects/collections. + * If this returns true, the geometry set can be cached and is still valid after e.g. modifier + * evaluation ends. Instances can only be valid as long as the data they instance is valid. */ + virtual bool owns_direct_data() const = 0; + virtual void ensure_owns_direct_data() = 0; + void user_add() const; void user_remove() const; bool is_mutable() const; @@ -315,6 +321,8 @@ struct GeometrySet { void clear(); + void ensure_owns_direct_data(); + /* Utility methods for creation. */ static GeometrySet create_with_mesh( Mesh *mesh, GeometryOwnershipType ownership = GeometryOwnershipType::Owned); @@ -374,6 +382,9 @@ class MeshComponent : public GeometryComponent { bool is_empty() const final; + bool owns_direct_data() const override; + void ensure_owns_direct_data() override; + static constexpr inline GeometryComponentType static_type = GEO_COMPONENT_TYPE_MESH; private: @@ -404,6 +415,9 @@ class PointCloudComponent : public GeometryComponent { bool is_empty() const final; + bool owns_direct_data() const override; + void ensure_owns_direct_data() override; + static constexpr inline GeometryComponentType static_type = GEO_COMPONENT_TYPE_POINT_CLOUD; private: @@ -444,6 +458,9 @@ class InstancesComponent : public GeometryComponent { bool is_empty() const final; + bool owns_direct_data() const override; + void ensure_owns_direct_data() override; + static constexpr inline GeometryComponentType static_type = GEO_COMPONENT_TYPE_INSTANCES; }; @@ -466,5 +483,8 @@ class VolumeComponent : public GeometryComponent { const Volume *get_for_read() const; Volume *get_for_write(); + bool owns_direct_data() const override; + void ensure_owns_direct_data() override; + static constexpr inline GeometryComponentType static_type = GEO_COMPONENT_TYPE_VOLUME; }; |