(Nodes) Display image name if any in the Image and Texture Image node title
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user