diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-01-08 11:39:32 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-01-08 11:39:32 +0300 |
commit | c26da06ae67348f62b27af33b76f2d18e6c7c274 (patch) | |
tree | 599d76f3b8ce2dc08b20e5617d11854314d12da2 /source/blender/blenkernel | |
parent | 84d4476eb11cddcc88c8271c22bb8d1051421f0d (diff) | |
parent | 96e507d9890e42695ea0c6bff0c8fa5c480bbb5a (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/library_query.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index 4074e0f0dc6..317f743acf1 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -1094,7 +1094,7 @@ bool BKE_library_id_can_use_idtype(ID *id_owner, const short id_type_used) return true; #endif case ID_ME: - return ELEM(id_type_used, ID_ME, ID_KE, ID_MA); + return ELEM(id_type_used, ID_ME, ID_KE, ID_MA, ID_IM); case ID_CU: return ELEM(id_type_used, ID_OB, ID_KE, ID_MA, ID_VF); case ID_MB: diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index b76fd49fc9c..ab9e2665ff0 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -3173,13 +3173,17 @@ void nodeSynchronizeID(bNode *node, bool copy_to_id) void nodeLabel(bNodeTree *ntree, bNode *node, char *label, int maxlen) { + label[0] = '\0'; + if (node->label[0] != '\0') { BLI_strncpy(label, node->label, maxlen); } else if (node->typeinfo->labelfunc) { node->typeinfo->labelfunc(ntree, node, label, maxlen); } - else { + + /* The previous methods (labelfunc) could not provide an adequate label for the node. */ + if (label[0] == '\0') { /* Kind of hacky and weak... Ideally would be better to use RNA here. :| */ const char *tmp = CTX_IFACE_(BLT_I18NCONTEXT_ID_NODETREE, node->typeinfo->ui_name); if (tmp == node->typeinfo->ui_name) { |