[Bf-blender-cvs] [17260c9b9a2] master: Fix T85963: Combine and separate XYZ nodes don't work on instances
Hans Goudey
noreply at git.blender.org
Wed Feb 24 23:11:29 CET 2021
Commit: 17260c9b9a2c591e5269b5025f884630f7aa66c6
Author: Hans Goudey
Date: Wed Feb 24 16:11:21 2021 -0600
Branches: master
https://developer.blender.org/rB17260c9b9a2c591e5269b5025f884630f7aa66c6
Fix T85963: Combine and separate XYZ nodes don't work on instances
They were missing the `geometry_set_realize_instances` function used to
make any input instances real for writing.
===================================================================
M source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_separate_xyz.cc
===================================================================
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc
index 564668af274..9c5c7e270b1 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc
@@ -121,6 +121,8 @@ static void geo_node_attribute_combine_xyz_exec(GeoNodeExecParams params)
{
GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry");
+ geometry_set = geometry_set_realize_instances(geometry_set);
+
if (geometry_set.has<MeshComponent>()) {
combine_attributes(geometry_set.get_component_for_write<MeshComponent>(), params);
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_separate_xyz.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_separate_xyz.cc
index 0ba89562ec1..55b933e8582 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_separate_xyz.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_separate_xyz.cc
@@ -147,6 +147,8 @@ static void geo_node_attribute_separate_xyz_exec(GeoNodeExecParams params)
{
GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry");
+ geometry_set = geometry_set_realize_instances(geometry_set);
+
if (geometry_set.has<MeshComponent>()) {
separate_attribute(geometry_set.get_component_for_write<MeshComponent>(), params);
}
More information about the Bf-blender-cvs
mailing list