From 3e3ecc329caa25285a4bb6cfbb69f4eb40797fe4 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 20 May 2021 12:29:06 +0200 Subject: 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 --- source/blender/makesrna/intern/rna_nodetree.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') 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) -- cgit v1.2.3