diff --git a/scripts/startup/bl_ui/node_add_menu_geometry.py b/scripts/startup/bl_ui/node_add_menu_geometry.py index 7212dbfe38c..351e96452dc 100644 --- a/scripts/startup/bl_ui/node_add_menu_geometry.py +++ b/scripts/startup/bl_ui/node_add_menu_geometry.py @@ -177,200 +177,201 @@ class NODE_MT_geometry_node_GEO_GEOMETRY_READ(Menu): layout = self.layout node_add_menu.add_node_type(layout, "GeometryNodeInputID") node_add_menu.add_node_type(layout, "GeometryNodeInputIndex") node_add_menu.add_node_type(layout, "GeometryNodeInputNamedAttribute") node_add_menu.add_node_type(layout, "GeometryNodeInputNormal") node_add_menu.add_node_type(layout, "GeometryNodeInputPosition") node_add_menu.add_node_type(layout, "GeometryNodeInputRadius") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_GEOMETRY_WRITE(Menu): bl_idname = "NODE_MT_geometry_node_GEO_GEOMETRY_WRITE" bl_label = "Write" def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "GeometryNodeSetID") node_add_menu.add_node_type(layout, "GeometryNodeSetPosition") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_GEOMETRY_OPERATIONS(Menu): bl_idname = "NODE_MT_geometry_node_GEO_GEOMETRY_OPERATIONS" bl_label = "Operations" def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "GeometryNodeBoundBox") node_add_menu.add_node_type(layout, "GeometryNodeConvexHull") node_add_menu.add_node_type(layout, "GeometryNodeDeleteGeometry") node_add_menu.add_node_type(layout, "GeometryNodeDuplicateElements") node_add_menu.add_node_type(layout, "GeometryNodeMergeByDistance") node_add_menu.add_node_type(layout, "GeometryNodeTransform") layout.separator() node_add_menu.add_node_type(layout, "GeometryNodeSeparateComponents") node_add_menu.add_node_type(layout, "GeometryNodeSeparateGeometry") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_GEOMETRY_SAMPLE(Menu): bl_idname = "NODE_MT_geometry_node_GEO_GEOMETRY_SAMPLE" bl_label = "Sample" def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "GeometryNodeProximity") node_add_menu.add_node_type(layout, "GeometryNodeRaycast") node_add_menu.add_node_type(layout, "GeometryNodeSampleIndex") node_add_menu.add_node_type(layout, "GeometryNodeSampleNearest") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_INPUT(Menu): bl_idname = "NODE_MT_geometry_node_GEO_INPUT" bl_label = "Input" def draw(self, _context): layout = self.layout layout.menu("NODE_MT_geometry_node_GEO_INPUT_CONSTANT") layout.menu("NODE_MT_geometry_node_GEO_INPUT_GROUP") layout.menu("NODE_MT_geometry_node_GEO_INPUT_SCENE") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_INPUT_CONSTANT(Menu): bl_idname = "NODE_MT_geometry_node_GEO_INPUT_CONSTANT" bl_label = "Constant" bl_translation_context = i18n_contexts.id_nodetree def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "FunctionNodeInputBool") node_add_menu.add_node_type(layout, "FunctionNodeInputColor") node_add_menu.add_node_type(layout, "GeometryNodeInputImage") node_add_menu.add_node_type(layout, "FunctionNodeInputInt") node_add_menu.add_node_type(layout, "GeometryNodeInputMaterial") node_add_menu.add_node_type(layout, "FunctionNodeInputString") node_add_menu.add_node_type(layout, "ShaderNodeValue") node_add_menu.add_node_type(layout, "FunctionNodeInputVector") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_INPUT_GROUP(Menu): bl_idname = "NODE_MT_geometry_node_GEO_INPUT_GROUP" bl_label = "Group" def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "NodeGroupInput") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_INPUT_SCENE(Menu): bl_idname = "NODE_MT_geometry_node_GEO_INPUT_SCENE" bl_label = "Scene" def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "GeometryNodeCollectionInfo") node_add_menu.add_node_type(layout, "GeometryNodeImageInfo") + node_add_menu.add_node_type(layout, "GeometryNodeIsEditMode") node_add_menu.add_node_type(layout, "GeometryNodeIsViewport") node_add_menu.add_node_type(layout, "GeometryNodeObjectInfo") node_add_menu.add_node_type(layout, "GeometryNodeSelfObject") node_add_menu.add_node_type(layout, "GeometryNodeInputSceneTime") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_INSTANCE(Menu): bl_idname = "NODE_MT_geometry_node_GEO_INSTANCE" bl_label = "Instances" def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "GeometryNodeInstanceOnPoints") node_add_menu.add_node_type(layout, "GeometryNodeInstancesToPoints") layout.separator() node_add_menu.add_node_type(layout, "GeometryNodeRealizeInstances") node_add_menu.add_node_type(layout, "GeometryNodeRotateInstances") node_add_menu.add_node_type(layout, "GeometryNodeScaleInstances") node_add_menu.add_node_type(layout, "GeometryNodeTranslateInstances") layout.separator() node_add_menu.add_node_type(layout, "GeometryNodeInputInstanceRotation") node_add_menu.add_node_type(layout, "GeometryNodeInputInstanceScale") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_MATERIAL(Menu): bl_idname = "NODE_MT_geometry_node_GEO_MATERIAL" bl_label = "Material" def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "GeometryNodeReplaceMaterial") layout.separator() node_add_menu.add_node_type(layout, "GeometryNodeInputMaterialIndex") node_add_menu.add_node_type(layout, "GeometryNodeMaterialSelection") layout.separator() node_add_menu.add_node_type(layout, "GeometryNodeSetMaterial") node_add_menu.add_node_type(layout, "GeometryNodeSetMaterialIndex") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_MESH(Menu): bl_idname = "NODE_MT_geometry_node_GEO_MESH" bl_label = "Mesh" def draw(self, _context): layout = self.layout layout.menu("NODE_MT_geometry_node_GEO_MESH_READ") layout.menu("NODE_MT_geometry_node_GEO_MESH_SAMPLE") layout.menu("NODE_MT_geometry_node_GEO_MESH_WRITE") layout.separator() layout.menu("NODE_MT_geometry_node_GEO_MESH_OPERATIONS") layout.menu("NODE_MT_category_PRIMITIVES_MESH") layout.menu("NODE_MT_geometry_node_mesh_topology") layout.menu("NODE_MT_category_GEO_UV") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_MESH_READ(Menu): bl_idname = "NODE_MT_geometry_node_GEO_MESH_READ" bl_label = "Read" def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "GeometryNodeInputMeshEdgeAngle") node_add_menu.add_node_type(layout, "GeometryNodeInputMeshEdgeNeighbors") node_add_menu.add_node_type(layout, "GeometryNodeInputMeshEdgeVertices") node_add_menu.add_node_type(layout, "GeometryNodeEdgesToFaceGroups") node_add_menu.add_node_type(layout, "GeometryNodeInputMeshFaceArea") node_add_menu.add_node_type(layout, "GeometryNodeInputMeshFaceNeighbors") node_add_menu.add_node_type(layout, "GeometryNodeMeshFaceSetBoundaries") node_add_menu.add_node_type(layout, "GeometryNodeInputMeshFaceIsPlanar") node_add_menu.add_node_type(layout, "GeometryNodeInputShadeSmooth") node_add_menu.add_node_type(layout, "GeometryNodeInputMeshIsland") node_add_menu.add_node_type(layout, "GeometryNodeInputShortestEdgePaths") node_add_menu.add_node_type(layout, "GeometryNodeInputMeshVertexNeighbors") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_MESH_SAMPLE(Menu): bl_idname = "NODE_MT_geometry_node_GEO_MESH_SAMPLE" bl_label = "Sample" def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "GeometryNodeSampleNearestSurface") node_add_menu.add_node_type(layout, "GeometryNodeSampleUVSurface") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) class NODE_MT_geometry_node_GEO_MESH_WRITE(Menu): bl_idname = "NODE_MT_geometry_node_GEO_MESH_WRITE" bl_label = "Write" def draw(self, _context): layout = self.layout node_add_menu.add_node_type(layout, "GeometryNodeSetShadeSmooth") node_add_menu.draw_assets_for_catalog(layout, self.bl_label) diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index a0f6405a6ac..3a7be04d85a 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -1444,161 +1444,162 @@ void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, i #define GEO_NODE_MESH_TO_POINTS 1093 #define GEO_NODE_POINTS_TO_VERTICES 1094 #define GEO_NODE_REVERSE_CURVE 1095 #define GEO_NODE_PROXIMITY 1096 #define GEO_NODE_SUBDIVIDE_CURVE 1097 #define GEO_NODE_INPUT_SPLINE_LENGTH 1098 #define GEO_NODE_CURVE_SPLINE_TYPE 1099 #define GEO_NODE_CURVE_SET_HANDLE_TYPE 1100 #define GEO_NODE_POINTS_TO_VOLUME 1101 #define GEO_NODE_CURVE_HANDLE_TYPE_SELECTION 1102 #define GEO_NODE_DELETE_GEOMETRY 1103 #define GEO_NODE_SEPARATE_GEOMETRY 1104 #define GEO_NODE_INPUT_RADIUS 1105 #define GEO_NODE_INPUT_CURVE_TILT 1106 #define GEO_NODE_INPUT_CURVE_HANDLES 1107 #define GEO_NODE_INPUT_SHADE_SMOOTH 1108 #define GEO_NODE_INPUT_SPLINE_RESOLUTION 1109 #define GEO_NODE_INPUT_SPLINE_CYCLIC 1110 #define GEO_NODE_SET_CURVE_RADIUS 1111 #define GEO_NODE_SET_CURVE_TILT 1112 #define GEO_NODE_SET_CURVE_HANDLES 1113 #define GEO_NODE_SET_SHADE_SMOOTH 1114 #define GEO_NODE_SET_SPLINE_RESOLUTION 1115 #define GEO_NODE_SET_SPLINE_CYCLIC 1116 #define GEO_NODE_SET_POINT_RADIUS 1117 #define GEO_NODE_INPUT_MATERIAL_INDEX 1118 #define GEO_NODE_SET_MATERIAL_INDEX 1119 #define GEO_NODE_TRANSLATE_INSTANCES 1120 #define GEO_NODE_SCALE_INSTANCES 1121 #define GEO_NODE_ROTATE_INSTANCES 1122 #define GEO_NODE_SPLIT_EDGES 1123 #define GEO_NODE_MESH_TO_CURVE 1124 #define GEO_NODE_TRANSFER_ATTRIBUTE_DEPRECATED 1125 #define GEO_NODE_SUBDIVISION_SURFACE 1126 #define GEO_NODE_CURVE_ENDPOINT_SELECTION 1127 #define GEO_NODE_RAYCAST 1128 #define GEO_NODE_CURVE_TO_POINTS 1130 #define GEO_NODE_INSTANCES_TO_POINTS 1131 #define GEO_NODE_IMAGE_TEXTURE 1132 #define GEO_NODE_VOLUME_TO_MESH 1133 #define GEO_NODE_INPUT_ID 1134 #define GEO_NODE_SET_ID 1135 #define GEO_NODE_ATTRIBUTE_DOMAIN_SIZE 1136 #define GEO_NODE_DUAL_MESH 1137 #define GEO_NODE_INPUT_MESH_EDGE_VERTICES 1138 #define GEO_NODE_INPUT_MESH_FACE_AREA 1139 #define GEO_NODE_INPUT_MESH_FACE_NEIGHBORS 1140 #define GEO_NODE_INPUT_MESH_VERTEX_NEIGHBORS 1141 #define GEO_NODE_GEOMETRY_TO_INSTANCE 1142 #define GEO_NODE_INPUT_MESH_EDGE_NEIGHBORS 1143 #define GEO_NODE_INPUT_MESH_ISLAND 1144 #define GEO_NODE_INPUT_SCENE_TIME 1145 #define GEO_NODE_ACCUMULATE_FIELD 1146 #define GEO_NODE_INPUT_MESH_EDGE_ANGLE 1147 #define GEO_NODE_EVALUATE_AT_INDEX 1148 #define GEO_NODE_CURVE_PRIMITIVE_ARC 1149 #define GEO_NODE_FLIP_FACES 1150 #define GEO_NODE_SCALE_ELEMENTS 1151 #define GEO_NODE_EXTRUDE_MESH 1152 #define GEO_NODE_MERGE_BY_DISTANCE 1153 #define GEO_NODE_DUPLICATE_ELEMENTS 1154 #define GEO_NODE_INPUT_MESH_FACE_IS_PLANAR 1155 #define GEO_NODE_STORE_NAMED_ATTRIBUTE 1156 #define GEO_NODE_INPUT_NAMED_ATTRIBUTE 1157 #define GEO_NODE_REMOVE_ATTRIBUTE 1158 #define GEO_NODE_INPUT_INSTANCE_ROTATION 1159 #define GEO_NODE_INPUT_INSTANCE_SCALE 1160 #define GEO_NODE_VOLUME_CUBE 1161 #define GEO_NODE_POINTS 1162 #define GEO_NODE_EVALUATE_ON_DOMAIN 1163 #define GEO_NODE_MESH_TO_VOLUME 1164 #define GEO_NODE_UV_UNWRAP 1165 #define GEO_NODE_UV_PACK_ISLANDS 1166 #define GEO_NODE_DEFORM_CURVES_ON_SURFACE 1167 #define GEO_NODE_INPUT_SHORTEST_EDGE_PATHS 1168 #define GEO_NODE_EDGE_PATHS_TO_CURVES 1169 #define GEO_NODE_EDGE_PATHS_TO_SELECTION 1170 #define GEO_NODE_MESH_FACE_GROUP_BOUNDARIES 1171 #define GEO_NODE_DISTRIBUTE_POINTS_IN_VOLUME 1172 #define GEO_NODE_SELF_OBJECT 1173 #define GEO_NODE_SAMPLE_INDEX 1174 #define GEO_NODE_SAMPLE_NEAREST 1175 #define GEO_NODE_SAMPLE_NEAREST_SURFACE 1176 #define GEO_NODE_OFFSET_POINT_IN_CURVE 1177 #define GEO_NODE_CURVE_TOPOLOGY_CURVE_OF_POINT 1178 #define GEO_NODE_CURVE_TOPOLOGY_POINTS_OF_CURVE 1179 #define GEO_NODE_MESH_TOPOLOGY_OFFSET_CORNER_IN_FACE 1180 #define GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_FACE 1181 #define GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_VERTEX 1182 #define GEO_NODE_MESH_TOPOLOGY_EDGES_OF_CORNER 1183 #define GEO_NODE_MESH_TOPOLOGY_EDGES_OF_VERTEX 1184 #define GEO_NODE_MESH_TOPOLOGY_FACE_OF_CORNER 1185 #define GEO_NODE_MESH_TOPOLOGY_VERTEX_OF_CORNER 1186 #define GEO_NODE_SAMPLE_UV_SURFACE 1187 #define GEO_NODE_SET_CURVE_NORMAL 1188 #define GEO_NODE_IMAGE_INFO 1189 #define GEO_NODE_BLUR_ATTRIBUTE 1190 #define GEO_NODE_IMAGE 1191 #define GEO_NODE_INTERPOLATE_CURVES 1192 #define GEO_NODE_EDGES_TO_FACE_GROUPS 1193 +#define GEO_NODE_IS_EDIT_MODE 1194 /** \} */ /* -------------------------------------------------------------------- */ /** \name Function Nodes * \{ */ #define FN_NODE_BOOLEAN_MATH 1200 #define FN_NODE_COMPARE 1202 #define FN_NODE_LEGACY_RANDOM_FLOAT 1206 #define FN_NODE_INPUT_VECTOR 1207 #define FN_NODE_INPUT_STRING 1208 #define FN_NODE_FLOAT_TO_INT 1209 #define FN_NODE_VALUE_TO_STRING 1210 #define FN_NODE_STRING_LENGTH 1211 #define FN_NODE_SLICE_STRING 1212 #define FN_NODE_INPUT_SPECIAL_CHARACTERS 1213 #define FN_NODE_RANDOM_VALUE 1214 #define FN_NODE_ROTATE_EULER 1215 #define FN_NODE_ALIGN_EULER_TO_VECTOR 1216 #define FN_NODE_INPUT_COLOR 1217 #define FN_NODE_REPLACE_STRING 1218 #define FN_NODE_INPUT_BOOL 1219 #define FN_NODE_INPUT_INT 1220 #define FN_NODE_SEPARATE_COLOR 1221 #define FN_NODE_COMBINE_COLOR 1222 /** \} */ void BKE_node_system_init(void); void BKE_node_system_exit(void); extern bNodeTreeType NodeTreeTypeUndefined; extern struct bNodeType NodeTypeUndefined; extern struct bNodeSocketType NodeSocketTypeUndefined; #ifdef __cplusplus } #endif #ifdef __cplusplus namespace blender::bke { bNodeSocket *node_find_enabled_socket(bNode &node, eNodeSocketInOut in_out, StringRef name); bNodeSocket *node_find_enabled_input_socket(bNode &node, StringRef name); bNodeSocket *node_find_enabled_output_socket(bNode &node, StringRef name); } // namespace blender::bke #endif #define NODE_STORAGE_FUNCS(StorageT) \ [[maybe_unused]] static StorageT &node_storage(bNode &node) \ { \ return *static_cast(node.storage); \ } \ [[maybe_unused]] static const StorageT &node_storage(const bNode &node) \ { \ return *static_cast(node.storage); \ } diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h index efccef2bed9..9d509254d01 100644 --- a/source/blender/nodes/NOD_static_types.h +++ b/source/blender/nodes/NOD_static_types.h @@ -257,183 +257,184 @@ DefNode(TextureNode, TEX_NODE_PROC+TEX_MARBLE, 0, "TEX_MA DefNode(TextureNode, TEX_NODE_PROC+TEX_CLOUDS, 0, "TEX_CLOUDS", TexClouds, "Clouds", "" ) DefNode(TextureNode, TEX_NODE_PROC+TEX_WOOD, 0, "TEX_WOOD", TexWood, "Wood", "" ) DefNode(TextureNode, TEX_NODE_PROC+TEX_MUSGRAVE, 0, "TEX_MUSGRAVE", TexMusgrave, "Musgrave", "" ) DefNode(TextureNode, TEX_NODE_PROC+TEX_NOISE, 0, "TEX_NOISE", TexNoise, "Noise", "" ) DefNode(TextureNode, TEX_NODE_PROC+TEX_STUCCI, 0, "TEX_STUCCI", TexStucci, "Stucci", "" ) DefNode(TextureNode, TEX_NODE_PROC+TEX_DISTNOISE, 0, "TEX_DISTNOISE", TexDistNoise, "Distorted Noise", "" ) DefNode(FunctionNode, FN_NODE_ALIGN_EULER_TO_VECTOR, def_fn_align_euler_to_vector, "ALIGN_EULER_TO_VECTOR", AlignEulerToVector, "Align Euler to Vector", "") DefNode(FunctionNode, FN_NODE_BOOLEAN_MATH, def_boolean_math, "BOOLEAN_MATH", BooleanMath, "Boolean Math", "") DefNode(FunctionNode, FN_NODE_COMBINE_COLOR, def_fn_combsep_color, "COMBINE_COLOR", CombineColor, "Combine Color", "") DefNode(FunctionNode, FN_NODE_COMPARE, def_compare, "COMPARE", Compare, "Compare", "") DefNode(FunctionNode, FN_NODE_FLOAT_TO_INT, def_float_to_int, "FLOAT_TO_INT", FloatToInt, "Float to Integer", "") DefNode(FunctionNode, FN_NODE_INPUT_BOOL, def_fn_input_bool, "INPUT_BOOL", InputBool, "Boolean", "") DefNode(FunctionNode, FN_NODE_INPUT_COLOR, def_fn_input_color, "INPUT_COLOR", InputColor, "Color", "") DefNode(FunctionNode, FN_NODE_INPUT_INT, def_fn_input_int, "INPUT_INT", InputInt, "Integer", "") DefNode(FunctionNode, FN_NODE_INPUT_SPECIAL_CHARACTERS, 0, "INPUT_SPECIAL_CHARACTERS", InputSpecialCharacters, "Special Characters", "") DefNode(FunctionNode, FN_NODE_INPUT_STRING, def_fn_input_string, "INPUT_STRING", InputString, "String", "") DefNode(FunctionNode, FN_NODE_INPUT_VECTOR, def_fn_input_vector, "INPUT_VECTOR", InputVector, "Vector", "") DefNode(FunctionNode, FN_NODE_RANDOM_VALUE, def_fn_random_value, "RANDOM_VALUE", RandomValue, "Random Value", "") DefNode(FunctionNode, FN_NODE_REPLACE_STRING, 0, "REPLACE_STRING", ReplaceString, "Replace String", "") DefNode(FunctionNode, FN_NODE_ROTATE_EULER, def_fn_rotate_euler, "ROTATE_EULER", RotateEuler, "Rotate Euler", "") DefNode(FunctionNode, FN_NODE_SEPARATE_COLOR, def_fn_combsep_color, "SEPARATE_COLOR", SeparateColor, "Separate Color", "") DefNode(FunctionNode, FN_NODE_SLICE_STRING, 0, "SLICE_STRING", SliceString, "Slice String", "") DefNode(FunctionNode, FN_NODE_STRING_LENGTH, 0, "STRING_LENGTH", StringLength, "String Length", "") DefNode(FunctionNode, FN_NODE_VALUE_TO_STRING, 0, "VALUE_TO_STRING", ValueToString, "Value to String", "") DefNode(GeometryNode, GEO_NODE_ACCUMULATE_FIELD, def_geo_accumulate_field, "ACCUMULATE_FIELD", AccumulateField, "Accumulate Field", "Add the values of an evaluated field together and output the running total for each element") DefNode(GeometryNode, GEO_NODE_ATTRIBUTE_DOMAIN_SIZE, def_geo_attribute_domain_size, "ATTRIBUTE_DOMAIN_SIZE", AttributeDomainSize, "Domain Size", "Retrieve the number of elements in a geometry for each attribute domain") DefNode(GeometryNode, GEO_NODE_ATTRIBUTE_STATISTIC, def_geo_attribute_statistic, "ATTRIBUTE_STATISTIC",AttributeStatistic, "Attribute Statistic","Calculate statistics about a data set from a field evaluated on a geometry") DefNode(GeometryNode, GEO_NODE_BLUR_ATTRIBUTE, def_geo_blur_attribute, "BLUR_ATTRIBUTE", BlurAttribute, "Blur Attribute", "Mix attribute values of neighboring elements") DefNode(GeometryNode, GEO_NODE_BOUNDING_BOX, 0, "BOUNDING_BOX", BoundBox, "Bounding Box", "Calculate the limits of a geometry's positions and generate a box mesh with those dimensions") DefNode(GeometryNode, GEO_NODE_CAPTURE_ATTRIBUTE, def_geo_attribute_capture,"CAPTURE_ATTRIBUTE", CaptureAttribute, "Capture Attribute", "Store the result of a field on a geometry and output the data as a node socket. Allows remembering or interpolating data as the geometry changes, such as positions before deformation") DefNode(GeometryNode, GEO_NODE_COLLECTION_INFO, def_geo_collection_info, "COLLECTION_INFO", CollectionInfo, "Collection Info", "Retrieve geometry instances from a collection") DefNode(GeometryNode, GEO_NODE_CONVEX_HULL, 0, "CONVEX_HULL", ConvexHull, "Convex Hull", "Create a mesh that encloses all points in the input geometry with the smallest number of points") DefNode(GeometryNode, GEO_NODE_CURVE_ENDPOINT_SELECTION, 0, "CURVE_ENDPOINT_SELECTION", CurveEndpointSelection, "Endpoint Selection", "Provide a selection for an arbitrary number of endpoints in each spline") DefNode(GeometryNode, GEO_NODE_CURVE_HANDLE_TYPE_SELECTION, def_geo_curve_handle_type_selection, "CURVE_HANDLE_TYPE_SELECTION", CurveHandleTypeSelection, "Handle Type Selection", "Provide a selection based on the handle types of Bézier control points") DefNode(GeometryNode, GEO_NODE_CURVE_LENGTH, 0, "CURVE_LENGTH", CurveLength, "Curve Length", "Retrieve the length of all splines added together") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_ARC, def_geo_curve_primitive_arc, "CURVE_PRIMITIVE_ARC",CurveArc, "Arc", "Generate a poly spline arc") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_BEZIER_SEGMENT, def_geo_curve_primitive_bezier_segment, "CURVE_PRIMITIVE_BEZIER_SEGMENT", CurvePrimitiveBezierSegment, "Bezier Segment", "Generate a 2D Bézier spline from the given control points and handles") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_CIRCLE,def_geo_curve_primitive_circle, "CURVE_PRIMITIVE_CIRCLE", CurvePrimitiveCircle, "Curve Circle", "Generate a poly spline circle") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_LINE, def_geo_curve_primitive_line, "CURVE_PRIMITIVE_LINE", CurvePrimitiveLine, "Curve Line", "Generate a poly spline line with two points") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_QUADRATIC_BEZIER, 0, "CURVE_PRIMITIVE_QUADRATIC_BEZIER", CurveQuadraticBezier, "Quadratic Bezier", "Generate a poly spline in a parabola shape with control points positions") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_QUADRILATERAL, def_geo_curve_primitive_quadrilateral, "CURVE_PRIMITIVE_QUADRILATERAL", CurvePrimitiveQuadrilateral, "Quadrilateral", "Generate a polygon with four points") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_SPIRAL,0, "CURVE_PRIMITIVE_SPIRAL", CurveSpiral, "Curve Spiral", "Generate a poly spline in a spiral shape") DefNode(GeometryNode, GEO_NODE_CURVE_PRIMITIVE_STAR, 0, "CURVE_PRIMITIVE_STAR", CurveStar, "Star", "Generate a poly spline in a star pattern by connecting alternating points of two circles") DefNode(GeometryNode, GEO_NODE_CURVE_SET_HANDLE_TYPE, def_geo_curve_set_handle_type, "CURVE_SET_HANDLES", CurveSetHandles, "Set Handle Type", "Set the handle type for the control points of a Bézier curve") DefNode(GeometryNode, GEO_NODE_CURVE_SPLINE_PARAMETER,0, "SPLINE_PARAMETER", SplineParameter, "Spline Parameter", "Retrieve how far along each spline a control point is") DefNode(GeometryNode, GEO_NODE_CURVE_SPLINE_TYPE, def_geo_curve_spline_type,"CURVE_SPLINE_TYPE", CurveSplineType, "Set Spline Type", "Change the type of curves") DefNode(GeometryNode, GEO_NODE_CURVE_TO_MESH, 0, "CURVE_TO_MESH", CurveToMesh, "Curve to Mesh", "Convert curves into a mesh, optionally with a custom profile shape defined by curves") DefNode(GeometryNode, GEO_NODE_CURVE_TO_POINTS, def_geo_curve_to_points, "CURVE_TO_POINTS", CurveToPoints, "Curve to Points", "Generate a point cloud by sampling positions along curves") DefNode(GeometryNode, GEO_NODE_CURVE_TOPOLOGY_CURVE_OF_POINT, 0, "CURVE_OF_POINT", CurveOfPoint, "Curve of Point", "Retrieve the curve a control point is part of") DefNode(GeometryNode, GEO_NODE_CURVE_TOPOLOGY_POINTS_OF_CURVE, 0, "POINTS_OF_CURVE", PointsOfCurve, "Points of Curve", "Retrieve a point index within a curve") DefNode(GeometryNode, GEO_NODE_DEFORM_CURVES_ON_SURFACE, 0, "DEFORM_CURVES_ON_SURFACE", DeformCurvesOnSurface, "Deform Curves on Surface", "Translate and rotate curves based on changes between the object's original and evaluated surface mesh") DefNode(GeometryNode, GEO_NODE_DELETE_GEOMETRY, def_geo_delete_geometry, "DELETE_GEOMETRY", DeleteGeometry, "Delete Geometry", "Remove selected elements of a geometry") DefNode(GeometryNode, GEO_NODE_DISTRIBUTE_POINTS_IN_VOLUME, def_geo_distribute_points_in_volume, "DISTRIBUTE_POINTS_IN_VOLUME", DistributePointsInVolume, "Distribute Points in Volume", "Generate points inside a volume") DefNode(GeometryNode, GEO_NODE_DISTRIBUTE_POINTS_ON_FACES, def_geo_distribute_points_on_faces, "DISTRIBUTE_POINTS_ON_FACES", DistributePointsOnFaces, "Distribute Points on Faces", "Generate points spread out on the surface of a mesh") DefNode(GeometryNode, GEO_NODE_DUAL_MESH, 0, "DUAL_MESH", DualMesh, "Dual Mesh", "Convert Faces into vertices and vertices into faces") DefNode(GeometryNode, GEO_NODE_DUPLICATE_ELEMENTS, def_geo_duplicate_elements, "DUPLICATE_ELEMENTS", DuplicateElements, "Duplicate Elements", "Generate an arbitrary number copies of each selected input element") DefNode(GeometryNode, GEO_NODE_EDGE_PATHS_TO_CURVES, 0, "EDGE_PATHS_TO_CURVES", EdgePathsToCurves, "Edge Paths to Curves", "") DefNode(GeometryNode, GEO_NODE_EDGE_PATHS_TO_SELECTION, 0, "EDGE_PATHS_TO_SELECTION", EdgePathsToSelection, "Edge Paths to Selection", "") DefNode(GeometryNode, GEO_NODE_EDGES_TO_FACE_GROUPS, 0, "EDGES_TO_FACE_GROUPS", EdgesToFaceGroups, "Edges to Face Groups", "Group faces into regions surrounded by the selected boundary edges") DefNode(GeometryNode, GEO_NODE_EVALUATE_AT_INDEX, def_geo_evaluate_at_index, "FIELD_AT_INDEX", FieldAtIndex, "Evaluate at Index", "Retrieve data of other elements in the context's geometry") DefNode(GeometryNode, GEO_NODE_EVALUATE_ON_DOMAIN, def_geo_evaluate_on_domain, "FIELD_ON_DOMAIN", FieldOnDomain, "Evaluate on Domain", "Retrieve values from a field on a different domain besides the domain from the context") DefNode(GeometryNode, GEO_NODE_EXTRUDE_MESH, def_geo_extrude_mesh, "EXTRUDE_MESH", ExtrudeMesh, "Extrude Mesh", "Generate new vertices, edges, or faces from selected elements and move them based on an offset while keeping them connected by their boundary") DefNode(GeometryNode, GEO_NODE_FILL_CURVE, def_geo_curve_fill, "FILL_CURVE", FillCurve, "Fill Curve", "Generate a mesh on the XY plane with faces on the inside of input curves") DefNode(GeometryNode, GEO_NODE_FILLET_CURVE, def_geo_curve_fillet, "FILLET_CURVE", FilletCurve, "Fillet Curve", "Round corners by generating circular arcs on each control point") DefNode(GeometryNode, GEO_NODE_FLIP_FACES, 0, "FLIP_FACES", FlipFaces, "Flip Faces", "Reverse the order of the vertices and edges of selected faces, flipping their normal direction") DefNode(GeometryNode, GEO_NODE_GEOMETRY_TO_INSTANCE, 0, "GEOMETRY_TO_INSTANCE", GeometryToInstance, "Geometry to Instance", "Convert each input geometry into an instance, which can be much faster than the Join Geometry node when the inputs are large") DefNode(GeometryNode, GEO_NODE_IMAGE_INFO, 0, "IMAGE_INFO", ImageInfo, "Image Info", "Retrieve information about an image") DefNode(GeometryNode, GEO_NODE_IMAGE_TEXTURE, def_geo_image_texture, "IMAGE_TEXTURE", ImageTexture, "Image Texture", "Sample values from an image texture") DefNode(GeometryNode, GEO_NODE_IMAGE, def_geo_image, "IMAGE", InputImage, "Image", "Input image") DefNode(GeometryNode, GEO_NODE_INPUT_CURVE_HANDLES, 0, "INPUT_CURVE_HANDLES", InputCurveHandlePositions,"Curve Handle Positions", "Retrieve the position of each Bézier control point's handles") DefNode(GeometryNode, GEO_NODE_INPUT_CURVE_TILT, 0, "INPUT_CURVE_TILT", InputCurveTilt, "Curve Tilt", "Retrieve the angle at each control point used to twist the curve's normal around its tangent") DefNode(GeometryNode, GEO_NODE_INPUT_ID, 0, "INPUT_ID", InputID, "ID", "Retrieve a stable random identifier value from the \"id\" attribute on the point domain, or the index if the attribute does not exist") DefNode(GeometryNode, GEO_NODE_INPUT_INDEX, 0, "INDEX", InputIndex, "Index", "Retrieve an integer value indicating the position of each element in the list, starting at zero") DefNode(GeometryNode, GEO_NODE_INPUT_INSTANCE_ROTATION, 0, "INPUT_INSTANCE_ROTATION", InputInstanceRotation, "Instance Rotation", "Retrieve the rotation of each instance in the geometry") DefNode(GeometryNode, GEO_NODE_INPUT_INSTANCE_SCALE, 0, "INPUT_INSTANCE_SCALE", InputInstanceScale, "Instance Scale", "Retrieve the scale of each instance in the geometry") DefNode(GeometryNode, GEO_NODE_INPUT_MATERIAL_INDEX, 0, "INPUT_MATERIAL_INDEX", InputMaterialIndex, "Material Index", "Retrieve the index of the material used for each element in the geometry's list of materials") DefNode(GeometryNode, GEO_NODE_INPUT_MATERIAL, def_geo_input_material, "INPUT_MATERIAL", InputMaterial, "Material", "Output a single material") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_EDGE_ANGLE, 0, "MESH_EDGE_ANGLE", InputMeshEdgeAngle, "Edge Angle", "Calculate the surface area of each face in a mesh") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_EDGE_NEIGHBORS, 0, "MESH_EDGE_NEIGHBORS",InputMeshEdgeNeighbors, "Edge Neighbors", "Retrieve the number of faces that use each edge as one of their sides") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_EDGE_VERTICES, 0, "MESH_EDGE_VERTICES", InputMeshEdgeVertices, "Edge Vertices", "Retrieve topology information relating to each edge of a mesh") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_FACE_AREA, 0, "MESH_FACE_AREA", InputMeshFaceArea, "Face Area", "Calculate the surface area of a mesh's faces") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_FACE_IS_PLANAR, 0, "MESH_FACE_IS_PLANAR", InputMeshFaceIsPlanar, "Is Face Planar", "Retrieve whether all triangles in a face are on the same plane, i.e. whether they have the same normal") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_FACE_NEIGHBORS, 0, "MESH_FACE_NEIGHBORS",InputMeshFaceNeighbors, "Face Neighbors", "Retrieve topology information relating to each face of a mesh") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_ISLAND, 0, "MESH_ISLAND", InputMeshIsland, "Mesh Island", "Retrieve information about separate connected regions in a mesh") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_VERTEX_NEIGHBORS, 0, "MESH_VERTEX_NEIGHBORS", InputMeshVertexNeighbors, "Vertex Neighbors", "Retrieve topology information relating to each vertex of a mesh") DefNode(GeometryNode, GEO_NODE_INPUT_NAMED_ATTRIBUTE, def_geo_input_named_attribute, "INPUT_ATTRIBUTE", InputNamedAttribute, "Named Attribute", "Retrieve the data of a specified attribute") DefNode(GeometryNode, GEO_NODE_INPUT_NORMAL, 0, "INPUT_NORMAL", InputNormal, "Normal", "Retrieve a unit length vector indicating the direction pointing away from the geometry at each element") DefNode(GeometryNode, GEO_NODE_INPUT_POSITION, 0, "POSITION", InputPosition, "Position", "Retrieve a vector indicating the location of each element") DefNode(GeometryNode, GEO_NODE_INPUT_RADIUS, 0, "INPUT_RADIUS", InputRadius, "Radius", "Retrieve the radius at each point on curve or point cloud geometry") DefNode(GeometryNode, GEO_NODE_INPUT_SCENE_TIME, 0, "INPUT_SCENE_TIME", InputSceneTime, "Scene Time", "Retrieve the current time in the scene's animation in units of seconds or frames") DefNode(GeometryNode, GEO_NODE_INPUT_SHADE_SMOOTH, 0, "INPUT_SHADE_SMOOTH", InputShadeSmooth, "Is Shade Smooth", "Retrieve whether each face is marked for smooth shading") DefNode(GeometryNode, GEO_NODE_INPUT_SHORTEST_EDGE_PATHS, 0, "SHORTEST_EDGE_PATHS", InputShortestEdgePaths, "Shortest Edge Paths", "") DefNode(GeometryNode, GEO_NODE_INPUT_SPLINE_CYCLIC, 0, "INPUT_SPLINE_CYCLIC",InputSplineCyclic, "Is Spline Cyclic", "Retrieve whether each spline endpoint connects to the beginning") DefNode(GeometryNode, GEO_NODE_INPUT_SPLINE_LENGTH, 0, "SPLINE_LENGTH", SplineLength, "Spline Length", "Retrieve the total length of each spline, as a distance or as a number of points") DefNode(GeometryNode, GEO_NODE_INPUT_SPLINE_RESOLUTION, 0, "INPUT_SPLINE_RESOLUTION", InputSplineResolution, "Spline Resolution", "Retrieve the number of evaluated points that will be generated for every control point on curves") DefNode(GeometryNode, GEO_NODE_INPUT_TANGENT, 0, "INPUT_TANGENT", InputTangent, "Curve Tangent", "Retrieve the direction of curves at each control point") DefNode(GeometryNode, GEO_NODE_INSTANCE_ON_POINTS, 0, "INSTANCE_ON_POINTS", InstanceOnPoints, "Instance on Points", "Generate a reference to geometry at each of the input points, without duplicating its underlying data") DefNode(GeometryNode, GEO_NODE_INSTANCES_TO_POINTS, 0, "INSTANCES_TO_POINTS",InstancesToPoints, "Instances to Points","Generate points at the origins of instances.\nNote: Nested instances are not affected by this node") +DefNode(GeometryNode, GEO_NODE_IS_EDIT_MODE, 0, "IS_EDIT_MODE", IsEditMode, "Is Edit Mode", "Retrieve whether the nodes are being evaluated within edit mode") DefNode(GeometryNode, GEO_NODE_IS_VIEWPORT, 0, "IS_VIEWPORT", IsViewport, "Is Viewport", "Retrieve whether the nodes are being evaluated for the viewport rather than the final render") DefNode(GeometryNode, GEO_NODE_JOIN_GEOMETRY, 0, "JOIN_GEOMETRY", JoinGeometry, "Join Geometry", "Merge separately generated geometries into a single one") DefNode(GeometryNode, GEO_NODE_MATERIAL_SELECTION, 0, "MATERIAL_SELECTION", MaterialSelection, "Material Selection", "Provide a selection of faces that use the specified material") DefNode(GeometryNode, GEO_NODE_MERGE_BY_DISTANCE, def_geo_merge_by_distance,"MERGE_BY_DISTANCE", MergeByDistance, "Merge by Distance", "Merge vertices or points within a given distance") DefNode(GeometryNode, GEO_NODE_MESH_BOOLEAN, def_geo_boolean, "MESH_BOOLEAN", MeshBoolean, "Mesh Boolean", "Cut, subtract, or join multiple mesh inputs") DefNode(GeometryNode, GEO_NODE_MESH_FACE_GROUP_BOUNDARIES, 0, "MESH_FACE_SET_BOUNDARIES", MeshFaceSetBoundaries, "Face Group Boundaries", "Find edges on the boundaries between groups of faces with the same ID value") DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_CIRCLE, def_geo_mesh_circle, "MESH_PRIMITIVE_CIRCLE", MeshCircle, "Mesh Circle", "Generate a circular ring of edges") DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_CONE, def_geo_mesh_cone, "MESH_PRIMITIVE_CONE",MeshCone, "Cone", "Generate a cone mesh") DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_CUBE, 0, "MESH_PRIMITIVE_CUBE",MeshCube, "Cube", "Generate a cuboid mesh with variable side lengths and subdivisions") DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_CYLINDER, def_geo_mesh_cylinder, "MESH_PRIMITIVE_CYLINDER", MeshCylinder, "Cylinder", "Generate a cylinder mesh") DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_GRID, 0, "MESH_PRIMITIVE_GRID",MeshGrid, "Grid", "Generate a planar mesh on the XY plane") DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_ICO_SPHERE, 0, "MESH_PRIMITIVE_ICO_SPHERE", MeshIcoSphere, "Ico Sphere", "Generate a spherical mesh that consists of equally sized triangles") DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_LINE, def_geo_mesh_line, "MESH_PRIMITIVE_LINE",MeshLine, "Mesh Line", "Generate vertices in a line and connect them with edges") DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_UV_SPHERE, 0, "MESH_PRIMITIVE_UV_SPHERE", MeshUVSphere, "UV Sphere", "Generate a spherical mesh with quads, except for triangles at the top and bottom") DefNode(GeometryNode, GEO_NODE_MESH_TO_CURVE, 0, "MESH_TO_CURVE", MeshToCurve, "Mesh to Curve", "Generate a curve from a mesh") DefNode(GeometryNode, GEO_NODE_MESH_TO_POINTS, def_geo_mesh_to_points, "MESH_TO_POINTS", MeshToPoints, "Mesh to Points", "Generate a point cloud from a mesh's vertices") DefNode(GeometryNode, GEO_NODE_MESH_TO_VOLUME, def_geo_mesh_to_volume, "MESH_TO_VOLUME", MeshToVolume, "Mesh to Volume", "Create a fog volume with the shape of the input mesh's surface") DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_FACE, 0, "CORNERS_OF_FACE", CornersOfFace, "Corners of Face", "Retrieve corners that make up a face") DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_CORNERS_OF_VERTEX, 0, "CORNERS_OF_VERTEX", CornersOfVertex, "Corners of Vertex", "Retrieve face corners connected to vertices") DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_EDGES_OF_CORNER, 0, "EDGES_OF_CORNER", EdgesOfCorner, "Edges of Corner", "Retrieve the edges on both sides of a face corner") DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_EDGES_OF_VERTEX, 0, "EDGES_OF_VERTEX", EdgesOfVertex, "Edges of Vertex", "Retrieve the edges connected to each vertex") DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_FACE_OF_CORNER, 0, "FACE_OF_CORNER", FaceOfCorner, "Face of Corner", "Retrieve the face each face corner is part of") DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_OFFSET_CORNER_IN_FACE, 0, "OFFSET_CORNER_IN_FACE", OffsetCornerInFace, "Offset Corner in Face", "Retrieve corners in the same face as another") DefNode(GeometryNode, GEO_NODE_MESH_TOPOLOGY_VERTEX_OF_CORNER, 0, "VERTEX_OF_CORNER", VertexOfCorner, "Vertex of Corner", "Retrieve the vertex each face corner is attached to") DefNode(GeometryNode, GEO_NODE_OBJECT_INFO, def_geo_object_info, "OBJECT_INFO", ObjectInfo, "Object Info", "Retrieve information from an object") DefNode(GeometryNode, GEO_NODE_OFFSET_POINT_IN_CURVE, 0, "OFFSET_POINT_IN_CURVE", OffsetPointInCurve, "Offset Point in Curve", "Offset a control point index within its curve") DefNode(GeometryNode, GEO_NODE_POINTS_TO_VERTICES, 0, "POINTS_TO_VERTICES", PointsToVertices, "Points to Vertices", "Generate a mesh vertex for each point cloud point") DefNode(GeometryNode, GEO_NODE_POINTS_TO_VOLUME, def_geo_points_to_volume, "POINTS_TO_VOLUME", PointsToVolume, "Points to Volume", "Generate a fog volume sphere around every point") DefNode(GeometryNode, GEO_NODE_POINTS, 0, "POINTS", Points, "Points", "Generate a point cloud with positions and radii defined by fields") DefNode(GeometryNode, GEO_NODE_PROXIMITY, def_geo_proximity, "PROXIMITY", Proximity, "Geometry Proximity", "Compute the closest location on the target geometry") DefNode(GeometryNode, GEO_NODE_RAYCAST, def_geo_raycast, "RAYCAST", Raycast, "Raycast", "Cast rays from the context geometry onto a target geometry, and retrieve information from each hit point") DefNode(GeometryNode, GEO_NODE_REALIZE_INSTANCES, def_geo_realize_instances,"REALIZE_INSTANCES", RealizeInstances, "Realize Instances", "Convert instances into real geometry data") DefNode(GeometryNode, GEO_NODE_REMOVE_ATTRIBUTE, 0, "REMOVE_ATTRIBUTE", RemoveAttribute, "Remove Named Attribute", "Delete an attribute with a specified name from a geometry. Typically used to optimize performance") DefNode(GeometryNode, GEO_NODE_REPLACE_MATERIAL, 0, "REPLACE_MATERIAL", ReplaceMaterial, "Replace Material", "Swap one material with another") DefNode(GeometryNode, GEO_NODE_RESAMPLE_CURVE, def_geo_curve_resample, "RESAMPLE_CURVE", ResampleCurve, "Resample Curve", "Generate a poly spline for each input spline") DefNode(GeometryNode, GEO_NODE_REVERSE_CURVE, 0, "REVERSE_CURVE", ReverseCurve, "Reverse Curve", "Change the direction of curves by swapping their start and end data") DefNode(GeometryNode, GEO_NODE_ROTATE_INSTANCES, 0, "ROTATE_INSTANCES", RotateInstances, "Rotate Instances", "Rotate geometry instances in local or global space") DefNode(GeometryNode, GEO_NODE_SAMPLE_CURVE, def_geo_curve_sample, "SAMPLE_CURVE", SampleCurve, "Sample Curve", "Retrieve data from a point on a curve at a certain distance from its start") DefNode(GeometryNode, GEO_NODE_SAMPLE_INDEX, def_geo_sample_index, "SAMPLE_INDEX", SampleIndex, "Sample Index", "Retrieve values from specific geometry elements") DefNode(GeometryNode, GEO_NODE_SAMPLE_NEAREST_SURFACE, def_geo_sample_nearest_surface, "SAMPLE_NEAREST_SURFACE", SampleNearestSurface, "Sample Nearest Surface", "Calculate the interpolated value of a mesh attribute on the closest point of its surface") DefNode(GeometryNode, GEO_NODE_SAMPLE_NEAREST, def_geo_sample_nearest, "SAMPLE_NEAREST", SampleNearest, "Sample Nearest", "Find the element of a geometry closest to a position") DefNode(GeometryNode, GEO_NODE_SAMPLE_UV_SURFACE, def_geo_sample_uv_surface, "SAMPLE_UV_SURFACE", SampleUVSurface, "Sample UV Surface", "Calculate the interpolated values of a mesh attribute at a UV coordinate") DefNode(GeometryNode, GEO_NODE_SCALE_ELEMENTS, def_geo_scale_elements, "SCALE_ELEMENTS", ScaleElements, "Scale Elements", "Scale groups of connected edges and faces") DefNode(GeometryNode, GEO_NODE_SCALE_INSTANCES, 0, "SCALE_INSTANCES", ScaleInstances, "Scale Instances", "Scale geometry instances in local or global space") DefNode(GeometryNode, GEO_NODE_SELF_OBJECT, 0, "SELF_OBJECT", SelfObject, "Self Object", "Retrieve the object that contains the geometry nodes modifier currently being executed") DefNode(GeometryNode, GEO_NODE_SEPARATE_COMPONENTS, 0, "SEPARATE_COMPONENTS",SeparateComponents, "Separate Components","Split a geometry into a separate output for each type of data in the geometry") DefNode(GeometryNode, GEO_NODE_SEPARATE_GEOMETRY, def_geo_separate_geometry,"SEPARATE_GEOMETRY", SeparateGeometry, "Separate Geometry", "Split a geometry into two geometry outputs based on a selection") DefNode(GeometryNode, GEO_NODE_SET_CURVE_HANDLES, def_geo_curve_set_handle_positions, "SET_CURVE_HANDLES", SetCurveHandlePositions, "Set Handle Positions", "Set the positions for the handles of Bézier curves") DefNode(GeometryNode, GEO_NODE_SET_CURVE_NORMAL, def_geo_set_curve_normal, "SET_CURVE_NORMAL", SetCurveNormal, "Set Curve Normal", "Set the evaluation mode for curve normals") DefNode(GeometryNode, GEO_NODE_SET_CURVE_RADIUS, 0, "SET_CURVE_RADIUS", SetCurveRadius, "Set Curve Radius", "Set the radius of the curve at each control point") DefNode(GeometryNode, GEO_NODE_SET_CURVE_TILT, 0, "SET_CURVE_TILT", SetCurveTilt, "Set Curve Tilt", "Set the tilt angle at each curve control point") DefNode(GeometryNode, GEO_NODE_SET_ID, 0, "SET_ID", SetID, "Set ID", "Set the id attribute on the input geometry, mainly used internally for randomizing") DefNode(GeometryNode, GEO_NODE_SET_MATERIAL_INDEX, 0, "SET_MATERIAL_INDEX", SetMaterialIndex, "Set Material Index", "Set the material index for each selected geometry element") DefNode(GeometryNode, GEO_NODE_SET_MATERIAL, 0, "SET_MATERIAL", SetMaterial, "Set Material", "Assign a material to geometry elements") DefNode(GeometryNode, GEO_NODE_SET_POINT_RADIUS, 0, "SET_POINT_RADIUS", SetPointRadius, "Set Point Radius", "Set the display size of point cloud points") DefNode(GeometryNode, GEO_NODE_SET_POSITION, 0, "SET_POSITION", SetPosition, "Set Position", "Set the location of each point") DefNode(GeometryNode, GEO_NODE_SET_SHADE_SMOOTH, 0, "SET_SHADE_SMOOTH", SetShadeSmooth, "Set Shade Smooth", "Control the smoothness of mesh normals around each face by changing the \"shade smooth\" attribute") DefNode(GeometryNode, GEO_NODE_SET_SPLINE_CYCLIC, 0, "SET_SPLINE_CYCLIC", SetSplineCyclic, "Set Spline Cyclic", "Control whether each spline loops back on itself by changing the \"cyclic\" attribute") DefNode(GeometryNode, GEO_NODE_SET_SPLINE_RESOLUTION, 0, "SET_SPLINE_RESOLUTION", SetSplineResolution, "Set Spline Resolution", "Control how many evaluated points should be generated on every curve segment") DefNode(GeometryNode, GEO_NODE_SPLIT_EDGES, 0, "SPLIT_EDGES", SplitEdges, "Split Edges", "Duplicate mesh edges and break connections with the surrounding faces") DefNode(GeometryNode, GEO_NODE_STORE_NAMED_ATTRIBUTE, def_geo_store_named_attribute, "STORE_NAMED_ATTRIBUTE", StoreNamedAttribute, "Store Named Attribute", "Store the result of a field on a geometry as an attribute with the specified name") DefNode(GeometryNode, GEO_NODE_STRING_JOIN, 0, "STRING_JOIN", StringJoin, "Join Strings", "Combine any number of input strings") DefNode(GeometryNode, GEO_NODE_STRING_TO_CURVES, def_geo_string_to_curves, "STRING_TO_CURVES", StringToCurves, "String to Curves", "Generate a paragraph of text with a specific font, using a curve instance to store each character") DefNode(GeometryNode, GEO_NODE_SUBDIVIDE_CURVE, 0, "SUBDIVIDE_CURVE", SubdivideCurve, "Subdivide Curve", "Dividing each curve segment into a specified number of pieces") DefNode(GeometryNode, GEO_NODE_SUBDIVIDE_MESH, 0, "SUBDIVIDE_MESH", SubdivideMesh, "Subdivide Mesh", "Divide mesh faces into smaller ones without changing the shape or volume, using linear interpolation to place the new vertices") DefNode(GeometryNode, GEO_NODE_SUBDIVISION_SURFACE, def_geo_subdivision_surface, "SUBDIVISION_SURFACE",SubdivisionSurface, "Subdivision Surface","Divide mesh faces to form a smooth surface, using the Catmull-Clark subdivision method") DefNode(GeometryNode, GEO_NODE_SWITCH, def_geo_switch, "SWITCH", Switch, "Switch", "Switch between two inputs") DefNode(GeometryNode, GEO_NODE_TRANSFORM_GEOMETRY, 0, "TRANSFORM_GEOMETRY", Transform, "Transform Geometry", "Translate, rotate or scale the geometry") DefNode(GeometryNode, GEO_NODE_TRANSLATE_INSTANCES, 0, "TRANSLATE_INSTANCES",TranslateInstances, "Translate Instances","Move top-level geometry instances in local or global space") DefNode(GeometryNode, GEO_NODE_TRIANGULATE, def_geo_triangulate, "TRIANGULATE", Triangulate, "Triangulate", "Convert all faces in a mesh to triangular faces") DefNode(GeometryNode, GEO_NODE_TRIM_CURVE, def_geo_curve_trim, "TRIM_CURVE", TrimCurve, "Trim Curve", "Shorten curves by removing portions at the start or end") DefNode(GeometryNode, GEO_NODE_UV_PACK_ISLANDS, 0, "UV_PACK_ISLANDS", UVPackIslands, "Pack UV Islands", "Scale islands of a UV map and move them so they fill the UV space as much as possible") DefNode(GeometryNode, GEO_NODE_UV_UNWRAP, def_geo_uv_unwrap, "UV_UNWRAP", UVUnwrap, "UV Unwrap", "Generate a UV map based on seam edges") DefNode(GeometryNode, GEO_NODE_VIEWER, def_geo_viewer, "VIEWER", Viewer, "Viewer", "Display the input data in the Spreadsheet Editor") DefNode(GeometryNode, GEO_NODE_VOLUME_CUBE, 0, "VOLUME_CUBE", VolumeCube, "Volume Cube", "Generate a dense volume with a field that controls the density at each grid voxel based on its position") DefNode(GeometryNode, GEO_NODE_VOLUME_TO_MESH, def_geo_volume_to_mesh, "VOLUME_TO_MESH", VolumeToMesh, "Volume to Mesh", "Generate a mesh on the \"surface\" of a volume") DefNode(GeometryNode, GEO_NODE_INTERPOLATE_CURVES, 0, "INTERPOLATE_CURVES", InterpolateCurves, "Interpolate Curves", "Generate new curves on points by interpolating between existing curves") /* undefine macros */ #undef DefNode /* clang-format on */ diff --git a/source/blender/nodes/geometry/CMakeLists.txt b/source/blender/nodes/geometry/CMakeLists.txt index f1cccf756e6..8a8406808dc 100644 --- a/source/blender/nodes/geometry/CMakeLists.txt +++ b/source/blender/nodes/geometry/CMakeLists.txt @@ -11,200 +11,201 @@ set(INC ../../bmesh ../../depsgraph ../../functions ../../geometry ../../gpu ../../imbuf ../../makesdna ../../makesrna ../../render ../../windowmanager ../../../../intern/guardedalloc # RNA_prototypes.h ${CMAKE_BINARY_DIR}/source/blender/makesrna ) set(SRC nodes/node_geo_accumulate_field.cc nodes/node_geo_attribute_capture.cc nodes/node_geo_attribute_domain_size.cc nodes/node_geo_attribute_statistic.cc nodes/node_geo_blur_attribute.cc nodes/node_geo_boolean.cc nodes/node_geo_bounding_box.cc nodes/node_geo_collection_info.cc nodes/node_geo_common.cc nodes/node_geo_convex_hull.cc nodes/node_geo_curve_endpoint_selection.cc nodes/node_geo_curve_fill.cc nodes/node_geo_curve_fillet.cc nodes/node_geo_curve_handle_type_selection.cc nodes/node_geo_curve_length.cc nodes/node_geo_curve_primitive_arc.cc nodes/node_geo_curve_primitive_bezier_segment.cc nodes/node_geo_curve_primitive_circle.cc nodes/node_geo_curve_primitive_line.cc nodes/node_geo_curve_primitive_quadratic_bezier.cc nodes/node_geo_curve_primitive_quadrilateral.cc nodes/node_geo_curve_primitive_spiral.cc nodes/node_geo_curve_primitive_star.cc nodes/node_geo_curve_resample.cc nodes/node_geo_curve_reverse.cc nodes/node_geo_curve_sample.cc nodes/node_geo_curve_set_handle_type.cc nodes/node_geo_curve_spline_parameter.cc nodes/node_geo_curve_spline_type.cc nodes/node_geo_curve_subdivide.cc nodes/node_geo_curve_to_mesh.cc nodes/node_geo_curve_to_points.cc nodes/node_geo_curve_topology_curve_of_point.cc nodes/node_geo_curve_topology_points_of_curve.cc nodes/node_geo_curve_trim.cc nodes/node_geo_deform_curves_on_surface.cc nodes/node_geo_delete_geometry.cc nodes/node_geo_distribute_points_in_volume.cc nodes/node_geo_distribute_points_on_faces.cc nodes/node_geo_dual_mesh.cc nodes/node_geo_duplicate_elements.cc nodes/node_geo_edge_paths_to_curves.cc nodes/node_geo_edge_paths_to_selection.cc nodes/node_geo_edge_split.cc nodes/node_geo_edges_to_face_groups.cc nodes/node_geo_evaluate_at_index.cc nodes/node_geo_evaluate_on_domain.cc nodes/node_geo_extrude_mesh.cc nodes/node_geo_flip_faces.cc nodes/node_geo_geometry_to_instance.cc nodes/node_geo_image.cc nodes/node_geo_image_info.cc nodes/node_geo_image_texture.cc nodes/node_geo_input_curve_handles.cc nodes/node_geo_input_curve_tilt.cc nodes/node_geo_input_id.cc nodes/node_geo_input_index.cc nodes/node_geo_input_instance_rotation.cc nodes/node_geo_input_instance_scale.cc nodes/node_geo_input_material.cc nodes/node_geo_input_material_index.cc nodes/node_geo_input_mesh_edge_angle.cc nodes/node_geo_input_mesh_edge_neighbors.cc nodes/node_geo_input_mesh_edge_vertices.cc nodes/node_geo_input_mesh_face_area.cc nodes/node_geo_input_mesh_face_is_planar.cc nodes/node_geo_input_mesh_face_neighbors.cc nodes/node_geo_input_mesh_island.cc nodes/node_geo_input_mesh_vertex_neighbors.cc nodes/node_geo_input_named_attribute.cc nodes/node_geo_input_normal.cc nodes/node_geo_input_position.cc nodes/node_geo_input_radius.cc nodes/node_geo_input_scene_time.cc nodes/node_geo_input_shade_smooth.cc nodes/node_geo_input_shortest_edge_paths.cc nodes/node_geo_input_spline_cyclic.cc nodes/node_geo_input_spline_length.cc nodes/node_geo_input_spline_resolution.cc nodes/node_geo_input_tangent.cc nodes/node_geo_instance_on_points.cc nodes/node_geo_instances_to_points.cc nodes/node_geo_interpolate_curves.cc + nodes/node_geo_is_edit_mode.cc nodes/node_geo_is_viewport.cc nodes/node_geo_join_geometry.cc nodes/node_geo_material_replace.cc nodes/node_geo_material_selection.cc nodes/node_geo_merge_by_distance.cc nodes/node_geo_mesh_face_group_boundaries.cc nodes/node_geo_mesh_primitive_circle.cc nodes/node_geo_mesh_primitive_cone.cc nodes/node_geo_mesh_primitive_cube.cc nodes/node_geo_mesh_primitive_cylinder.cc nodes/node_geo_mesh_primitive_grid.cc nodes/node_geo_mesh_primitive_ico_sphere.cc nodes/node_geo_mesh_primitive_line.cc nodes/node_geo_mesh_primitive_uv_sphere.cc nodes/node_geo_mesh_subdivide.cc nodes/node_geo_mesh_to_curve.cc nodes/node_geo_mesh_to_points.cc nodes/node_geo_mesh_to_volume.cc nodes/node_geo_mesh_topology_corners_of_face.cc nodes/node_geo_mesh_topology_corners_of_vertex.cc nodes/node_geo_mesh_topology_edges_of_corner.cc nodes/node_geo_mesh_topology_edges_of_vertex.cc nodes/node_geo_mesh_topology_face_of_corner.cc nodes/node_geo_mesh_topology_offset_corner_in_face.cc nodes/node_geo_mesh_topology_vertex_of_corner.cc nodes/node_geo_object_info.cc nodes/node_geo_offset_point_in_curve.cc nodes/node_geo_points.cc nodes/node_geo_points_to_vertices.cc nodes/node_geo_points_to_volume.cc nodes/node_geo_proximity.cc nodes/node_geo_raycast.cc nodes/node_geo_realize_instances.cc nodes/node_geo_remove_attribute.cc nodes/node_geo_rotate_instances.cc nodes/node_geo_sample_index.cc nodes/node_geo_sample_nearest.cc nodes/node_geo_sample_nearest_surface.cc nodes/node_geo_sample_uv_surface.cc nodes/node_geo_scale_elements.cc nodes/node_geo_scale_instances.cc nodes/node_geo_self_object.cc nodes/node_geo_separate_components.cc nodes/node_geo_separate_geometry.cc nodes/node_geo_set_curve_handles.cc nodes/node_geo_set_curve_normal.cc nodes/node_geo_set_curve_radius.cc nodes/node_geo_set_curve_tilt.cc nodes/node_geo_set_id.cc nodes/node_geo_set_material.cc nodes/node_geo_set_material_index.cc nodes/node_geo_set_point_radius.cc nodes/node_geo_set_position.cc nodes/node_geo_set_shade_smooth.cc nodes/node_geo_set_spline_cyclic.cc nodes/node_geo_set_spline_resolution.cc nodes/node_geo_store_named_attribute.cc nodes/node_geo_string_join.cc nodes/node_geo_string_to_curves.cc nodes/node_geo_subdivision_surface.cc nodes/node_geo_switch.cc nodes/node_geo_transform_geometry.cc nodes/node_geo_translate_instances.cc nodes/node_geo_triangulate.cc nodes/node_geo_uv_pack_islands.cc nodes/node_geo_uv_unwrap.cc nodes/node_geo_viewer.cc nodes/node_geo_volume_cube.cc nodes/node_geo_volume_to_mesh.cc node_geometry_register.cc node_geometry_tree.cc node_geometry_util.cc node_geometry_register.hh node_geometry_util.hh ) set(LIB bf_bmesh bf_functions bf_geometry bf_nodes ) if(WITH_BULLET) list(APPEND INC_SYS ${BULLET_INCLUDE_DIRS} ../../../../intern/rigidbody ) list(APPEND LIB ${BULLET_LIBRARIES} ) add_definitions(-DWITH_BULLET) endif() if(WITH_TBB) list(APPEND INC_SYS ${TBB_INCLUDE_DIRS} ) diff --git a/source/blender/nodes/geometry/node_geometry_register.cc b/source/blender/nodes/geometry/node_geometry_register.cc index c6e0fc2697a..609b3b5a3b2 100644 --- a/source/blender/nodes/geometry/node_geometry_register.cc +++ b/source/blender/nodes/geometry/node_geometry_register.cc @@ -1,164 +1,165 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #include "NOD_register.hh" #include "node_geometry_register.hh" void register_geometry_nodes() { register_node_tree_type_geo(); register_node_type_geo_group(); register_node_type_geo_accumulate_field(); register_node_type_geo_attribute_capture(); register_node_type_geo_attribute_domain_size(); register_node_type_geo_attribute_statistic(); register_node_type_geo_blur_attribute(); register_node_type_geo_boolean(); register_node_type_geo_bounding_box(); register_node_type_geo_collection_info(); register_node_type_geo_convex_hull(); register_node_type_geo_curve_endpoint_selection(); register_node_type_geo_curve_fill(); register_node_type_geo_curve_fillet(); register_node_type_geo_curve_handle_type_selection(); register_node_type_geo_curve_length(); register_node_type_geo_curve_primitive_arc(); register_node_type_geo_curve_primitive_bezier_segment(); register_node_type_geo_curve_primitive_circle(); register_node_type_geo_curve_primitive_line(); register_node_type_geo_curve_primitive_quadratic_bezier(); register_node_type_geo_curve_primitive_quadrilateral(); register_node_type_geo_curve_primitive_spiral(); register_node_type_geo_curve_primitive_star(); register_node_type_geo_curve_resample(); register_node_type_geo_curve_reverse(); register_node_type_geo_curve_sample(); register_node_type_geo_curve_set_handle_type(); register_node_type_geo_curve_spline_parameter(); register_node_type_geo_curve_spline_type(); register_node_type_geo_curve_subdivide(); register_node_type_geo_curve_to_mesh(); register_node_type_geo_curve_to_points(); register_node_type_geo_curve_topology_curve_of_point(); register_node_type_geo_curve_topology_points_of_curve(); register_node_type_geo_curve_trim(); register_node_type_geo_deform_curves_on_surface(); register_node_type_geo_delete_geometry(); register_node_type_geo_distribute_points_in_volume(); register_node_type_geo_distribute_points_on_faces(); register_node_type_geo_dual_mesh(); register_node_type_geo_duplicate_elements(); register_node_type_geo_edge_paths_to_curves(); register_node_type_geo_edge_paths_to_selection(); register_node_type_geo_edge_split(); register_node_type_geo_edges_to_face_groups(); register_node_type_geo_evaluate_at_index(); register_node_type_geo_evaluate_on_domain(); register_node_type_geo_extrude_mesh(); register_node_type_geo_flip_faces(); register_node_type_geo_geometry_to_instance(); register_node_type_geo_image_info(); register_node_type_geo_image_texture(); register_node_type_geo_image(); register_node_type_geo_input_curve_handles(); register_node_type_geo_input_curve_tilt(); register_node_type_geo_input_id(); register_node_type_geo_input_index(); register_node_type_geo_input_instance_rotation(); register_node_type_geo_input_instance_scale(); register_node_type_geo_input_material_index(); register_node_type_geo_input_material(); register_node_type_geo_input_mesh_edge_angle(); register_node_type_geo_input_mesh_edge_neighbors(); register_node_type_geo_input_mesh_edge_vertices(); register_node_type_geo_input_mesh_face_area(); register_node_type_geo_input_mesh_face_is_planar(); register_node_type_geo_input_mesh_face_neighbors(); register_node_type_geo_input_mesh_island(); register_node_type_geo_input_mesh_vertex_neighbors(); register_node_type_geo_input_named_attribute(); register_node_type_geo_input_normal(); register_node_type_geo_input_position(); register_node_type_geo_input_radius(); register_node_type_geo_input_scene_time(); register_node_type_geo_input_shade_smooth(); register_node_type_geo_input_shortest_edge_paths(); register_node_type_geo_input_spline_cyclic(); register_node_type_geo_input_spline_length(); register_node_type_geo_input_spline_resolution(); register_node_type_geo_input_tangent(); register_node_type_geo_instance_on_points(); register_node_type_geo_instances_to_points(); register_node_type_geo_interpolate_curves(); + register_node_type_geo_is_edit_mode(); register_node_type_geo_is_viewport(); register_node_type_geo_join_geometry(); register_node_type_geo_material_replace(); register_node_type_geo_material_selection(); register_node_type_geo_merge_by_distance(); register_node_type_geo_mesh_face_group_boundaries(); register_node_type_geo_mesh_primitive_circle(); register_node_type_geo_mesh_primitive_cone(); register_node_type_geo_mesh_primitive_cube(); register_node_type_geo_mesh_primitive_cylinder(); register_node_type_geo_mesh_primitive_grid(); register_node_type_geo_mesh_primitive_ico_sphere(); register_node_type_geo_mesh_primitive_line(); register_node_type_geo_mesh_primitive_uv_sphere(); register_node_type_geo_mesh_subdivide(); register_node_type_geo_mesh_to_curve(); register_node_type_geo_mesh_to_points(); register_node_type_geo_mesh_to_volume(); register_node_type_geo_mesh_topology_corners_of_face(); register_node_type_geo_mesh_topology_corners_of_vertex(); register_node_type_geo_mesh_topology_edges_of_corner(); register_node_type_geo_mesh_topology_edges_of_vertex(); register_node_type_geo_mesh_topology_face_of_corner(); register_node_type_geo_mesh_topology_offset_corner_in_face(); register_node_type_geo_mesh_topology_vertex_of_corner(); register_node_type_geo_object_info(); register_node_type_geo_offset_point_in_curve(); register_node_type_geo_points_to_vertices(); register_node_type_geo_points_to_volume(); register_node_type_geo_points(); register_node_type_geo_proximity(); register_node_type_geo_raycast(); register_node_type_geo_realize_instances(); register_node_type_geo_remove_attribute(); register_node_type_geo_rotate_instances(); register_node_type_geo_sample_index(); register_node_type_geo_sample_nearest_surface(); register_node_type_geo_sample_nearest(); register_node_type_geo_sample_uv_surface(); register_node_type_geo_scale_elements(); register_node_type_geo_scale_instances(); register_node_type_geo_self_object(); register_node_type_geo_separate_components(); register_node_type_geo_separate_geometry(); register_node_type_geo_set_curve_handles(); register_node_type_geo_set_curve_normal(); register_node_type_geo_set_curve_radius(); register_node_type_geo_set_curve_tilt(); register_node_type_geo_set_id(); register_node_type_geo_set_material_index(); register_node_type_geo_set_material(); register_node_type_geo_set_point_radius(); register_node_type_geo_set_position(); register_node_type_geo_set_shade_smooth(); register_node_type_geo_set_spline_cyclic(); register_node_type_geo_set_spline_resolution(); register_node_type_geo_store_named_attribute(); register_node_type_geo_string_join(); register_node_type_geo_string_to_curves(); register_node_type_geo_subdivision_surface(); register_node_type_geo_switch(); register_node_type_geo_transform_geometry(); register_node_type_geo_translate_instances(); register_node_type_geo_triangulate(); register_node_type_geo_uv_pack_islands(); register_node_type_geo_uv_unwrap(); register_node_type_geo_viewer(); register_node_type_geo_volume_cube(); register_node_type_geo_volume_to_mesh(); } diff --git a/source/blender/nodes/geometry/node_geometry_register.hh b/source/blender/nodes/geometry/node_geometry_register.hh index 900dd67cf71..052d4f6ce37 100644 --- a/source/blender/nodes/geometry/node_geometry_register.hh +++ b/source/blender/nodes/geometry/node_geometry_register.hh @@ -1,161 +1,162 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once void register_node_tree_type_geo(); void register_node_type_geo_group(); void register_node_type_geo_accumulate_field(); void register_node_type_geo_attribute_capture(); void register_node_type_geo_attribute_domain_size(); void register_node_type_geo_attribute_separate_xyz(); void register_node_type_geo_attribute_statistic(); void register_node_type_geo_blur_attribute(); void register_node_type_geo_boolean(); void register_node_type_geo_bounding_box(); void register_node_type_geo_collection_info(); void register_node_type_geo_convex_hull(); void register_node_type_geo_curve_endpoint_selection(); void register_node_type_geo_curve_fill(); void register_node_type_geo_curve_fillet(); void register_node_type_geo_curve_handle_type_selection(); void register_node_type_geo_curve_length(); void register_node_type_geo_curve_primitive_arc(); void register_node_type_geo_curve_primitive_bezier_segment(); void register_node_type_geo_curve_primitive_circle(); void register_node_type_geo_curve_primitive_line(); void register_node_type_geo_curve_primitive_quadratic_bezier(); void register_node_type_geo_curve_primitive_quadrilateral(); void register_node_type_geo_curve_primitive_spiral(); void register_node_type_geo_curve_primitive_star(); void register_node_type_geo_curve_resample(); void register_node_type_geo_curve_reverse(); void register_node_type_geo_curve_sample(); void register_node_type_geo_curve_set_handle_type(); void register_node_type_geo_curve_spline_parameter(); void register_node_type_geo_curve_spline_type(); void register_node_type_geo_curve_subdivide(); void register_node_type_geo_curve_to_mesh(); void register_node_type_geo_curve_to_points(); void register_node_type_geo_curve_topology_curve_of_point(); void register_node_type_geo_curve_topology_points_of_curve(); void register_node_type_geo_curve_trim(); void register_node_type_geo_deform_curves_on_surface(); void register_node_type_geo_delete_geometry(); void register_node_type_geo_distribute_points_in_volume(); void register_node_type_geo_distribute_points_on_faces(); void register_node_type_geo_dual_mesh(); void register_node_type_geo_duplicate_elements(); void register_node_type_geo_edge_paths_to_curves(); void register_node_type_geo_edge_paths_to_selection(); void register_node_type_geo_edge_split(); void register_node_type_geo_edges_to_face_groups(); void register_node_type_geo_evaluate_at_index(); void register_node_type_geo_evaluate_on_domain(); void register_node_type_geo_extrude_mesh(); void register_node_type_geo_flip_faces(); void register_node_type_geo_geometry_to_instance(); void register_node_type_geo_image_info(); void register_node_type_geo_image_texture(); void register_node_type_geo_image(); void register_node_type_geo_input_curve_handles(); void register_node_type_geo_input_curve_tilt(); void register_node_type_geo_input_id(); void register_node_type_geo_input_index(); void register_node_type_geo_input_instance_rotation(); void register_node_type_geo_input_instance_scale(); void register_node_type_geo_input_material_index(); void register_node_type_geo_input_material(); void register_node_type_geo_input_mesh_edge_angle(); void register_node_type_geo_input_mesh_edge_neighbors(); void register_node_type_geo_input_mesh_edge_vertices(); void register_node_type_geo_input_mesh_face_area(); void register_node_type_geo_input_mesh_face_is_planar(); void register_node_type_geo_input_mesh_face_neighbors(); void register_node_type_geo_input_mesh_island(); void register_node_type_geo_input_mesh_vertex_neighbors(); void register_node_type_geo_input_named_attribute(); void register_node_type_geo_input_normal(); void register_node_type_geo_input_position(); void register_node_type_geo_input_radius(); void register_node_type_geo_input_scene_time(); void register_node_type_geo_input_shade_smooth(); void register_node_type_geo_input_shortest_edge_paths(); void register_node_type_geo_input_spline_cyclic(); void register_node_type_geo_input_spline_length(); void register_node_type_geo_input_spline_resolution(); void register_node_type_geo_input_tangent(); void register_node_type_geo_instance_on_points(); void register_node_type_geo_instances_to_points(); void register_node_type_geo_interpolate_curves(); +void register_node_type_geo_is_edit_mode(); void register_node_type_geo_is_viewport(); void register_node_type_geo_join_geometry(); void register_node_type_geo_material_replace(); void register_node_type_geo_material_selection(); void register_node_type_geo_merge_by_distance(); void register_node_type_geo_mesh_face_group_boundaries(); void register_node_type_geo_mesh_primitive_circle(); void register_node_type_geo_mesh_primitive_cone(); void register_node_type_geo_mesh_primitive_cube(); void register_node_type_geo_mesh_primitive_cylinder(); void register_node_type_geo_mesh_primitive_grid(); void register_node_type_geo_mesh_primitive_ico_sphere(); void register_node_type_geo_mesh_primitive_line(); void register_node_type_geo_mesh_primitive_uv_sphere(); void register_node_type_geo_mesh_subdivide(); void register_node_type_geo_mesh_to_curve(); void register_node_type_geo_mesh_to_points(); void register_node_type_geo_mesh_to_volume(); void register_node_type_geo_mesh_topology_corners_of_face(); void register_node_type_geo_mesh_topology_corners_of_vertex(); void register_node_type_geo_mesh_topology_edges_of_corner(); void register_node_type_geo_mesh_topology_edges_of_vertex(); void register_node_type_geo_mesh_topology_face_of_corner(); void register_node_type_geo_mesh_topology_offset_corner_in_face(); void register_node_type_geo_mesh_topology_vertex_of_corner(); void register_node_type_geo_object_info(); void register_node_type_geo_offset_point_in_curve(); void register_node_type_geo_points_to_vertices(); void register_node_type_geo_points_to_volume(); void register_node_type_geo_points(); void register_node_type_geo_proximity(); void register_node_type_geo_raycast(); void register_node_type_geo_realize_instances(); void register_node_type_geo_remove_attribute(); void register_node_type_geo_rotate_instances(); void register_node_type_geo_sample_index(); void register_node_type_geo_sample_nearest_surface(); void register_node_type_geo_sample_nearest(); void register_node_type_geo_sample_uv_surface(); void register_node_type_geo_scale_elements(); void register_node_type_geo_scale_instances(); void register_node_type_geo_select_by_handle_type(); void register_node_type_geo_self_object(); void register_node_type_geo_separate_components(); void register_node_type_geo_separate_geometry(); void register_node_type_geo_set_curve_handles(); void register_node_type_geo_set_curve_normal(); void register_node_type_geo_set_curve_radius(); void register_node_type_geo_set_curve_tilt(); void register_node_type_geo_set_id(); void register_node_type_geo_set_material_index(); void register_node_type_geo_set_material(); void register_node_type_geo_set_point_radius(); void register_node_type_geo_set_position(); void register_node_type_geo_set_shade_smooth(); void register_node_type_geo_set_spline_cyclic(); void register_node_type_geo_set_spline_resolution(); void register_node_type_geo_store_named_attribute(); void register_node_type_geo_string_join(); void register_node_type_geo_string_to_curves(); void register_node_type_geo_subdivision_surface(); void register_node_type_geo_switch(); void register_node_type_geo_transform_geometry(); void register_node_type_geo_translate_instances(); void register_node_type_geo_triangulate(); void register_node_type_geo_uv_pack_islands(); void register_node_type_geo_uv_unwrap(); void register_node_type_geo_viewer(); void register_node_type_geo_volume_cube(); void register_node_type_geo_volume_to_mesh(); diff --git a/source/blender/nodes/geometry/nodes/node_geo_is_edit_mode.cc b/source/blender/nodes/geometry/nodes/node_geo_is_edit_mode.cc new file mode 100644 index 00000000000..f706d49c3d0 --- /dev/null +++ b/source/blender/nodes/geometry/nodes/node_geo_is_edit_mode.cc @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "node_geometry_util.hh" + +namespace blender::nodes::node_geo_is_edit_mode_cc { + +static void node_declare(NodeDeclarationBuilder &b) +{ + b.add_output(N_("Is Edit Mode")); +} + +static void node_geo_exec(GeoNodeExecParams params) +{ + const Object *object = params.self_object(); + const bool is_edit_mode = object->mode == OB_MODE_EDIT; + + params.set_output("Is Edit Mode", is_edit_mode); +} + +} // namespace blender::nodes::node_geo_is_edit_mode_cc + +void register_node_type_geo_is_edit_mode() +{ + namespace file_ns = blender::nodes::node_geo_is_edit_mode_cc; + + static bNodeType ntype; + + geo_node_type_base(&ntype, GEO_NODE_IS_EDIT_MODE, "Is Edit Mode", NODE_CLASS_INPUT); + ntype.geometry_node_execute = file_ns::node_geo_exec; + ntype.declare = file_ns::node_declare; + nodeRegisterType(&ntype); +} \ No newline at end of file