diff options
author | Jacques Lucke <jacques@blender.org> | 2021-05-20 13:29:06 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-05-20 13:29:06 +0300 |
commit | 3e3ecc329caa25285a4bb6cfbb69f4eb40797fe4 (patch) | |
tree | 54c947003f7ba17e485c5f2a9111c87eb8d5dad4 /source/blender/makesrna/intern/rna_nodetree.c | |
parent | f41a753e7514bbeb92a7effbaaaa76b4cbfd2511 (diff) |
Geometry Nodes: new Material input node
This node is similar to the Value and Vector node.
It just provides a way to use the same material in multiple nodes
without exposing it outside of a node group.
Differential Revision: https://developer.blender.org/D11305
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 6cb893d1657..49abb892acc 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -9858,6 +9858,19 @@ static void def_geo_attribute_transfer(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } +static void def_geo_input_material(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "id"); + RNA_def_property_struct_type(prop, "Material"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); + RNA_def_property_ui_text(prop, "Material", ""); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); +} + /* -------------------------------------------------------------------------- */ static void rna_def_shader_node(BlenderRNA *brna) |