diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-12 13:58:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-12 13:58:31 +0300 |
commit | f3c313e77983edb84e1bcd93cc7db707259bff6e (patch) | |
tree | 9c0a4b54d49d7def9accb70652d563804dddfb86 /source/blender/makesrna | |
parent | 684e76181ef05e09affd7fb972735848392c8f69 (diff) |
Revert "Rename Label instead of Name in Node editor using F2 key"
This reverts commit 98b06c20a0d4a66e2d9f4496c788f3d0902ea7c6.
RNA properties should give predictable results,
the desired behavior can be added only in operator logic.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index c60aa494512..44cf15995f9 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1617,31 +1617,6 @@ static void rna_Node_name_set(PointerRNA *ptr, const char *value) BKE_animdata_fix_paths_rename_all(NULL, "nodes", oldname, node->name); } -static int rna_Node_label_length(PointerRNA *ptr) -{ - bNode *node = (bNode *)ptr->data; - - if (node->label[0] == '\0') { - return strlen(node->name); - } - else { - return strlen(node->label); - } - - return 0; -} - -static void rna_Node_label_get(PointerRNA *ptr, char *value) -{ - bNode *node = (bNode *)ptr->data; - if (node->label[0] == '\0') { - strcpy(value, node->name); - } - else { - strcpy(value, node->label); - } -} - static bNodeSocket *rna_Node_inputs_new(ID *id, bNode *node, Main *bmain, ReportList *reports, const char *type, const char *name, const char *identifier) { /* Adding an input to a group node is not working, simpler to add it to its underlying nodetree. */ @@ -8002,7 +7977,6 @@ static void rna_def_node(BlenderRNA *brna) prop = RNA_def_property(srna, "label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "label"); - RNA_def_property_string_funcs(prop, "rna_Node_label_get", "rna_Node_label_length", NULL); RNA_def_property_ui_text(prop, "Label", "Optional custom node label"); RNA_def_property_update(prop, NC_NODE | ND_DISPLAY, NULL); |