Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-03-16 16:51:11 +0300
committerHans Goudey <h.goudey@me.com>2022-03-16 16:51:11 +0300
commit943b919fe807b53558631bcbc688c2d712d6b0cc (patch)
treec1c141866f50eb1f28e1875195395c8582898cc2 /source/blender/makesrna/intern/rna_nodetree.c
parentcb267cec5552c17092a99999e4e352bf266b578f (diff)
Geometry Nodes: Remove legacy node code
This commit removes the implementations of legacy nodes, their type definitions, and related code that becomes unused. Now that we have two releases that included the legacy nodes, there is not much reason to include them still. Removing the code means refactoring will be easier, and old code doesn't have to be tested and maintained. After this commit, the legacy nodes will be undefined in the UI, so 3.0 or 3.1 should be used to convert files to the fields system. The net change is 12184 lines removed! The tooltip for legacy nodes mentioned that we would remove them before 4.0, which was purposefully a bit vague to allow us this flexibility. In a poll in a devtalk post showed that the majority of people were okay with removing the nodes. https://devtalk.blender.org/t/geometry-nodes-backward-compatibility-poll/20199 Differential Revision: https://developer.blender.org/D14353
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c1092
1 files changed, 9 insertions, 1083 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index f212b4a1d23..2c6a4f5adeb 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -461,30 +461,6 @@ const EnumPropertyItem rna_enum_node_filter_items[] = {
{0, NULL, 0, NULL, NULL},
};
-static const EnumPropertyItem rna_node_geometry_attribute_randomize_operation_items[] = {
- {GEO_NODE_ATTRIBUTE_RANDOMIZE_REPLACE_CREATE,
- "REPLACE_CREATE",
- ICON_NONE,
- "Replace/Create",
- "Replace the value and data type of an existing attribute, or create a new one"},
- {GEO_NODE_ATTRIBUTE_RANDOMIZE_ADD,
- "ADD",
- ICON_NONE,
- "Add",
- "Add the random values to the existing attribute values"},
- {GEO_NODE_ATTRIBUTE_RANDOMIZE_SUBTRACT,
- "SUBTRACT",
- ICON_NONE,
- "Subtract",
- "Subtract random values from the existing attribute values"},
- {GEO_NODE_ATTRIBUTE_RANDOMIZE_MULTIPLY,
- "MULTIPLY",
- ICON_NONE,
- "Multiply",
- "Multiply the existing attribute values with the random values"},
- {0, NULL, 0, NULL, NULL},
-};
-
static const EnumPropertyItem rna_node_geometry_curve_handle_type_items[] = {
{GEO_NODE_CURVE_HANDLE_FREE,
"FREE",
@@ -547,73 +523,8 @@ static EnumPropertyItem rna_node_geometry_mesh_circle_fill_type_items[] = {
};
#endif
-#define ITEM_ATTRIBUTE \
- { \
- GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE, "ATTRIBUTE", 0, "Attribute", "" \
- }
-#define ITEM_FLOAT \
- { \
- GEO_NODE_ATTRIBUTE_INPUT_FLOAT, "FLOAT", 0, "Float", "" \
- }
-#define ITEM_VECTOR \
- { \
- GEO_NODE_ATTRIBUTE_INPUT_VECTOR, "VECTOR", 0, "Vector", "" \
- }
-#define ITEM_COLOR \
- { \
- GEO_NODE_ATTRIBUTE_INPUT_COLOR, "COLOR", 0, "Color", "" \
- }
-#define ITEM_INTEGER \
- { \
- GEO_NODE_ATTRIBUTE_INPUT_INTEGER, "INTEGER", 0, "Integer", "" \
- }
-#define ITEM_BOOLEAN \
- { \
- GEO_NODE_ATTRIBUTE_INPUT_BOOLEAN, "BOOLEAN", 0, "Boolean", "" \
- }
-
-/* Used in both runtime and static code. */
-static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_any[] = {
- ITEM_ATTRIBUTE,
- ITEM_FLOAT,
- ITEM_VECTOR,
- ITEM_COLOR,
- ITEM_INTEGER,
- ITEM_BOOLEAN,
- {0, NULL, 0, NULL, NULL},
-};
-
#ifndef RNA_RUNTIME
-static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_vector[] = {
- ITEM_ATTRIBUTE,
- ITEM_VECTOR,
- {0, NULL, 0, NULL, NULL},
-};
-static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_float_vector[] = {
- ITEM_ATTRIBUTE,
- ITEM_FLOAT,
- ITEM_VECTOR,
- {0, NULL, 0, NULL, NULL},
-};
-static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_float[] = {
- ITEM_ATTRIBUTE,
- ITEM_FLOAT,
- {0, NULL, 0, NULL, NULL},
-};
-static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_int[] = {
- ITEM_ATTRIBUTE,
- ITEM_INTEGER,
- {0, NULL, 0, NULL, NULL},
-};
-static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_no_boolean[] = {
- ITEM_ATTRIBUTE,
- ITEM_FLOAT,
- ITEM_VECTOR,
- ITEM_COLOR,
- {0, NULL, 0, NULL, NULL},
-};
-
#endif
#undef ITEM_ATTRIBUTE
@@ -2170,31 +2081,6 @@ static const EnumPropertyItem *rna_FunctionNodeCompare_operation_itemf(bContext
}
}
-static bool attribute_clamp_type_supported(const EnumPropertyItem *item)
-{
- return ELEM(item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3, CD_PROP_INT32, CD_PROP_COLOR);
-}
-
-static const EnumPropertyItem *rna_GeometryNodeAttributeClamp_type_itemf(bContext *UNUSED(C),
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
- bool *r_free)
-{
- *r_free = true;
- return itemf_function_check(rna_enum_attribute_type_items, attribute_clamp_type_supported);
-}
-
-static bool attribute_random_type_supported(const EnumPropertyItem *item)
-{
- return ELEM(item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3, CD_PROP_BOOL, CD_PROP_INT32);
-}
-static const EnumPropertyItem *rna_GeometryNodeAttributeRandom_type_itemf(
- bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
-{
- *r_free = true;
- return itemf_function_check(rna_enum_attribute_type_items, attribute_random_type_supported);
-}
-
static bool random_value_type_supported(const EnumPropertyItem *item)
{
return ELEM(item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3, CD_PROP_BOOL, CD_PROP_INT32);
@@ -2222,49 +2108,6 @@ static const EnumPropertyItem *rna_GeoNodeAccumulateField_type_itemf(bContext *U
return itemf_function_check(rna_enum_attribute_type_items, accumulate_field_type_supported);
}
-static const EnumPropertyItem *rna_GeometryNodeAttributeRandomize_operation_itemf(
- bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
-{
- bNode *node = ptr->data;
- const NodeAttributeRandomize *node_storage = (NodeAttributeRandomize *)node->storage;
- const CustomDataType data_type = (CustomDataType)node_storage->data_type;
-
- EnumPropertyItem *item_array = NULL;
- int items_len = 0;
- for (const EnumPropertyItem *item = rna_node_geometry_attribute_randomize_operation_items;
- item->identifier != NULL;
- item++) {
- if (data_type == CD_PROP_BOOL) {
- if (item->value == GEO_NODE_ATTRIBUTE_RANDOMIZE_REPLACE_CREATE) {
- RNA_enum_item_add(&item_array, &items_len, item);
- }
- }
- else {
- RNA_enum_item_add(&item_array, &items_len, item);
- }
- }
- RNA_enum_item_end(&item_array, &items_len);
-
- *r_free = true;
- return item_array;
-}
-
-static void rna_GeometryNodeAttributeRandomize_data_type_update(Main *bmain,
- Scene *scene,
- PointerRNA *ptr)
-{
- bNode *node = ptr->data;
- NodeAttributeRandomize *node_storage = (NodeAttributeRandomize *)node->storage;
-
- /* The boolean data type has no extra operations besides,
- * replace, so make sure the enum value is set properly. */
- if (node_storage->data_type == CD_PROP_BOOL) {
- node_storage->operation = GEO_NODE_ATTRIBUTE_RANDOMIZE_REPLACE_CREATE;
- }
-
- rna_Node_socket_update(bmain, scene, ptr);
-}
-
static void rna_GeometryNodeCompare_data_type_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
bNode *node = ptr->data;
@@ -2289,37 +2132,18 @@ static void rna_GeometryNodeCompare_data_type_update(Main *bmain, Scene *scene,
rna_Node_socket_update(bmain, scene, ptr);
}
-static bool attribute_convert_type_supported(const EnumPropertyItem *item)
-{
- return ELEM(item->value,
- CD_AUTO_FROM_NAME,
- CD_PROP_FLOAT,
- CD_PROP_FLOAT2,
- CD_PROP_FLOAT3,
- CD_PROP_COLOR,
- CD_PROP_BOOL,
- CD_PROP_INT32);
-}
-static const EnumPropertyItem *rna_GeometryNodeAttributeConvert_type_itemf(
- bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
-{
- *r_free = true;
- return itemf_function_check(rna_enum_attribute_type_with_auto_items,
- attribute_convert_type_supported);
-}
-
-static bool attribute_fill_type_supported(const EnumPropertyItem *item)
+static bool generic_attribute_type_supported(const EnumPropertyItem *item)
{
return ELEM(
item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3, CD_PROP_COLOR, CD_PROP_BOOL, CD_PROP_INT32);
}
-static const EnumPropertyItem *rna_GeometryNodeAttributeFill_type_itemf(bContext *UNUSED(C),
+static const EnumPropertyItem *rna_GeometryNodeAttributeType_type_itemf(bContext *UNUSED(C),
PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop),
bool *r_free)
{
*r_free = true;
- return itemf_function_check(rna_enum_attribute_type_items, attribute_fill_type_supported);
+ return itemf_function_check(rna_enum_attribute_type_items, generic_attribute_type_supported);
}
static bool transfer_attribute_type_supported(const EnumPropertyItem *item)
@@ -2327,7 +2151,6 @@ static bool transfer_attribute_type_supported(const EnumPropertyItem *item)
return ELEM(
item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3, CD_PROP_COLOR, CD_PROP_BOOL, CD_PROP_INT32);
}
-
static const EnumPropertyItem *rna_NodeGeometryTransferAttribute_type_itemf(
bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
@@ -2346,122 +2169,6 @@ static const EnumPropertyItem *rna_GeometryNodeAttributeStatistic_type_itemf(
return itemf_function_check(rna_enum_attribute_type_items, attribute_statistic_type_supported);
}
-/**
- * This bit of ugly code makes sure the float / attribute option shows up instead of
- * vector / attribute if the node uses an operation that uses a float for input B or C.
- */
-static const EnumPropertyItem *rna_GeometryNodeAttributeVectorMath_input_type_b_itemf(
- bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
-{
- bNode *node = ptr->data;
- NodeAttributeVectorMath *node_storage = (NodeAttributeVectorMath *)node->storage;
-
- EnumPropertyItem *item_array = NULL;
- int items_len = 0;
- for (const EnumPropertyItem *item = rna_node_geometry_attribute_input_type_items_any;
- item->identifier != NULL;
- item++) {
- if (item->value == GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE) {
- RNA_enum_item_add(&item_array, &items_len, item);
- }
- else if (item->value == GEO_NODE_ATTRIBUTE_INPUT_FLOAT) {
- if (node_storage->operation == NODE_VECTOR_MATH_SCALE) {
- RNA_enum_item_add(&item_array, &items_len, item);
- }
- }
- else if (item->value == GEO_NODE_ATTRIBUTE_INPUT_VECTOR) {
- if (node_storage->operation != NODE_VECTOR_MATH_SCALE) {
- RNA_enum_item_add(&item_array, &items_len, item);
- }
- }
- }
- RNA_enum_item_end(&item_array, &items_len);
-
- *r_free = true;
- return item_array;
-}
-
-static const EnumPropertyItem *rna_GeometryNodeAttributeVectorMath_input_type_c_itemf(
- bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
-{
- bNode *node = ptr->data;
- NodeAttributeVectorMath *node_storage = (NodeAttributeVectorMath *)node->storage;
-
- EnumPropertyItem *item_array = NULL;
- int items_len = 0;
- for (const EnumPropertyItem *item = rna_node_geometry_attribute_input_type_items_any;
- item->identifier != NULL;
- item++) {
- if (item->value == GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE) {
- RNA_enum_item_add(&item_array, &items_len, item);
- }
- else if (item->value == GEO_NODE_ATTRIBUTE_INPUT_FLOAT) {
- if (node_storage->operation == NODE_VECTOR_MATH_REFRACT) {
- RNA_enum_item_add(&item_array, &items_len, item);
- }
- }
- else if (item->value == GEO_NODE_ATTRIBUTE_INPUT_VECTOR) {
- if (node_storage->operation != NODE_VECTOR_MATH_REFRACT) {
- RNA_enum_item_add(&item_array, &items_len, item);
- }
- }
- }
- RNA_enum_item_end(&item_array, &items_len);
-
- *r_free = true;
- return item_array;
-}
-
-static void rna_GeometryNodeAttributeVectorMath_operation_update(Main *bmain,
- Scene *scene,
- PointerRNA *ptr)
-{
- bNode *node = ptr->data;
- NodeAttributeVectorMath *node_storage = (NodeAttributeVectorMath *)node->storage;
-
- const NodeVectorMathOperation operation = (NodeVectorMathOperation)node_storage->operation;
-
- /* The scale operation can't use a vector input, so reset
- * the input type enum in case it's set to vector. */
- if (operation == NODE_VECTOR_MATH_SCALE) {
- if (node_storage->input_type_b == GEO_NODE_ATTRIBUTE_INPUT_VECTOR) {
- node_storage->input_type_b = GEO_NODE_ATTRIBUTE_INPUT_FLOAT;
- }
- }
-
- /* Scale is also the only operation that uses the float input type, so a
- * a check is also necessary for the other direction. */
- if (operation != NODE_VECTOR_MATH_SCALE) {
- if (node_storage->input_type_b == GEO_NODE_ATTRIBUTE_INPUT_FLOAT) {
- node_storage->input_type_b = GEO_NODE_ATTRIBUTE_INPUT_VECTOR;
- }
- }
-
- rna_Node_socket_update(bmain, scene, ptr);
-}
-
-static bool attribute_map_range_type_supported(const EnumPropertyItem *item)
-{
- return ELEM(item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3);
-}
-static const EnumPropertyItem *rna_GeometryNodeAttributeMapRange_type_itemf(
- bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
-{
- *r_free = true;
- return itemf_function_check(rna_enum_attribute_type_items, attribute_map_range_type_supported);
-}
-
-static bool attribute_curve_map_type_supported(const EnumPropertyItem *item)
-{
- return ELEM(item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3, CD_PROP_COLOR);
-}
-static const EnumPropertyItem *rna_GeometryNodeAttributeCurveMap_type_itemf(
- bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
-{
- *r_free = true;
- return itemf_function_check(rna_enum_attribute_type_items, attribute_curve_map_type_supported);
-}
-
static StructRNA *rna_ShaderNode_register(Main *bmain,
ReportList *reports,
void *data,
@@ -9636,71 +9343,6 @@ static void def_fn_random_value(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
-static void def_geo_attribute_randomize(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeRandomize", "storage");
-
- prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "data_type");
- RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeRandom_type_itemf");
- RNA_def_property_enum_default(prop, CD_PROP_FLOAT);
- RNA_def_property_ui_text(prop, "Data Type", "Type of data stored in attribute");
- RNA_def_property_update(
- prop, NC_NODE | NA_EDITED, "rna_GeometryNodeAttributeRandomize_data_type_update");
-
- prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "operation");
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_randomize_operation_items);
- RNA_def_property_enum_funcs(
- prop, NULL, NULL, "rna_GeometryNodeAttributeRandomize_operation_itemf");
- RNA_def_property_enum_default(prop, GEO_NODE_ATTRIBUTE_RANDOMIZE_REPLACE_CREATE);
- RNA_def_property_ui_text(prop, "Operation", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
-static void def_geo_attribute_fill(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "custom1");
- RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeFill_type_itemf");
- RNA_def_property_enum_default(prop, CD_PROP_FLOAT);
- RNA_def_property_ui_text(prop, "Data Type", "Type of data stored in attribute");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update");
-
- prop = RNA_def_property(srna, "domain", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "custom2");
- RNA_def_property_enum_items(prop, rna_enum_attribute_domain_with_auto_items);
- RNA_def_property_enum_default(prop, ATTR_DOMAIN_AUTO);
- RNA_def_property_ui_text(prop, "Domain", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-}
-
-static void def_geo_attribute_convert(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeConvert", "storage");
-
- prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_enum_attribute_type_with_auto_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeConvert_type_itemf");
- RNA_def_property_enum_default(prop, CD_AUTO_FROM_NAME);
- RNA_def_property_ui_text(prop, "Data Type", "The data type to save the result attribute with");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update");
-
- prop = RNA_def_property(srna, "domain", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_enum_attribute_domain_with_auto_items);
- RNA_def_property_enum_default(prop, ATTR_DOMAIN_AUTO);
- RNA_def_property_ui_text(prop, "Domain", "The geometry domain to save the result attribute in");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-}
-
static void def_geo_attribute_statistic(StructRNA *srna)
{
PropertyRNA *prop;
@@ -9724,229 +9366,6 @@ static void def_geo_attribute_statistic(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
-static void def_geo_attribute_math(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeMath", "storage");
-
- prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "operation");
- RNA_def_property_enum_items(prop, rna_enum_node_math_items);
- RNA_def_property_enum_default(prop, NODE_MATH_ADD);
- RNA_def_property_ui_text(prop, "Operation", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_a", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "input_type_a");
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type A", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_b", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "input_type_b");
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type B", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_c", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "input_type_c");
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type C", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
-static void def_geo_attribute_vector_math(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeVectorMath", "storage");
-
- prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "operation");
- RNA_def_property_enum_items(prop, rna_enum_node_vec_math_items);
- RNA_def_property_ui_text(prop, "Operation", "");
- RNA_def_property_update(
- prop, NC_NODE | NA_EDITED, "rna_GeometryNodeAttributeVectorMath_operation_update");
-
- prop = RNA_def_property(srna, "input_type_a", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "input_type_a");
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type A", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_b", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "input_type_b");
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_any);
- RNA_def_property_enum_funcs(
- prop, NULL, NULL, "rna_GeometryNodeAttributeVectorMath_input_type_b_itemf");
- RNA_def_property_ui_text(prop, "Input Type B", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_c", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "input_type_c");
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_any);
- RNA_def_property_enum_funcs(
- prop, NULL, NULL, "rna_GeometryNodeAttributeVectorMath_input_type_c_itemf");
- RNA_def_property_ui_text(prop, "Input Type C", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
-static void def_geo_attribute_map_range(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeMapRange", "storage");
-
- prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "data_type");
- RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeMapRange_type_itemf");
- RNA_def_property_ui_text(prop, "Data Type", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "interpolation_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "interpolation_type");
- RNA_def_property_enum_items(prop, rna_enum_node_map_range_items);
- RNA_def_property_ui_text(prop, "Interpolation Type", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_ShaderNode_socket_update");
-}
-
-static void def_geo_point_instance(StructRNA *srna)
-{
- static const EnumPropertyItem instance_type_items[] = {
- {GEO_NODE_POINT_INSTANCE_TYPE_OBJECT,
- "OBJECT",
- ICON_NONE,
- "Object",
- "Instance an individual object on all points"},
- {GEO_NODE_POINT_INSTANCE_TYPE_COLLECTION,
- "COLLECTION",
- ICON_NONE,
- "Collection",
- "Instance an entire collection on all points"},
- {GEO_NODE_POINT_INSTANCE_TYPE_GEOMETRY,
- "GEOMETRY",
- ICON_NONE,
- "Geometry",
- "Copy geometry to all points"},
- {0, NULL, 0, NULL, NULL},
- };
-
- PropertyRNA *prop;
- RNA_def_struct_sdna_from(srna, "NodeGeometryPointInstance", "storage");
-
- prop = RNA_def_property(srna, "instance_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "instance_type");
- RNA_def_property_enum_items(prop, instance_type_items);
- RNA_def_property_enum_default(prop, GEO_NODE_POINT_INSTANCE_TYPE_OBJECT);
- RNA_def_property_ui_text(prop, "Instance Type", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "use_whole_collection", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GEO_NODE_POINT_INSTANCE_WHOLE_COLLECTION);
- RNA_def_property_ui_text(prop, "Whole Collection", "Instance entire collection on each point");
- RNA_def_property_update(prop, 0, "rna_Node_socket_update");
-}
-
-static void def_geo_attribute_mix(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeMix", "storage");
-
- prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_enum_ramp_blend_items);
- RNA_def_property_enum_default(prop, MA_RAMP_BLEND);
- RNA_def_property_ui_text(prop, "Blending Mode", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "input_type_factor", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type Factor", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_a", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_no_boolean);
- RNA_def_property_ui_text(prop, "Input Type A", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_b", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_no_boolean);
- RNA_def_property_ui_text(prop, "Input Type B", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
-static void def_geo_attribute_clamp(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeClamp", "storage");
-
- prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "data_type");
- RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeClamp_type_itemf");
- RNA_def_property_ui_text(prop, "Data Type", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_enum_node_clamp_items);
- RNA_def_property_enum_default(prop, NODE_CLAMP_MINMAX);
- RNA_def_property_ui_text(prop, "Operation", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-}
-
-static void def_geo_attribute_attribute_compare(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeCompare", "storage");
-
- prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_enum_node_float_compare_items);
- RNA_def_property_enum_default(prop, NODE_COMPARE_GREATER_THAN);
- RNA_def_property_ui_text(prop, "Operation", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_a", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_no_boolean);
- RNA_def_property_ui_text(prop, "Input Type A", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_b", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_no_boolean);
- RNA_def_property_ui_text(prop, "Input Type B", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
-static void def_geo_point_distribute(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- static const EnumPropertyItem rna_node_geometry_point_distribute_method_items[] = {
- {GEO_NODE_POINT_DISTRIBUTE_RANDOM,
- "RANDOM",
- 0,
- "Random",
- "Distribute points randomly on the surface"},
- {GEO_NODE_POINT_DISTRIBUTE_POISSON,
- "POISSON",
- 0,
- "Poisson Disk",
- "Distribute the points randomly on the surface while taking a minimum distance between "
- "points into account"},
- {0, NULL, 0, NULL, NULL},
- };
-
- prop = RNA_def_property(srna, "distribute_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "custom1");
- RNA_def_property_enum_items(prop, rna_node_geometry_point_distribute_method_items);
- RNA_def_property_enum_default(prop, GEO_NODE_POINT_DISTRIBUTE_RANDOM);
- RNA_def_property_ui_text(prop, "Distribution Method", "Method to use for scattering points");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_extrude_mesh(StructRNA *srna)
{
PropertyRNA *prop;
@@ -9995,97 +9414,6 @@ static void def_geo_distribute_points_on_faces(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
-static void def_geo_attribute_color_ramp(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeColorRamp", "storage");
-
- prop = RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Color Ramp", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-}
-
-static void def_geo_attribute_curve_map(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeCurveMap", "storage");
-
- prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "data_type");
- RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeCurveMap_type_itemf");
- RNA_def_property_ui_text(prop, "Data Type", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "curve_vec", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "CurveMapping");
- RNA_def_property_ui_text(prop, "Mapping", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "curve_rgb", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "CurveMapping");
- RNA_def_property_ui_text(prop, "Mapping", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-}
-
-static void def_geo_attribute_vector_rotate(StructRNA *srna)
-{
- static const EnumPropertyItem rotate_mode_items[] = {
- {GEO_NODE_VECTOR_ROTATE_TYPE_AXIS,
- "AXIS_ANGLE",
- 0,
- "Axis Angle",
- "Rotate a point using axis angle"},
- {GEO_NODE_VECTOR_ROTATE_TYPE_AXIS_X, "X_AXIS", 0, "X Axis", "Rotate a point using X axis"},
- {GEO_NODE_VECTOR_ROTATE_TYPE_AXIS_Y, "Y_AXIS", 0, "Y Axis", "Rotate a point using Y axis"},
- {GEO_NODE_VECTOR_ROTATE_TYPE_AXIS_Z, "Z_AXIS", 0, "Z Axis", "Rotate a point using Z axis"},
- {GEO_NODE_VECTOR_ROTATE_TYPE_EULER_XYZ,
- "EULER_XYZ",
- 0,
- "Euler",
- "Rotate a point using XYZ order"},
- {0, NULL, 0, NULL, NULL},
- };
-
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeVectorRotate", "storage");
-
- prop = RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "mode");
- RNA_def_property_enum_items(prop, rotate_mode_items);
- RNA_def_property_ui_text(prop, "Mode", "Type of rotation");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_ShaderNode_socket_update");
-
- prop = RNA_def_property(srna, "input_type_vector", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type Vector", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_center", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type Center", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_axis", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type Axis", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_angle", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type Angle", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_rotation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type Rotation", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_curve_spline_type(StructRNA *srna)
{
static const EnumPropertyItem type_items[] = {
@@ -10121,24 +9449,6 @@ static void def_geo_curve_set_handle_type(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
-static void def_geo_legacy_curve_set_handles(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryCurveSetHandles", "storage");
-
- prop = RNA_def_property(srna, "handle_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "handle_type");
- RNA_def_property_enum_items(prop, rna_node_geometry_curve_handle_type_items);
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_curve_handle_side_items);
- RNA_def_property_ui_text(prop, "Mode", "Whether to update left and right handles");
- RNA_def_property_flag(prop, PROP_ENUM_FLAG);
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_curve_set_handle_positions(StructRNA *srna)
{
PropertyRNA *prop;
@@ -10151,24 +9461,6 @@ static void def_geo_curve_set_handle_positions(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
-static void def_geo_curve_select_handles(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryCurveSelectHandles", "storage");
-
- prop = RNA_def_property(srna, "handle_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "handle_type");
- RNA_def_property_enum_items(prop, rna_node_geometry_curve_handle_type_items);
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_curve_handle_side_items);
- RNA_def_property_ui_text(prop, "Mode", "Whether to check the type of left and right handles");
- RNA_def_property_flag(prop, PROP_ENUM_FLAG);
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_curve_handle_type_selection(StructRNA *srna)
{
PropertyRNA *prop;
@@ -10266,66 +9558,6 @@ static void def_geo_curve_primitive_line(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
-static void def_geo_point_rotate(StructRNA *srna)
-{
- static const EnumPropertyItem type_items[] = {
- {GEO_NODE_POINT_ROTATE_TYPE_AXIS_ANGLE,
- "AXIS_ANGLE",
- ICON_NONE,
- "Axis Angle",
- "Rotate around an axis by an angle"},
- {GEO_NODE_POINT_ROTATE_TYPE_EULER,
- "EULER",
- ICON_NONE,
- "Euler",
- "Rotate around the X, Y, and Z axes"},
- {0, NULL, 0, NULL, NULL},
- };
-
- static const EnumPropertyItem space_items[] = {
- {GEO_NODE_POINT_ROTATE_SPACE_OBJECT,
- "OBJECT",
- ICON_NONE,
- "Object",
- "Rotate points in the local space of the object"},
- {GEO_NODE_POINT_ROTATE_SPACE_POINT,
- "POINT",
- ICON_NONE,
- "Point",
- "Rotate every point in its local space (as defined by the 'rotation' attribute)"},
- {0, NULL, 0, NULL, NULL},
- };
-
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryRotatePoints", "storage");
-
- prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, type_items);
- RNA_def_property_ui_text(prop, "Type", "Method used to describe the rotation");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, space_items);
- RNA_def_property_ui_text(prop, "Space", "Base orientation of the points");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "input_type_axis", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type Axis", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_angle", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type Angle", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_rotation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type Rotation", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_fn_rotate_euler(StructRNA *srna)
{
static const EnumPropertyItem type_items[] = {
@@ -10371,76 +9603,6 @@ static void def_fn_rotate_euler(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
-static void def_geo_align_rotation_to_vector(StructRNA *srna)
-{
- static const EnumPropertyItem axis_items[] = {
- {GEO_NODE_ALIGN_ROTATION_TO_VECTOR_AXIS_X,
- "X",
- ICON_NONE,
- "X",
- "Align the X axis with the vector"},
- {GEO_NODE_ALIGN_ROTATION_TO_VECTOR_AXIS_Y,
- "Y",
- ICON_NONE,
- "Y",
- "Align the Y axis with the vector"},
- {GEO_NODE_ALIGN_ROTATION_TO_VECTOR_AXIS_Z,
- "Z",
- ICON_NONE,
- "Z",
- "Align the Z axis with the vector"},
- {0, NULL, 0, NULL, NULL},
- };
-
- static const EnumPropertyItem pivot_axis_items[] = {
- {GEO_NODE_ALIGN_ROTATION_TO_VECTOR_PIVOT_AXIS_AUTO,
- "AUTO",
- ICON_NONE,
- "Auto",
- "Automatically detect the best rotation axis to rotate towards the vector"},
- {GEO_NODE_ALIGN_ROTATION_TO_VECTOR_PIVOT_AXIS_X,
- "X",
- ICON_NONE,
- "X",
- "Rotate around the local X axis"},
- {GEO_NODE_ALIGN_ROTATION_TO_VECTOR_PIVOT_AXIS_Y,
- "Y",
- ICON_NONE,
- "Y",
- "Rotate around the local Y axis"},
- {GEO_NODE_ALIGN_ROTATION_TO_VECTOR_PIVOT_AXIS_Z,
- "Z",
- ICON_NONE,
- "Z",
- "Rotate around the local Z axis"},
- {0, NULL, 0, NULL, NULL},
- };
-
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryAlignRotationToVector", "storage");
-
- prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, axis_items);
- RNA_def_property_ui_text(prop, "Axis", "Axis to align to the vector");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "pivot_axis", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, pivot_axis_items);
- RNA_def_property_ui_text(prop, "Pivot Axis", "Axis to rotate around");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "input_type_factor", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type Factor", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_vector", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type Vector", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_fn_align_euler_to_vector(StructRNA *srna)
{
static const EnumPropertyItem axis_items[] = {
@@ -10501,30 +9663,6 @@ static void def_fn_align_euler_to_vector(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
-static void def_geo_point_scale(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryPointScale", "storage");
-
- prop = RNA_def_property(srna, "input_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float_vector);
- RNA_def_property_ui_text(prop, "Input Type", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
-static void def_geo_point_translate(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryPointTranslate", "storage");
-
- prop = RNA_def_property(srna, "input_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_object_info(StructRNA *srna)
{
PropertyRNA *prop;
@@ -10555,37 +9693,6 @@ static void def_geo_object_info(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update_relations");
}
-static void def_geo_legacy_points_to_volume(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- static EnumPropertyItem resolution_mode_items[] = {
- {GEO_NODE_POINTS_TO_VOLUME_RESOLUTION_MODE_AMOUNT,
- "VOXEL_AMOUNT",
- 0,
- "Amount",
- "Specify the approximate number of voxels along the diagonal"},
- {GEO_NODE_POINTS_TO_VOLUME_RESOLUTION_MODE_SIZE,
- "VOXEL_SIZE",
- 0,
- "Size",
- "Specify the voxel side length"},
- {0, NULL, 0, NULL, NULL},
- };
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryPointsToVolume", "storage");
-
- prop = RNA_def_property(srna, "resolution_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, resolution_mode_items);
- RNA_def_property_ui_text(prop, "Resolution Mode", "How the voxel size is specified");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_radius", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Radius Input Type", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_points_to_volume(StructRNA *srna)
{
PropertyRNA *prop;
@@ -10639,39 +9746,6 @@ static void def_geo_collection_info(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update_relations");
}
-static void def_geo_legacy_attribute_proximity(StructRNA *srna)
-{
- static const EnumPropertyItem target_geometry_element[] = {
- {GEO_NODE_PROXIMITY_TARGET_POINTS,
- "POINTS",
- ICON_NONE,
- "Points",
- "Calculate proximity to the target's points (usually faster than the other two modes)"},
- {GEO_NODE_PROXIMITY_TARGET_EDGES,
- "EDGES",
- ICON_NONE,
- "Edges",
- "Calculate proximity to the target's edges"},
- {GEO_NODE_PROXIMITY_TARGET_FACES,
- "FACES",
- ICON_NONE,
- "Faces",
- "Calculate proximity to the target's faces"},
- {0, NULL, 0, NULL, NULL},
- };
-
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryAttributeProximity", "storage");
-
- prop = RNA_def_property(srna, "target_geometry_element", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, target_geometry_element);
- RNA_def_property_enum_default(prop, GEO_NODE_PROXIMITY_TARGET_FACES);
- RNA_def_property_ui_text(
- prop, "Target Geometry", "Element of the target geometry to calculate the distance from");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_proximity(StructRNA *srna)
{
static const EnumPropertyItem target_element_items[] = {
@@ -10736,40 +9810,6 @@ static void def_geo_volume_to_mesh(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
-static void def_geo_attribute_combine_xyz(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeCombineXYZ", "storage");
-
- prop = RNA_def_property(srna, "input_type_x", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type X", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_y", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type Y", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_z", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type Z", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
-static void def_geo_attribute_separate_xyz(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeAttributeSeparateXYZ", "storage");
-
- prop = RNA_def_property(srna, "input_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_mesh_circle(StructRNA *srna)
{
PropertyRNA *prop;
@@ -10936,18 +9976,6 @@ static void def_geo_curve_resample(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
-static void def_geo_legacy_curve_subdivide(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryCurveSubdivide", "storage");
-
- prop = RNA_def_property(srna, "cuts_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_int);
- RNA_def_property_ui_text(prop, "Cuts Type", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_curve_fillet(StructRNA *srna)
{
PropertyRNA *prop;
@@ -10974,38 +10002,6 @@ static void def_geo_curve_fillet(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
-static void def_geo_legacy_curve_to_points(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- static EnumPropertyItem mode_items[] = {
- {GEO_NODE_CURVE_RESAMPLE_EVALUATED,
- "EVALUATED",
- 0,
- "Evaluated",
- "Create points from the curve's evaluated points, based on the resolution attribute for "
- "NURBS and Bezier splines"},
- {GEO_NODE_CURVE_RESAMPLE_COUNT,
- "COUNT",
- 0,
- "Count",
- "Sample each spline by evenly distributing the specified number of points"},
- {GEO_NODE_CURVE_RESAMPLE_LENGTH,
- "LENGTH",
- 0,
- "Length",
- "Sample each spline by splitting it into segments with the specified length"},
- {0, NULL, 0, NULL, NULL},
- };
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryCurveToPoints", "storage");
-
- prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, mode_items);
- RNA_def_property_ui_text(prop, "Mode", "How to generate points from the input curve");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_curve_to_points(StructRNA *srna)
{
PropertyRNA *prop;
@@ -11100,40 +10096,6 @@ static void def_geo_curve_trim(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
-static void def_geo_attribute_transfer(StructRNA *srna)
-{
- static EnumPropertyItem mapping_items[] = {
- {GEO_NODE_LEGACY_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED,
- "NEAREST_FACE_INTERPOLATED",
- 0,
- "Nearest Face Interpolated",
- "Transfer the attribute from the nearest face on a surface (loose points and edges are "
- "ignored)"},
- {GEO_NODE_LEGACY_ATTRIBUTE_TRANSFER_NEAREST,
- "NEAREST",
- 0,
- "Nearest",
- "Transfer the element from the nearest element (using face and edge centers for the "
- "distance computation)"},
- {0, NULL, 0, NULL, NULL},
- };
-
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryAttributeTransfer", "storage");
-
- prop = RNA_def_property(srna, "domain", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_enum_attribute_domain_with_auto_items);
- RNA_def_property_enum_default(prop, ATTR_DOMAIN_AUTO);
- RNA_def_property_ui_text(prop, "Domain", "The geometry domain to save the result attribute in");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, mapping_items);
- RNA_def_property_ui_text(prop, "Mapping", "Mapping between geometries");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-}
-
static void def_geo_transfer_attribute(StructRNA *srna)
{
static EnumPropertyItem mapping_items[] = {
@@ -11194,42 +10156,6 @@ static void def_geo_input_material(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
-static void def_geo_legacy_raycast(StructRNA *srna)
-{
- static EnumPropertyItem mapping_items[] = {
- {GEO_NODE_RAYCAST_INTERPOLATED,
- "INTERPOLATED",
- 0,
- "Interpolated",
- "Interpolate the attribute from the corners of the hit face"},
- {GEO_NODE_RAYCAST_NEAREST,
- "NEAREST",
- 0,
- "Nearest",
- "Use the attribute value of the closest mesh element"},
- {0, NULL, 0, NULL, NULL},
- };
-
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometryRaycast", "storage");
-
- prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, mapping_items);
- RNA_def_property_ui_text(prop, "Mapping", "Mapping from the target geometry to hit points");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "input_type_ray_direction", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
- RNA_def_property_ui_text(prop, "Input Type Ray Direction", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-
- prop = RNA_def_property(srna, "input_type_ray_length", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float);
- RNA_def_property_ui_text(prop, "Input Type Ray Length", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
-}
-
static void def_geo_raycast(StructRNA *srna)
{
static EnumPropertyItem mapping_items[] = {
@@ -11257,7 +10183,7 @@ static void def_geo_raycast(StructRNA *srna)
prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeFill_type_itemf");
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeType_type_itemf");
RNA_def_property_enum_default(prop, CD_PROP_FLOAT);
RNA_def_property_ui_text(prop, "Data Type", "Type of data stored in attribute");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update");
@@ -11289,7 +10215,7 @@ static void def_geo_store_named_attribute(StructRNA *srna)
prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeFill_type_itemf");
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeType_type_itemf");
RNA_def_property_enum_default(prop, CD_PROP_FLOAT);
RNA_def_property_ui_text(prop, "Data Type", "Type of data stored in attribute");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update");
@@ -11309,7 +10235,7 @@ static void def_geo_input_named_attribute(StructRNA *srna)
prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeFill_type_itemf");
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeType_type_itemf");
RNA_def_property_enum_default(prop, CD_PROP_FLOAT);
RNA_def_property_ui_text(prop, "Data Type", "The data type used to read the attribute values");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update");
@@ -11323,7 +10249,7 @@ static void def_geo_attribute_capture(StructRNA *srna)
prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeFill_type_itemf");
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeType_type_itemf");
RNA_def_property_enum_default(prop, CD_PROP_FLOAT);
RNA_def_property_ui_text(prop, "Data Type", "Type of data stored in attribute");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update");
@@ -11550,7 +10476,7 @@ static void def_geo_viewer(StructRNA *srna)
prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeFill_type_itemf");
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeType_type_itemf");
RNA_def_property_enum_default(prop, CD_PROP_FLOAT);
RNA_def_property_ui_text(prop, "Data Type", "");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update");
@@ -11580,7 +10506,7 @@ static void def_geo_field_at_index(StructRNA *srna)
prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "custom2");
RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeFill_type_itemf");
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeType_type_itemf");
RNA_def_property_ui_text(prop, "Data Type", "");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update");
}