I18n: translate newly created node group sockets
Translate: - new group socket names - default names Input and Output - on connecting a link from another node - new geometry nodes input and output socket names Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15763
This commit is contained in:
parent
73bfd8058f
commit
9bf5c37bee
@ -8,8 +8,8 @@ from bpy.app.translations import pgettext_data as data_
|
||||
|
||||
def geometry_node_group_empty_new():
|
||||
group = bpy.data.node_groups.new(data_("Geometry Nodes"), 'GeometryNodeTree')
|
||||
group.inputs.new('NodeSocketGeometry', "Geometry")
|
||||
group.outputs.new('NodeSocketGeometry', "Geometry")
|
||||
group.inputs.new('NodeSocketGeometry', data_("Geometry"))
|
||||
group.outputs.new('NodeSocketGeometry', data_("Geometry"))
|
||||
input_node = group.nodes.new('NodeGroupInput')
|
||||
output_node = group.nodes.new('NodeGroupOutput')
|
||||
output_node.is_active_output = True
|
||||
|
@ -3384,7 +3384,7 @@ struct bNodeSocket *ntreeAddSocketInterfaceFromSocket(bNodeTree *ntree,
|
||||
bNodeSocket *from_sock)
|
||||
{
|
||||
bNodeSocket *iosock = ntreeAddSocketInterface(
|
||||
ntree, static_cast<eNodeSocketInOut>(from_sock->in_out), from_sock->idname, from_sock->name);
|
||||
ntree, static_cast<eNodeSocketInOut>(from_sock->in_out), from_sock->idname, DATA_(from_sock->name));
|
||||
if (iosock) {
|
||||
if (iosock->typeinfo->interface_from_socket) {
|
||||
iosock->typeinfo->interface_from_socket(ntree, iosock, from_node, from_sock);
|
||||
|
@ -29,6 +29,8 @@
|
||||
#include "BKE_scene.h"
|
||||
#include "BKE_workspace.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
||||
#include "DEG_depsgraph_build.h"
|
||||
#include "DEG_depsgraph_query.h"
|
||||
@ -2442,7 +2444,7 @@ static int ntree_socket_add_exec(bContext *C, wmOperator *op)
|
||||
const eNodeSocketInOut in_out = (eNodeSocketInOut)RNA_enum_get(op->ptr, "in_out");
|
||||
ListBase *sockets = (in_out == SOCK_IN) ? &ntree->inputs : &ntree->outputs;
|
||||
|
||||
const char *default_name = (in_out == SOCK_IN) ? "Input" : "Output";
|
||||
const char *default_name = (in_out == SOCK_IN) ? DATA_("Input") : DATA_("Output");
|
||||
bNodeSocket *active_sock = ntree_get_active_interface_socket(sockets);
|
||||
|
||||
bNodeSocket *sock;
|
||||
|
Loading…
x
Reference in New Issue
Block a user