WIP: uv-simple-select #1

Closed
Chris Blackbourn wants to merge 182 commits from uv-simple-select into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
4 changed files with 20 additions and 1 deletions
Showing only changes of commit e60a54ac2d - Show all commits

View File

@ -1465,6 +1465,11 @@ static void std_node_socket_interface_draw(bContext * /*C*/, uiLayout *layout, P
} }
uiItemR(layout, ptr, "hide_value", DEFAULT_FLAGS, nullptr, 0); uiItemR(layout, ptr, "hide_value", DEFAULT_FLAGS, nullptr, 0);
const bNodeTree *node_tree = reinterpret_cast<const bNodeTree *>(ptr->owner_id);
if (sock->in_out == SOCK_IN && node_tree->type == NTREE_GEOMETRY) {
uiItemR(col, ptr, "hide_in_modifier", DEFAULT_FLAGS, nullptr, 0);
}
} }
static void node_socket_virtual_draw_color(bContext * /*C*/, static void node_socket_virtual_draw_color(bContext * /*C*/,

View File

@ -282,6 +282,10 @@ typedef enum eNodeSocketFlag {
* type is obvious and the name takes up too much space. * type is obvious and the name takes up too much space.
*/ */
SOCK_HIDE_LABEL = (1 << 12), SOCK_HIDE_LABEL = (1 << 12),
/**
* Only used for geometry nodes. Don't show the socket value in the modifier interface.
*/
SOCK_HIDE_IN_MODIFIER = (1 << 13),
} eNodeSocketFlag; } eNodeSocketFlag;
typedef struct bNode { typedef struct bNode {

View File

@ -11219,6 +11219,14 @@ static void rna_def_node_socket_interface(BlenderRNA *brna)
prop, "Hide Value", "Hide the socket input value even when the socket is not connected"); prop, "Hide Value", "Hide the socket input value even when the socket is not connected");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocketInterface_update"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocketInterface_update");
prop = RNA_def_property(srna, "hide_in_modifier", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SOCK_HIDE_IN_MODIFIER);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop,
"Hide in Modifier",
"Don't show the input value in the geometry nodes modifier interface");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocketInterface_update");
prop = RNA_def_property(srna, "attribute_domain", PROP_ENUM, PROP_NONE); prop = RNA_def_property(srna, "attribute_domain", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_attribute_domain_items); RNA_def_property_enum_items(prop, rna_enum_attribute_domain_items);
RNA_def_property_ui_text( RNA_def_property_ui_text(

View File

@ -1736,7 +1736,9 @@ static void panel_draw(const bContext *C, Panel *panel)
int socket_index; int socket_index;
LISTBASE_FOREACH_INDEX (bNodeSocket *, socket, &nmd->node_group->inputs, socket_index) { LISTBASE_FOREACH_INDEX (bNodeSocket *, socket, &nmd->node_group->inputs, socket_index) {
draw_property_for_socket(*C, layout, nmd, &bmain_ptr, ptr, *socket, socket_index); if (!(socket->flag & SOCK_HIDE_IN_MODIFIER)) {
draw_property_for_socket(*C, layout, nmd, &bmain_ptr, ptr, *socket, socket_index);
}
} }
} }