I18n: translate Quick Fur data

The Quick Fur operator creates a curves object with hair modifiers and
a material.
These modifiers' and material's names can be translated if the user
chose to translate data in the preferences.

Only the modifier names are translated, the node groups are not
because they may be reused instead of appended again.

Pull Request: https://projects.blender.org/blender/blender/pulls/107909
This commit is contained in:
Damien Picard
2023-05-13 15:52:56 +02:00
committed by Gitea
parent 56df93bfc6
commit 072002a672
2 changed files with 14 additions and 9 deletions

View File

@@ -11,6 +11,8 @@
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BLT_translation.h"
#include "ED_curves.h"
#include "ED_node.h"
#include "ED_object.h"
@@ -63,9 +65,9 @@ void ensure_surface_deformation_node_exists(bContext &C, Object &curves_ob)
Scene *scene = CTX_data_scene(&C);
ModifierData *md = ED_object_modifier_add(
nullptr, bmain, scene, &curves_ob, "Surface Deform", eModifierType_Nodes);
nullptr, bmain, scene, &curves_ob, DATA_("Surface Deform"), eModifierType_Nodes);
NodesModifierData &nmd = *reinterpret_cast<NodesModifierData *>(md);
nmd.node_group = ntreeAddTree(bmain, "Surface Deform", "GeometryNodeTree");
nmd.node_group = ntreeAddTree(bmain, DATA_("Surface Deform"), "GeometryNodeTree");
bNodeTree *ntree = nmd.node_group;
ntreeAddSocketInterface(ntree, SOCK_IN, "NodeSocketGeometry", "Geometry");