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 9,865 Lines • ▼ Show 20 Lines | static void def_geo_align_rotation_to_vector(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_vector", PROP_ENUM, PROP_NONE); | 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_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector); | ||||
| RNA_def_property_ui_text(prop, "Input Type Vector", ""); | RNA_def_property_ui_text(prop, "Input Type Vector", ""); | ||||
| 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_fn_align_euler_to_vector(StructRNA *srna) | |||||
| { | |||||
| static const EnumPropertyItem axis_items[] = { | |||||
| {FN_NODE_ALIGN_EULER_TO_VECTOR_AXIS_X, | |||||
| "X", | |||||
| ICON_NONE, | |||||
| "X", | |||||
| "Align the X axis with the vector"}, | |||||
| {FN_NODE_ALIGN_EULER_TO_VECTOR_AXIS_Y, | |||||
| "Y", | |||||
| ICON_NONE, | |||||
| "Y", | |||||
| "Align the Y axis with the vector"}, | |||||
| {FN_NODE_ALIGN_EULER_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[] = { | |||||
| {FN_NODE_ALIGN_EULER_TO_VECTOR_PIVOT_AXIS_AUTO, | |||||
| "AUTO", | |||||
| ICON_NONE, | |||||
| "Auto", | |||||
| "Automatically detect the best rotation axis to rotate towards the vector"}, | |||||
| {FN_NODE_ALIGN_EULER_TO_VECTOR_PIVOT_AXIS_X, | |||||
| "X", | |||||
| ICON_NONE, | |||||
| "X", | |||||
| "Rotate around the local X axis"}, | |||||
| {FN_NODE_ALIGN_EULER_TO_VECTOR_PIVOT_AXIS_Y, | |||||
| "Y", | |||||
| ICON_NONE, | |||||
| "Y", | |||||
| "Rotate around the local Y axis"}, | |||||
| {FN_NODE_ALIGN_EULER_TO_VECTOR_PIVOT_AXIS_Z, | |||||
| "Z", | |||||
| ICON_NONE, | |||||
| "Z", | |||||
| "Rotate around the local Z axis"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| PropertyRNA *prop; | |||||
| prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "custom1"); | |||||
| 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_sdna(prop, NULL, "custom2"); | |||||
| 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"); | |||||
| } | |||||
| static void def_geo_point_scale(StructRNA *srna) | static void def_geo_point_scale(StructRNA *srna) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_struct_sdna_from(srna, "NodeGeometryPointScale", "storage"); | RNA_def_struct_sdna_from(srna, "NodeGeometryPointScale", "storage"); | ||||
| prop = RNA_def_property(srna, "input_type", PROP_ENUM, PROP_NONE); | 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_enum_items(prop, rna_node_geometry_attribute_input_type_items_float_vector); | ||||
| ▲ Show 20 Lines • Show All 2,841 Lines • Show Last 20 Lines | |||||