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 488 Lines • ▼ Show 20 Lines | |||||
| static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_no_boolean[] = { | static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_no_boolean[] = { | ||||
| ITEM_ATTRIBUTE, | ITEM_ATTRIBUTE, | ||||
| ITEM_FLOAT, | ITEM_FLOAT, | ||||
| ITEM_VECTOR, | ITEM_VECTOR, | ||||
| ITEM_COLOR, | ITEM_COLOR, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem rna_node_geometry_object_info_transform_space_items[] = { | |||||
| {GEO_NODE_TRANSFORM_SPACE_ORIGINAL, | |||||
HooglyBoogly: If there's no description I think this usually gets set to `""` rather than `NULL`.
But this… | |||||
Not Done Inline ActionsSuggested names/tooltips, hoping they're not lies: Mets: Suggested names/tooltips, hoping they're not lies:
Local Space: Transformations relative to the… | |||||
| "ORIGINAL", | |||||
| 0, | |||||
| "Original", | |||||
| "Output the geometry relative to the input object transform, and the location, rotation and " | |||||
| "scale relative to the world origin"}, | |||||
| {GEO_NODE_TRANSFORM_SPACE_RELATIVE, | |||||
| "RELATIVE", | |||||
| 0, | |||||
| "Relative", | |||||
| "Bring the input object geometry, location, rotation and scale into the modified object, " | |||||
Not Done Inline ActionsActually, mind moving this "s"? HooglyBoogly: Actually, mind moving this "s"? | |||||
| "maintaining the relative position between the two objects in the scene"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| #endif | #endif | ||||
| #undef ITEM_ATTRIBUTE | #undef ITEM_ATTRIBUTE | ||||
| #undef ITEM_FLOAT | #undef ITEM_FLOAT | ||||
| #undef ITEM_VECTOR | #undef ITEM_VECTOR | ||||
| #undef ITEM_COLOR | #undef ITEM_COLOR | ||||
| #undef ITEM_BOOLEAN | #undef ITEM_BOOLEAN | ||||
| ▲ Show 20 Lines • Show All 8,336 Lines • ▼ Show 20 Lines | static void def_geo_point_translate(StructRNA *srna) | ||||
| RNA_def_struct_sdna_from(srna, "NodeGeometryPointTranslate", "storage"); | RNA_def_struct_sdna_from(srna, "NodeGeometryPointTranslate", "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_vector); | 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_ui_text(prop, "Input Type", ""); | ||||
| 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_object_info(StructRNA *srna) | |||||
| { | |||||
| PropertyRNA *prop; | |||||
| RNA_def_struct_sdna_from(srna, "NodeGeometryObjectInfo", "storage"); | |||||
| prop = RNA_def_property(srna, "transform_space", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, rna_node_geometry_object_info_transform_space_items); | |||||
| RNA_def_property_ui_text(prop, | |||||
Not Done Inline ActionsSame comment here, I think we need a description here, and ideally a more descriptive property name too. HooglyBoogly: Same comment here, I think we need a description here, and ideally a more descriptive property… | |||||
| "Transform Space", | |||||
Not Done Inline ActionsI think "rna_Node_update" would work here HooglyBoogly: I think `"rna_Node_update"` would work here | |||||
| "Determine the transformation applied to vector and geometry outputs"); | |||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | |||||
Not Done Inline ActionsActually I think this is a bit better HooglyBoogly: Actually I think this is a bit better
`"Determine the transformation applied to vector and… | |||||
| } | |||||
| /* -------------------------------------------------------------------------- */ | /* -------------------------------------------------------------------------- */ | ||||
| static void rna_def_shader_node(BlenderRNA *brna) | static void rna_def_shader_node(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| srna = RNA_def_struct(brna, "ShaderNode", "NodeInternal"); | srna = RNA_def_struct(brna, "ShaderNode", "NodeInternal"); | ||||
| RNA_def_struct_ui_text(srna, "Shader Node", "Material shader node"); | RNA_def_struct_ui_text(srna, "Shader Node", "Material shader node"); | ||||
| ▲ Show 20 Lines • Show All 1,912 Lines • Show Last 20 Lines | |||||
If there's no description I think this usually gets set to "" rather than NULL.
But this is a situation where we really need good tooltips. This stuff is not obvious and it's a perfect spot to have some information.