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 10,710 Lines • ▼ Show 20 Lines | static void def_geo_input_material(StructRNA *srna) | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "id"); | RNA_def_property_pointer_sdna(prop, NULL, "id"); | ||||
| RNA_def_property_struct_type(prop, "Material"); | RNA_def_property_struct_type(prop, "Material"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | ||||
| RNA_def_property_ui_text(prop, "Material", ""); | RNA_def_property_ui_text(prop, "Material", ""); | ||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | ||||
| } | } | ||||
| static void def_geo_raycast(StructRNA *srna) | static void def_geo_legacy_raycast(StructRNA *srna) | ||||
| { | { | ||||
| static EnumPropertyItem mapping_items[] = { | static EnumPropertyItem mapping_items[] = { | ||||
| {GEO_NODE_RAYCAST_INTERPOLATED, | {GEO_NODE_RAYCAST_INTERPOLATED, | ||||
| "INTERPOLATED", | "INTERPOLATED", | ||||
| 0, | 0, | ||||
| "Interpolated", | "Interpolated", | ||||
| "Interpolate the attribute from the corners of the hit face"}, | "Interpolate the attribute from the corners of the hit face"}, | ||||
| {GEO_NODE_RAYCAST_NEAREST, | {GEO_NODE_RAYCAST_NEAREST, | ||||
| Show All 19 Lines | static void def_geo_legacy_raycast(StructRNA *srna) | ||||
| 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_ray_length", PROP_ENUM, PROP_NONE); | 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_enum_items(prop, rna_node_geometry_attribute_input_type_items_float); | ||||
| RNA_def_property_ui_text(prop, "Input Type Ray Length", ""); | RNA_def_property_ui_text(prop, "Input Type Ray Length", ""); | ||||
| 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"); | ||||
| } | } | ||||
| static void def_geo_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, "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_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"); | |||||
| } | |||||
| static void def_geo_curve_fill(StructRNA *srna) | static void def_geo_curve_fill(StructRNA *srna) | ||||
| { | { | ||||
| static const EnumPropertyItem mode_items[] = { | static const EnumPropertyItem mode_items[] = { | ||||
| {GEO_NODE_CURVE_FILL_MODE_TRIANGULATED, "TRIANGLES", 0, "Triangles", ""}, | {GEO_NODE_CURVE_FILL_MODE_TRIANGULATED, "TRIANGLES", 0, "Triangles", ""}, | ||||
| {GEO_NODE_CURVE_FILL_MODE_NGONS, "NGONS", 0, "N-gons", ""}, | {GEO_NODE_CURVE_FILL_MODE_NGONS, "NGONS", 0, "N-gons", ""}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 2,255 Lines • Show Last 20 Lines | |||||