Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_buttons.c
| Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | static void draw_socket_list(const bContext *C, | ||||
| bNodeSocket *socket = node_tree_find_active_socket(ntree, in_out); | bNodeSocket *socket = node_tree_find_active_socket(ntree, in_out); | ||||
| if (socket != NULL) { | if (socket != NULL) { | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiLayoutSetPropDecorate(layout, false); | uiLayoutSetPropDecorate(layout, false); | ||||
| PointerRNA socket_ptr; | PointerRNA socket_ptr; | ||||
| RNA_pointer_create((ID *)ntree, &RNA_NodeSocketInterface, socket, &socket_ptr); | RNA_pointer_create((ID *)ntree, &RNA_NodeSocketInterface, socket, &socket_ptr); | ||||
| uiItemR(layout, &socket_ptr, "name", 0, NULL, ICON_NONE); | uiItemR(layout, &socket_ptr, "name", 0, NULL, ICON_NONE); | ||||
| /* Display descriptions only for Geometry Nodes, since it's only used in the modifier panel. */ | |||||
| if (ntree->type == NTREE_GEOMETRY) { | |||||
| uiItemR(layout, &socket_ptr, "description", 0, NULL, ICON_NONE); | |||||
| } | |||||
| if (socket->typeinfo->interface_draw) { | if (socket->typeinfo->interface_draw) { | ||||
| socket->typeinfo->interface_draw((bContext *)C, layout, &socket_ptr); | socket->typeinfo->interface_draw((bContext *)C, layout, &socket_ptr); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static void node_tree_interface_inputs_panel(const bContext *C, Panel *panel) | static void node_tree_interface_inputs_panel(const bContext *C, Panel *panel) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines | |||||