I18n: fix translation of Grease Pencil 3.0 layer names #112930
|
@ -1839,13 +1839,13 @@ static std::string unique_node_name(const GreasePencil &grease_pencil,
|
|||
static std::string unique_layer_name(const GreasePencil &grease_pencil,
|
||||
blender::StringRefNull name)
|
||||
{
|
||||
return unique_node_name(grease_pencil, "GP_Layer", name);
|
||||
return unique_node_name(grease_pencil, DATA_("GP_Layer"), name);
|
||||
}
|
||||
|
||||
static std::string unique_layer_group_name(const GreasePencil &grease_pencil,
|
||||
blender::StringRefNull name)
|
||||
{
|
||||
return unique_node_name(grease_pencil, "GP_Group", name);
|
||||
return unique_node_name(grease_pencil, DATA_("GP_Group"), name);
|
||||
}
|
||||
|
||||
blender::bke::greasepencil::Layer &GreasePencil::add_layer(
|
||||
|
|
|
@ -1198,7 +1198,7 @@ void create_blank(Main &bmain, Object &object, const int frame_number)
|
|||
int material_index = add_material_from_template(bmain, object, gp_stroke_material_black);
|
||||
object.actcol = material_index + 1;
|
||||
|
||||
Layer &new_layer = grease_pencil.add_layer(grease_pencil.root_group(), "GP_Layer");
|
||||
Layer &new_layer = grease_pencil.add_layer(grease_pencil.root_group(), DATA_("GP_Layer"));
|
||||
grease_pencil.set_active_layer(&new_layer);
|
||||
grease_pencil.insert_blank_frame(new_layer, frame_number, 0, BEZT_KEYTYPE_KEYFRAME);
|
||||
}
|
||||
|
@ -1217,8 +1217,8 @@ void create_stroke(Main &bmain, Object &object, float4x4 matrix, const int frame
|
|||
add_material_from_template(bmain, object, gp_fill_material_grey);
|
||||
object.actcol = material_index + 1;
|
||||
|
||||
Layer &layer_lines = grease_pencil.add_layer(grease_pencil.root_group(), "Lines");
|
||||
Layer &layer_color = grease_pencil.add_layer(grease_pencil.root_group(), "Color");
|
||||
Layer &layer_lines = grease_pencil.add_layer(grease_pencil.root_group(), DATA_("Lines"));
|
||||
Layer &layer_color = grease_pencil.add_layer(grease_pencil.root_group(), DATA_("Color"));
|
||||
grease_pencil.set_active_layer(&layer_lines);
|
||||
|
||||
grease_pencil.insert_blank_frame(layer_lines, frame_number, 0, BEZT_KEYTYPE_KEYFRAME);
|
||||
|
@ -1278,8 +1278,8 @@ void create_suzanne(Main &bmain, Object &object, float4x4 matrix, const int fram
|
|||
color_skin_shadow,
|
||||
});
|
||||
|
||||
Layer &layer_fills = grease_pencil.add_layer(grease_pencil.root_group(), "Fills");
|
||||
Layer &layer_lines = grease_pencil.add_layer(grease_pencil.root_group(), "Lines");
|
||||
Layer &layer_fills = grease_pencil.add_layer(grease_pencil.root_group(), DATA_("Fills"));
|
||||
Layer &layer_lines = grease_pencil.add_layer(grease_pencil.root_group(), DATA_("Lines"));
|
||||
grease_pencil.set_active_layer(&layer_lines);
|
||||
|
||||
grease_pencil.insert_blank_frame(layer_lines, frame_number, 0, BEZT_KEYTYPE_KEYFRAME);
|
||||
|
|
|
@ -83,7 +83,7 @@ static void GREASE_PENCIL_OT_layer_add(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
PropertyRNA *prop = RNA_def_string(
|
||||
ot->srna, "new_layer_name", "GP_Layer", INT16_MAX, "Name", "Name of the new layer");
|
||||
ot->srna, "new_layer_name", nullptr, INT16_MAX, "Name", "Name of the new layer");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
ot->prop = prop;
|
||||
}
|
||||
|
@ -239,12 +239,8 @@ static void GREASE_PENCIL_OT_layer_group_add(wmOperatorType *ot)
|
|||
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
PropertyRNA *prop = RNA_def_string(ot->srna,
|
||||
"new_layer_group_name",
|
||||
"GP_Group",
|
||||
INT16_MAX,
|
||||
"Name",
|
||||
"Name of the new layer group");
|
||||
PropertyRNA *prop = RNA_def_string(
|
||||
ot->srna, "new_layer_group_name", nullptr, INT16_MAX, "Name", "Name of the new layer group");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
ot->prop = prop;
|
||||
}
|
||||
|
|
|
@ -235,7 +235,7 @@ class LayerViewItem : public AbstractTreeViewItem {
|
|||
void build_layer_name(uiLayout &row)
|
||||
{
|
||||
uiBut *but = uiItemL_ex(
|
||||
&row, IFACE_(layer_.name().c_str()), ICON_OUTLINER_DATA_GP_LAYER, false, false);
|
||||
&row, layer_.name().c_str(), ICON_OUTLINER_DATA_GP_LAYER, false, false);
|
||||
if (layer_.is_locked() || !layer_.parent_group().is_visible()) {
|
||||
UI_but_disable(but, "Layer is locked or not visible");
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ class LayerGroupViewItem : public AbstractTreeViewItem {
|
|||
void build_layer_group_name(uiLayout &row)
|
||||
{
|
||||
uiItemS_ex(&row, 0.8f);
|
||||
uiBut *but = uiItemL_ex(&row, IFACE_(group_.name().c_str()), ICON_FILE_FOLDER, false, false);
|
||||
uiBut *but = uiItemL_ex(&row, group_.name().c_str(), ICON_FILE_FOLDER, false, false);
|
||||
if (group_.is_locked()) {
|
||||
UI_but_disable(but, "Layer Group is locked");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue