diff options
author | Jacques Lucke <jacques@blender.org> | 2021-01-14 14:44:37 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-01-14 14:44:37 +0300 |
commit | 10423d462a4b4219c4f86d095258cb7287ee1560 (patch) | |
tree | 840d8a813fc86f6b6aa6f741f7b1d8babfd2bf04 /source | |
parent | 442b6e5e09510e938dba558bed5bd125ffe4a0c1 (diff) |
Geometry Nodes: output color from Attribute Color Ramp node
The other output types did not work currently anyway.
There is not a significant benefit in somehow deducing the output
attribute type from the existing attribute types.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc index 5d126328988..2aca9ed581c 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc @@ -37,9 +37,10 @@ static void execute_on_component(const GeoNodeExecParams ¶ms, GeometryCompon const bNode &bnode = params.node(); NodeAttributeColorRamp *node_storage = (NodeAttributeColorRamp *)bnode.storage; - /* Use the type of the input attribute, but create a color attribute if it doesn't exist yet. */ - const CustomDataType result_type = params.get_input_attribute_data_type( - "Attribute", component, CD_PROP_COLOR); + /* Always output a color attribute for now. We might want to allow users to customize. + * Using the type of an existing attribute could work, but does not have a real benefit + * currently. */ + const CustomDataType result_type = CD_PROP_COLOR; const std::string result_name = params.get_input<std::string>("Result"); /* Once we support more domains at the user level, we have to decide how the result domain is |