diff options
author | Jacques Lucke <jacques@blender.org> | 2021-05-21 10:43:55 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-05-21 10:43:55 +0300 |
commit | c154b078b5297b53cdc2aa5fbbc3f9d51dcac527 (patch) | |
tree | b369bef4c93ee2ffff31d7af8782339718000557 /source/blender/blenkernel | |
parent | aa6f0f3d1fddb276391f384d0a69e509c927341f (diff) |
Geometry Nodes: new Material Replace node
This node can change all faces that use a specific material to use a
different material. Using this node is significantly more efficient
than creating a selection from all faces with a specific material
index and then using the Material Assign node.
Ref T88055.
Differential Revision: https://developer.blender.org/D11325
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.cc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index a08a2edd5f6..6bebf74824d 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -1425,6 +1425,7 @@ int ntreeTexExecTree(struct bNodeTree *ntree, #define GEO_NODE_ATTRIBUTE_VECTOR_ROTATE 1048 #define GEO_NODE_MATERIAL_ASSIGN 1049 #define GEO_NODE_INPUT_MATERIAL 1050 +#define GEO_NODE_MATERIAL_REPLACE 1051 /** \} */ diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index 6405888d5be..643dc58af18 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -5057,6 +5057,7 @@ static void registerGeometryNodes() register_node_type_geo_is_viewport(); register_node_type_geo_join_geometry(); register_node_type_geo_material_assign(); + register_node_type_geo_material_replace(); register_node_type_geo_mesh_primitive_circle(); register_node_type_geo_mesh_primitive_cone(); register_node_type_geo_mesh_primitive_cube(); |