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
path: root/intern
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-02-20 13:33:43 +0300
committerJacques Lucke <jacques@blender.org>2021-02-20 13:33:43 +0300
commit5dced2a0636a7f3db73be09139cf8abd952612e7 (patch)
treed1f191658954c95be4087d979efb14a2f940b64c /intern
parent173b6b792cf95fb9eb20ec760b28469d46b0ff52 (diff)
Geometry Nodes: expose float2 attribute in rna
This also fixes the issue reported in T85651. Differential Revision: https://developer.blender.org/D10477
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/blender_mesh.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index 182aefa82ae..c7b49354d53 100644
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@ -430,6 +430,16 @@ static void attr_create_generic(Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, bool
});
break;
}
+ case BL::Attribute::data_type_FLOAT2: {
+ BL::Float2Attribute b_float2_attribute{b_attribute};
+ Attribute *attr = attributes.add(name, TypeFloat2, element);
+ float2 *data = attr->data_float2();
+ fill_generic_attribute(b_mesh, data, element, [&](int i) {
+ BL::Array<float, 2> v = b_float2_attribute.data[i].vector();
+ return make_float2(v[0], v[1]);
+ });
+ break;
+ }
default:
/* Not supported. */
break;