I18n: disambiguate "Fill" #108561

Merged
Bastien Montagne merged 1 commits from pioverfour/blender:dp_disambiguate_fill into blender-v3.6-release 2023-06-06 16:29:28 +02:00
8 changed files with 46 additions and 3 deletions

View File

@ -180,6 +180,7 @@ eObjectMode BKE_paint_object_mode_from_paintmode(ePaintMode mode);
bool BKE_paint_ensure_from_paintmode(struct Scene *sce, ePaintMode mode);
struct Paint *BKE_paint_get_active_from_paintmode(struct Scene *sce, ePaintMode mode);
const struct EnumPropertyItem *BKE_paint_get_tool_enum_from_paintmode(ePaintMode mode);
const char *BKE_paint_get_tool_enum_translation_context_from_paintmode(ePaintMode mode);
const char *BKE_paint_get_tool_prop_id_from_paintmode(ePaintMode mode);
uint BKE_paint_get_brush_tool_offset_from_paintmode(ePaintMode mode);
struct Paint *BKE_paint_get_active(struct Scene *sce, struct ViewLayer *view_layer);

View File

@ -457,6 +457,29 @@ const char *BKE_paint_get_tool_prop_id_from_paintmode(ePaintMode mode)
return nullptr;
}
const char *BKE_paint_get_tool_enum_translation_context_from_paintmode(ePaintMode mode)
{
switch (mode) {
case PAINT_MODE_SCULPT:
case PAINT_MODE_GPENCIL:
case PAINT_MODE_TEXTURE_2D:
case PAINT_MODE_TEXTURE_3D:
return BLT_I18NCONTEXT_ID_BRUSH;
case PAINT_MODE_VERTEX:
case PAINT_MODE_WEIGHT:
case PAINT_MODE_SCULPT_UV:
case PAINT_MODE_VERTEX_GPENCIL:
case PAINT_MODE_SCULPT_GPENCIL:
case PAINT_MODE_WEIGHT_GPENCIL:
case PAINT_MODE_SCULPT_CURVES:
case PAINT_MODE_INVALID:
break;
}
/* Invalid paint mode. */
return BLT_I18NCONTEXT_DEFAULT;
}
Paint *BKE_paint_get_active(Scene *sce, ViewLayer *view_layer)
{
if (sce && view_layer) {

View File

@ -437,7 +437,9 @@ void MESH_OT_bisect(struct wmOperatorType *ot)
1.0f);
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
RNA_def_boolean(ot->srna, "use_fill", false, "Fill", "Fill in the cut");
prop = RNA_def_boolean(ot->srna, "use_fill", false, "Fill", "Fill in the cut");
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MASK);
RNA_def_boolean(
ot->srna, "clear_inner", false, "Clear Inner", "Remove geometry behind the plane");
RNA_def_boolean(

View File

@ -17,6 +17,8 @@
#include "BKE_layer.h"
#include "BKE_report.h"
#include "BLT_translation.h"
#include "RNA_access.h"
#include "RNA_define.h"
@ -1101,6 +1103,8 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void MESH_OT_rip(wmOperatorType *ot)
{
PropertyRNA *prop;
/* identifiers */
ot->name = "Rip";
ot->idname = "MESH_OT_rip";
@ -1115,5 +1119,6 @@ void MESH_OT_rip(wmOperatorType *ot)
/* to give to transform */
Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR_DUMMY);
RNA_def_boolean(ot->srna, "use_fill", false, "Fill", "Fill the ripped region");
prop = RNA_def_boolean(ot->srna, "use_fill", false, "Fill", "Fill the ripped region");
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MESH);
}

View File

@ -15,6 +15,8 @@
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
@ -387,7 +389,8 @@ static int palette_color_add_exec(bContext *C, wmOperator * /*op*/)
PAINT_MODE_TEXTURE_3D,
PAINT_MODE_TEXTURE_2D,
PAINT_MODE_VERTEX,
PAINT_MODE_SCULPT)) {
PAINT_MODE_SCULPT))
{
copy_v3_v3(color->rgb, BKE_brush_color_get(scene, brush));
color->value = 0.0;
}
@ -1009,6 +1012,8 @@ static void PAINT_OT_brush_select(wmOperatorType *ot)
const char *prop_id = BKE_paint_get_tool_prop_id_from_paintmode(paint_mode);
prop = RNA_def_enum(
ot->srna, prop_id, BKE_paint_get_tool_enum_from_paintmode(paint_mode), 0, prop_id, "");
RNA_def_property_translation_context(
prop, BKE_paint_get_tool_enum_translation_context_from_paintmode(paint_mode));
RNA_def_property_flag(prop, PROP_HIDDEN);
}

View File

@ -11,6 +11,8 @@
#include "BLI_math_color_blend.h"
#include "BLI_task.h"
#include "BLT_translation.h"
#include "DNA_meshdata_types.h"
#include "DNA_userdef_types.h"
@ -479,5 +481,6 @@ void SCULPT_OT_color_filter(wmOperatorType *ot)
"",
0.0f,
1.0f);
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MESH);
RNA_def_property_subtype(prop, PROP_COLOR_GAMMA);
}

View File

@ -2550,6 +2550,7 @@ static void rna_def_brush(BlenderRNA *brna)
prop = RNA_def_property(srna, "sculpt_tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_brush_sculpt_tool_items);
RNA_def_property_ui_text(prop, "Sculpt Tool", "");
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_BRUSH);
RNA_def_property_update(prop, 0, "rna_Brush_update_and_reset_icon");
prop = RNA_def_property(srna, "uv_sculpt_tool", PROP_ENUM, PROP_NONE);
@ -2573,12 +2574,14 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "imagepaint_tool");
RNA_def_property_enum_items(prop, rna_enum_brush_image_tool_items);
RNA_def_property_ui_text(prop, "Image Paint Tool", "");
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_BRUSH);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_Brush_update_and_reset_icon");
prop = RNA_def_property(srna, "gpencil_tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "gpencil_tool");
RNA_def_property_enum_items(prop, rna_enum_brush_gpencil_types_items);
RNA_def_property_ui_text(prop, "Grease Pencil Draw Tool", "");
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_BRUSH);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
prop = RNA_def_property(srna, "gpencil_vertex_tool", PROP_ENUM, PROP_NONE);

View File

@ -911,6 +911,7 @@ static void rna_def_maskSpline(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", MASK_SPLINE_NOFILL);
RNA_def_property_ui_text(prop, "Fill", "Make this spline filled");
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MASK);
RNA_def_property_update(prop, NC_MASK | NA_EDITED, "rna_Mask_update_data");
/* self-intersection check */