diff options
author | Jacques Lucke <jacques@blender.org> | 2022-10-03 17:06:29 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-10-03 17:06:29 +0300 |
commit | e65598b4fa2059ae6293464f5158eb341a84b814 (patch) | |
tree | e22936eeb2808f854b615cc26a55e37695be28c3 /source/blender/makesrna | |
parent | 31ae3a501284f3c777e6c28b6faec53b86246739 (diff) |
Geometry Nodes: new Sample UV Surface node
This node allows sampling an attribute on a mesh surface based
on a UV coordinate. Internally, this has to do a "reverse uv lookup",
i.e. the node has to find the polygon that corresponds to the uv
coordinate. Therefore, the uv map of the mesh should not have
overlapping faces.
Differential Revision: https://developer.blender.org/D15440
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 4ec2799186e..ed5a3563fb5 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -10462,6 +10462,18 @@ static void def_geo_sample_nearest(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } +static void def_geo_sample_uv_surface(StructRNA *srna) +{ + PropertyRNA *prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, rna_enum_attribute_type_items); + RNA_def_property_enum_funcs( + prop, NULL, NULL, "rna_GeometryNodeAttributeType_type_with_socket_itemf"); + RNA_def_property_enum_default(prop, CD_PROP_FLOAT); + RNA_def_property_ui_text(prop, "Data Type", ""); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); +} + static void def_geo_input_material(StructRNA *srna) { PropertyRNA *prop; |