Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_nodetree.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 432 Lines • ▼ Show 20 Lines | |||||
| }; | }; | ||||
| static const EnumPropertyItem rna_node_geometry_attribute_input_b_items[] = { | static const EnumPropertyItem rna_node_geometry_attribute_input_b_items[] = { | ||||
| {0, "FLOAT", 0, "Float", ""}, | {0, "FLOAT", 0, "Float", ""}, | ||||
| {GEO_NODE_USE_ATTRIBUTE_B, "ATTRIBUTE", 0, "Attribute", ""}, | {GEO_NODE_USE_ATTRIBUTE_B, "ATTRIBUTE", 0, "Attribute", ""}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| # 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_BOOLEAN \ | |||||
| { \ | |||||
| GEO_NODE_ATTRIBUTE_INPUT_BOOLEAN, "BOOLEAN", 0, "Boolean", "" \ | |||||
| } | |||||
| static const EnumPropertyItem rna_node_geometry_attribute_factor_input_type_items[] = { | static const EnumPropertyItem rna_node_geometry_attribute_factor_input_type_items[] = { | ||||
| {GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE, "ATTRIBUTE", 0, "Attribute", ""}, | ITEM_ATTRIBUTE, | ||||
| {GEO_NODE_ATTRIBUTE_INPUT_FLOAT, "FLOAT", 0, "Float", ""}, | ITEM_FLOAT, | ||||
| {0, NULL, 0, NULL, NULL}, | {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}, | |||||
| }; | |||||
| static const EnumPropertyItem rna_node_geometry_attribute_input_type_items[] = { | static const EnumPropertyItem rna_node_geometry_attribute_input_type_items[] = { | ||||
| {GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE, "ATTRIBUTE", 0, "Attribute", ""}, | ITEM_ATTRIBUTE, | ||||
| {GEO_NODE_ATTRIBUTE_INPUT_FLOAT, "FLOAT", 0, "Float", ""}, | ITEM_FLOAT, | ||||
| {GEO_NODE_ATTRIBUTE_INPUT_VECTOR, "VECTOR", 0, "Vector", ""}, | ITEM_VECTOR, | ||||
| {GEO_NODE_ATTRIBUTE_INPUT_COLOR, "COLOR", 0, "Color", ""}, | ITEM_COLOR, | ||||
| ITEM_BOOLEAN, | |||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| # undef ITEM_ATTRIBUTE | |||||
| # undef ITEM_FLOAT | |||||
| # undef ITEM_VECTOR | |||||
| # undef ITEM_COLOR | |||||
| # undef ITEM_BOOLEAN | |||||
| static const EnumPropertyItem rna_node_geometry_point_distribute_method_items[] = { | static const EnumPropertyItem rna_node_geometry_point_distribute_method_items[] = { | ||||
| {GEO_NODE_POINT_DISTRIBUTE_RANDOM, | {GEO_NODE_POINT_DISTRIBUTE_RANDOM, | ||||
| "RANDOM", | "RANDOM", | ||||
| 0, | 0, | ||||
| "Random", | "Random", | ||||
| "Distribute points randomly on the surface"}, | "Distribute points randomly on the surface"}, | ||||
| {GEO_NODE_POINT_DISTRIBUTE_POISSON, | {GEO_NODE_POINT_DISTRIBUTE_POISSON, | ||||
| "POISSON", | "POISSON", | ||||
| ▲ Show 20 Lines • Show All 8,017 Lines • ▼ Show 20 Lines | static void def_geo_attribute_mix(StructRNA *srna) | ||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | ||||
| prop = RNA_def_property(srna, "input_type_factor", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "input_type_factor", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, rna_node_geometry_attribute_factor_input_type_items); | RNA_def_property_enum_items(prop, rna_node_geometry_attribute_factor_input_type_items); | ||||
| RNA_def_property_ui_text(prop, "Input Type Factor", ""); | RNA_def_property_ui_text(prop, "Input Type Factor", ""); | ||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); | 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); | 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_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_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_items(prop, rna_node_geometry_attribute_input_type_items); | RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items); | ||||
| RNA_def_property_ui_text(prop, "Input Type A", ""); | RNA_def_property_ui_text(prop, "Input Type A", ""); | ||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); | 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); | 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); | RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items); | ||||
| RNA_def_property_ui_text(prop, "Input Type B", ""); | RNA_def_property_ui_text(prop, "Input Type B", ""); | ||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); | |||||
JacquesLucke: Did you remove that on purpose? | |||||
HooglyBooglyAuthorUnsubmitted Done Inline ActionsNope, oops! The diff looks quite weird here. I fixed this locally but didn't update the patch for. HooglyBoogly: Nope, oops! The diff looks quite weird here. I fixed this locally but didn't update the patch… | |||||
| } | } | ||||
| static void def_geo_point_distribute(StructRNA *srna) | static void def_geo_point_distribute(StructRNA *srna) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| prop = RNA_def_property(srna, "distribute_method", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "distribute_method", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "custom1"); | RNA_def_property_enum_sdna(prop, NULL, "custom1"); | ||||
| ▲ Show 20 Lines • Show All 1,925 Lines • Show Last 20 Lines | |||||
Did you remove that on purpose?