Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_templates.c
| Show First 20 Lines • Show All 820 Lines • ▼ Show 20 Lines | else { | ||||
| uiItemS(row); | uiItemS(row); | ||||
| sub = uiLayoutColumn(row, true); | sub = uiLayoutColumn(row, true); | ||||
| } | } | ||||
| ATTR_FALLTHROUGH; | ATTR_FALLTHROUGH; | ||||
| case SOCK_FLOAT: | case SOCK_FLOAT: | ||||
| case SOCK_INT: | case SOCK_INT: | ||||
| case SOCK_BOOLEAN: | case SOCK_BOOLEAN: | ||||
| case SOCK_RGBA: | case SOCK_RGBA: | ||||
| case SOCK_STRING: | |||||
| uiItemR(sub, &inputptr, "default_value", 0, "", ICON_NONE); | uiItemR(sub, &inputptr, "default_value", 0, "", ICON_NONE); | ||||
| uiItemDecoratorR( | uiItemDecoratorR( | ||||
| split_wrapper.decorate_column, &inputptr, "default_value", RNA_NO_INDEX); | split_wrapper.decorate_column, &inputptr, "default_value", RNA_NO_INDEX); | ||||
| break; | break; | ||||
| case SOCK_STRING: { | |||||
| const bNodeTree *node_tree = (const bNodeTree *)nodeptr.owner_id; | |||||
| if (node_tree->type == NTREE_GEOMETRY) { | |||||
| node_geometry_add_attribute_search_button(node_tree, node, &inputptr, row); | |||||
| } | |||||
| else { | |||||
| uiItemR(sub, &inputptr, "default_value", 0, "", ICON_NONE); | |||||
| } | |||||
| uiItemDecoratorR( | |||||
HooglyBoogly: Best to put this after the if, else checks so we get the blank space in both cases. | |||||
| split_wrapper.decorate_column, &inputptr, "default_value", RNA_NO_INDEX); | |||||
| break; | |||||
| } | |||||
| default: | default: | ||||
| add_dummy_decorator = true; | add_dummy_decorator = true; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (add_dummy_decorator) { | if (add_dummy_decorator) { | ||||
| uiItemDecoratorR(split_wrapper.decorate_column, NULL, NULL, 0); | uiItemDecoratorR(split_wrapper.decorate_column, NULL, NULL, 0); | ||||
| Show All 27 Lines | |||||
Best to put this after the if, else checks so we get the blank space in both cases.