From 9009ac2c3d62e0d30d96b8d35ff5ff620cfe053b Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 5 Jul 2021 10:46:00 +0200 Subject: Geometry Nodes: new Viewer node This adds a viewer node similar to the one in the compositor. The icon in the headers of nodes is removed because it served the same purpose and is not necessary anymore. Node outputs can be connected to the active viewer using ctrl+shift+LMB, just like in the compositor. Right now this collides with the shortcut used in the node wrangler addon, which will be changed separately. As of now, the viewed geometry is only visible in the spreadsheet. Viewport visualization will be added separately. There are a couple of benefits of using a viewer node compared to the old approach with the icon in the node header: * Better support for nodes that have more than one geometry output. * It's more consistent with the compositor. * If attributes become decoupled from geometry in the future, the viewer can have a separate input for the attribute to visualize. * The viewer node could potentially have visualization settings. * Allows to keep "visualization points" around by having multiple viewer nodes. * Less visual clutter in node headers. Differential Revision: https://developer.blender.org/D11470 --- source/blender/nodes/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/nodes/CMakeLists.txt') diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 77d2f043b64..49e40060c0f 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -206,6 +206,7 @@ set(SRC geometry/nodes/node_geo_switch.cc geometry/nodes/node_geo_transform.cc geometry/nodes/node_geo_triangulate.cc + geometry/nodes/node_geo_viewer.cc geometry/nodes/node_geo_volume_to_mesh.cc geometry/node_geometry_exec.cc geometry/node_geometry_tree.cc -- cgit v1.2.3 From fd0370acc2129fbc3a07a776bca024ba4512b654 Mon Sep 17 00:00:00 2001 From: Nikhil Shringarpurey Date: Mon, 5 Jul 2021 11:52:10 -0500 Subject: Geometry Nodes: Add explicit Float to Int conversion node This patch adds a very simple node that explicitly converts a float to an int. While this may seem redundant, it would offer 2 benefits to the current requirement to use implicit float conversions: 1. It makes the node tree's intent more clear and self-documenting (especially if changes in the future require integer inputs). 2. It eliminates undefined behavior in current/future nodes from float inputs by guaranteeing that the input is an integer. The node offers a variety of rounding techniques to make it more flexible. Differential Revision: https://developer.blender.org/D11700 --- source/blender/nodes/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/nodes/CMakeLists.txt') diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 49e40060c0f..4d3eee51a27 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -134,6 +134,7 @@ set(SRC function/nodes/node_fn_boolean_math.cc function/nodes/node_fn_float_compare.cc + function/nodes/node_fn_float_to_int.cc function/nodes/node_fn_input_string.cc function/nodes/node_fn_input_vector.cc function/nodes/node_fn_random_float.cc -- cgit v1.2.3 From 29d6750134c4e42a2c5ff12040aa78f98720cf5c Mon Sep 17 00:00:00 2001 From: Johnny Matthews Date: Mon, 5 Jul 2021 12:27:12 -0500 Subject: Geometry Nodes: Curve Primitive Line This node creates a poly spline line in one of 2 modes: - Line between two points - Start Point, Direction, and Length Both modes create splines with only start and endpoints. A resample node can be used afterward to increase the point count. Differential Revision: https://developer.blender.org/D11769 --- source/blender/nodes/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/nodes/CMakeLists.txt') diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 4d3eee51a27..74ba85426c6 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -167,6 +167,7 @@ set(SRC geometry/nodes/node_geo_curve_length.cc geometry/nodes/node_geo_curve_primitive_bezier_segment.cc geometry/nodes/node_geo_curve_primitive_circle.cc + geometry/nodes/node_geo_curve_primitive_line.cc geometry/nodes/node_geo_curve_primitive_quadratic_bezier.cc geometry/nodes/node_geo_curve_primitive_spiral.cc geometry/nodes/node_geo_curve_primitive_star.cc -- cgit v1.2.3 From 63a8b3b9720cf2660cb7a6cd431fdd3014534c4a Mon Sep 17 00:00:00 2001 From: Angus Stanton Date: Tue, 6 Jul 2021 22:24:04 -0500 Subject: Geometry Nodes: Curve Endpoints Node This node is quite similar to the curve to points node, but creates points for only the start and end of each spline. This is a separate node because the sampling from the curve to points node don't apply, and just for ease of use. All attributes from the curves are copied, including the data for instancing: tangents, normals, and the derived rotations. One simple use case is to make round caps on curves by instancinghalves of a sphere on each end of the splines. Differential Revision: https://developer.blender.org/D11719 --- source/blender/nodes/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/nodes/CMakeLists.txt') diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 74ba85426c6..603d4e32ee1 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -164,6 +164,7 @@ set(SRC geometry/nodes/node_geo_collection_info.cc geometry/nodes/node_geo_common.cc geometry/nodes/node_geo_convex_hull.cc + geometry/nodes/node_geo_curve_endpoints.cc geometry/nodes/node_geo_curve_length.cc geometry/nodes/node_geo_curve_primitive_bezier_segment.cc geometry/nodes/node_geo_curve_primitive_circle.cc -- cgit v1.2.3 From 0b1050bf09eb68e634392b1fc5d3758c95e4f5c1 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 6 Jul 2021 23:00:27 -0500 Subject: Geometry Nodes: Rename nodes for clarity between mesh and curve Rename the mesh circle to "Mesh Circle", mesh line to "Mesh Line", and mesh subdivide to "Mesh Subdivide". Previously they looked exactly the same in the search menu, and the nodes themselves had the same label. This is a "deep" rename that also renames internal defines and function names to match the UI. --- source/blender/nodes/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/nodes/CMakeLists.txt') diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 603d4e32ee1..b04755592a7 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -204,7 +204,7 @@ set(SRC geometry/nodes/node_geo_raycast.cc geometry/nodes/node_geo_select_by_material.cc geometry/nodes/node_geo_separate_components.cc - geometry/nodes/node_geo_subdivide.cc + geometry/nodes/node_geo_mesh_subdivide.cc geometry/nodes/node_geo_subdivision_surface.cc geometry/nodes/node_geo_switch.cc geometry/nodes/node_geo_transform.cc -- cgit v1.2.3 From 8f94724f2246c9f4c2659f4380dc43fcda28d759 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 6 Jul 2021 23:33:02 -0500 Subject: Cleanup: Sort nodes alphabetically --- source/blender/nodes/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/nodes/CMakeLists.txt') diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index b04755592a7..a3a52753880 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -172,11 +172,11 @@ set(SRC geometry/nodes/node_geo_curve_primitive_quadratic_bezier.cc geometry/nodes/node_geo_curve_primitive_spiral.cc geometry/nodes/node_geo_curve_primitive_star.cc - geometry/nodes/node_geo_curve_to_mesh.cc - geometry/nodes/node_geo_curve_to_points.cc geometry/nodes/node_geo_curve_resample.cc geometry/nodes/node_geo_curve_reverse.cc geometry/nodes/node_geo_curve_subdivide.cc + geometry/nodes/node_geo_curve_to_mesh.cc + geometry/nodes/node_geo_curve_to_points.cc geometry/nodes/node_geo_delete_geometry.cc geometry/nodes/node_geo_edge_split.cc geometry/nodes/node_geo_input_material.cc @@ -192,6 +192,7 @@ set(SRC geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc geometry/nodes/node_geo_mesh_primitive_line.cc geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc + geometry/nodes/node_geo_mesh_subdivide.cc geometry/nodes/node_geo_mesh_to_curve.cc geometry/nodes/node_geo_object_info.cc geometry/nodes/node_geo_point_distribute.cc @@ -204,7 +205,6 @@ set(SRC geometry/nodes/node_geo_raycast.cc geometry/nodes/node_geo_select_by_material.cc geometry/nodes/node_geo_separate_components.cc - geometry/nodes/node_geo_mesh_subdivide.cc geometry/nodes/node_geo_subdivision_surface.cc geometry/nodes/node_geo_switch.cc geometry/nodes/node_geo_transform.cc -- cgit v1.2.3