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:
authorJacques Lucke <jacques@blender.org>2021-03-19 22:35:48 +0300
committerJacques Lucke <jacques@blender.org>2021-03-19 23:13:10 +0300
commit48731f45c248a368e4d52b5a136bcfd04a401b65 (patch)
tree89f9a463e2f8588f1a3dd3d458e4f7b6eb55a349 /source/blender/modifiers
parentb96acd0663b589e5519a97c4f435d37e507fb8c1 (diff)
Nodes: provide access to type specific data through node tree ref
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_nodes.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 003002e5fac..14264847a1a 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -586,12 +586,12 @@ class GeometryNodesEvaluator {
void *buffer = allocator_.allocate(type.size(), type.alignment());
if (bsocket->type == SOCK_OBJECT) {
- Object *object = ((bNodeSocketValueObject *)bsocket->default_value)->value;
+ Object *object = socket->default_value<bNodeSocketValueObject>()->value;
PersistentObjectHandle object_handle = handle_map_.lookup(object);
new (buffer) PersistentObjectHandle(object_handle);
}
else if (bsocket->type == SOCK_COLLECTION) {
- Collection *collection = ((bNodeSocketValueCollection *)bsocket->default_value)->value;
+ Collection *collection = socket->default_value<bNodeSocketValueCollection>()->value;
PersistentCollectionHandle collection_handle = handle_map_.lookup(collection);
new (buffer) PersistentCollectionHandle(collection_handle);
}