diff options
author | Johnny Matthews <johnny.matthews@gmail.com> | 2022-06-06 19:50:13 +0300 |
---|---|---|
committer | Johnny Matthews <johnny.matthews@gmail.com> | 2022-06-06 19:50:13 +0300 |
commit | 3a57f5a9cff5ccdc3a7732529fe0c9bfd2ba30bb (patch) | |
tree | 4ee45b2c2cf111e951bc12778649d29f2edaa60f /release | |
parent | f700aa67ac67ac1e5996618074f32df30dfccccd (diff) |
Geometry Nodes: Instance Rotation Node
A field input node for the rotation of each top-level instance transform.
The rotation can be set with the "Rotate Instances" node, but previously
could not be retrieved.
Differential Revision: https://developer.blender.org/D15131
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/nodeitems_builtins.py | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py index 48ba7ea99f2..37e59d328f6 100644 --- a/release/scripts/startup/nodeitems_builtins.py +++ b/release/scripts/startup/nodeitems_builtins.py @@ -182,6 +182,21 @@ def geometry_input_node_items(context): yield NodeItem("GeometryNodeInputRadius") yield NodeItem("GeometryNodeInputSceneTime") +# Custom Menu for Geometry Node Instance Nodes. +def geometry_instance_node_items(context): + if context is None: + return + space = context.space_data + if not space: + return + yield NodeItem("GeometryNodeInstanceOnPoints") + yield NodeItem("GeometryNodeInstancesToPoints") + yield NodeItem("GeometryNodeRealizeInstances") + yield NodeItem("GeometryNodeRotateInstances") + yield NodeItem("GeometryNodeScaleInstances") + yield NodeItem("GeometryNodeTranslateInstances") + yield NodeItemCustom(draw=lambda self, layout, context: layout.separator()) + yield NodeItem("GeometryNodeInputInstanceRotation") # Custom Menu for Material Nodes. def geometry_material_node_items(context): @@ -635,14 +650,7 @@ geometry_node_categories = [ ]), GeometryNodeCategory("GEO_GEOMETRY", "Geometry", items=geometry_node_items), GeometryNodeCategory("GEO_INPUT", "Input", items=geometry_input_node_items), - GeometryNodeCategory("GEO_INSTANCE", "Instances", items=[ - NodeItem("GeometryNodeInstanceOnPoints"), - NodeItem("GeometryNodeInstancesToPoints"), - NodeItem("GeometryNodeRealizeInstances"), - NodeItem("GeometryNodeRotateInstances"), - NodeItem("GeometryNodeScaleInstances"), - NodeItem("GeometryNodeTranslateInstances"), - ]), + GeometryNodeCategory("GEO_INSTANCE", "Instances", items=geometry_instance_node_items), GeometryNodeCategory("GEO_MATERIAL", "Material", items=geometry_material_node_items), GeometryNodeCategory("GEO_MESH", "Mesh", items=mesh_node_items), GeometryNodeCategory("GEO_PRIMITIVES_MESH", "Mesh Primitives", items=[ |