diff options
author | Jacques Lucke <jacques@blender.org> | 2021-01-21 18:47:03 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-01-21 18:49:06 +0300 |
commit | 425e706921a8f986921b8b9c429874fed98e9a10 (patch) | |
tree | 88275db9e9ec65cd84c210a03799b285f1a0671f /source/blender/makesrna/intern/rna_nodetree.c | |
parent | a92ebab5da3bcbe3ee1b87348e51f6bcb347b881 (diff) |
Geometry Nodes: new Attribute Sample Texture node
This node allows sampling a texture for every vertex based on some
mapping attribute. Typical attribute names are the name of a uv map
(e.g. "UVMap") and "position". However, every attribute that can be
converted to a vector implicitly is supported.
It should be noted that as of right now, uv map attributes can only be
accessed after a Point Distribute node.
Ref T82584.
Differential Revision: https://developer.blender.org/D10121
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 1cd3593e4a4..1a83dcf674c 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -8862,6 +8862,19 @@ static void def_geo_point_translate(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); } +static void def_geo_attribute_sample_texture(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "id"); + RNA_def_property_struct_type(prop, "Texture"); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); + RNA_def_property_ui_text(prop, "Texture", "Texture to sample values from"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update_relations"); +} + static void def_geo_object_info(StructRNA *srna) { PropertyRNA *prop; |