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
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2021-10-24 15:31:22 +0300
committerHoward Trickey <howard.trickey@gmail.com>2021-10-24 15:31:22 +0300
commit1aa953bd1913c81b22c80a00edbf4ad88a32c52f (patch)
tree7fa65e43d5a9bac6496555b723f37e0031e2737e /source/blender/blenkernel/BKE_geometry_set.hh
parentfc171c1be9da36485e892339b86dc8d4251914af (diff)
parent6ce383a9dfba5c49a48676c3a651804fde3dfe34 (diff)
Merge branch 'master' into soc-2020-io-performance
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.hh')
-rw-r--r--source/blender/blenkernel/BKE_geometry_set.hh27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index b36d15578a7..f57765e373b 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -357,6 +357,15 @@ struct GeometrySet {
GeometryOwnershipType ownership = GeometryOwnershipType::Owned);
void replace_curve(CurveEval *curve,
GeometryOwnershipType ownership = GeometryOwnershipType::Owned);
+
+ private:
+ /* Utility to retrieve a mutable component without creating it. */
+ GeometryComponent *get_component_ptr(GeometryComponentType type);
+ template<typename Component> Component *get_component_ptr()
+ {
+ BLI_STATIC_ASSERT(is_geometry_component_v<Component>, "");
+ return static_cast<Component *>(get_component_ptr(Component::static_type));
+ }
};
/** A geometry component that can store a mesh. */
@@ -751,6 +760,24 @@ class AttributeFieldInput : public fn::FieldInput {
bool is_equal_to(const fn::FieldNode &other) const override;
};
+class IDAttributeFieldInput : public fn::FieldInput {
+ public:
+ IDAttributeFieldInput() : fn::FieldInput(CPPType::get<int>())
+ {
+ }
+
+ static fn::Field<int> Create();
+
+ const GVArray *get_varray_for_context(const fn::FieldContext &context,
+ IndexMask mask,
+ ResourceScope &scope) const override;
+
+ std::string socket_inspection_name() const override;
+
+ uint64_t hash() const override;
+ bool is_equal_to(const fn::FieldNode &other) const override;
+};
+
class AnonymousAttributeFieldInput : public fn::FieldInput {
private:
/**