I18n: extract and disambiguate a few messages #119065
|
@ -2090,8 +2090,8 @@ class CYCLES_RENDER_PT_bake_influence(CyclesButtonsPanel, Panel):
|
|||
|
||||
sub = col.column(align=True)
|
||||
sub.prop(cbk, "normal_r", text="Swizzle R")
|
||||
sub.prop(cbk, "normal_g", text="G")
|
||||
sub.prop(cbk, "normal_b", text="B")
|
||||
sub.prop(cbk, "normal_g", text="G", text_ctxt=i18n_contexts.color)
|
||||
sub.prop(cbk, "normal_b", text="B", text_ctxt=i18n_contexts.color)
|
||||
|
||||
elif cscene.bake_type == 'COMBINED':
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ def open_external_editor(filepath, line, column, /):
|
|||
import subprocess
|
||||
from string import Template
|
||||
from bpy import context
|
||||
from bpy.app.translations import pgettext_rpt as rpt_
|
||||
|
||||
text_editor = context.preferences.filepaths.text_editor
|
||||
text_editor_args = context.preferences.filepaths.text_editor_args
|
||||
|
@ -22,13 +23,13 @@ def open_external_editor(filepath, line, column, /):
|
|||
assert text_editor
|
||||
|
||||
if not text_editor_args:
|
||||
return (
|
||||
return rpt_(
|
||||
"Provide text editor argument format in File Paths/Applications Preferences, "
|
||||
"see input field tool-tip for more information",
|
||||
)
|
||||
|
||||
if "$filepath" not in text_editor_args:
|
||||
return "Text Editor Args Format must contain $filepath"
|
||||
return rpt_("Text Editor Args Format must contain $filepath")
|
||||
|
||||
args = [text_editor]
|
||||
template_vars = {
|
||||
|
@ -42,12 +43,12 @@ def open_external_editor(filepath, line, column, /):
|
|||
try:
|
||||
args.extend([Template(arg).substitute(**template_vars) for arg in shlex.split(text_editor_args)])
|
||||
except BaseException as ex:
|
||||
return "Exception parsing template: %r" % ex
|
||||
return rpt_("Exception parsing template: %r") % ex
|
||||
|
||||
try:
|
||||
# With `check=True` if `process.returncode != 0` an exception will be raised.
|
||||
subprocess.run(args, check=True)
|
||||
except BaseException as ex:
|
||||
return "Exception running external editor: %r" % ex
|
||||
return rpt_("Exception running external editor: %r") % ex
|
||||
|
||||
return ""
|
||||
|
|
|
@ -23,6 +23,7 @@ from mathutils import (
|
|||
from bpy.app.translations import (
|
||||
pgettext_tip as tip_,
|
||||
pgettext_rpt as rpt_,
|
||||
pgettext_data as data_,
|
||||
)
|
||||
|
||||
|
||||
|
@ -394,7 +395,7 @@ class NODE_OT_enum_definition_item_add(Operator):
|
|||
def execute(self, context):
|
||||
node = context.active_node
|
||||
enum_def = node.enum_definition
|
||||
item = enum_def.enum_items.new("Item")
|
||||
item = enum_def.enum_items.new(data_("Item"))
|
||||
enum_def.active_index = enum_def.enum_items[:].index(item)
|
||||
return {'FINISHED'}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ from bpy.types import (
|
|||
Panel,
|
||||
UIList,
|
||||
)
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
|
@ -307,6 +308,7 @@ class PHYSICS_PT_dp_surface_canvas_paint_dry(PhysicButtonsPanel, Panel):
|
|||
|
||||
class PHYSICS_PT_dp_surface_canvas_paint_dissolve(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Dissolve"
|
||||
bl_translation_context = i18n_contexts.id_simulation
|
||||
bl_parent_id = "PHYSICS_PT_dp_surface_canvas"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import bpy
|
||||
from bpy.types import Panel
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
from bl_ui.utils import PresetPanel
|
||||
from bl_ui.properties_physics_common import (
|
||||
effector_weights_ui,
|
||||
|
@ -369,6 +370,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
|
|||
|
||||
class PHYSICS_PT_smoke_dissolve(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Dissolve"
|
||||
bl_translation_context = i18n_contexts.id_volume
|
||||
bl_parent_id = "PHYSICS_PT_smoke"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {
|
||||
|
|
|
@ -904,8 +904,8 @@ class TEXTURE_PT_colors(TextureButtonsPanel, TextureColorsPoll, Panel):
|
|||
|
||||
col = flow.column(align=True)
|
||||
col.prop(tex, "factor_red", text="Multiply R")
|
||||
col.prop(tex, "factor_green", text="G")
|
||||
col.prop(tex, "factor_blue", text="B")
|
||||
col.prop(tex, "factor_green", text="G", text_ctxt=i18n_contexts.color)
|
||||
col.prop(tex, "factor_blue", text="B", text_ctxt=i18n_contexts.color)
|
||||
|
||||
col.separator()
|
||||
|
||||
|
|
|
@ -88,9 +88,9 @@ class CLIP_PT_clip_display(Panel):
|
|||
col = layout.column(align=True)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(sc, "show_red_channel", text="R", toggle=True)
|
||||
row.prop(sc, "show_green_channel", text="G", toggle=True)
|
||||
row.prop(sc, "show_blue_channel", text="B", toggle=True)
|
||||
row.prop(sc, "show_red_channel", text="R", text_ctxt=i18n_contexts.color, toggle=True)
|
||||
row.prop(sc, "show_green_channel", text="G", text_ctxt=i18n_contexts.color, toggle=True)
|
||||
row.prop(sc, "show_blue_channel", text="B", text_ctxt=i18n_contexts.color, toggle=True)
|
||||
row.separator()
|
||||
row.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
|
||||
row.separator()
|
||||
|
@ -429,9 +429,9 @@ class CLIP_PT_tracking_settings(CLIP_PT_tracking_panel, Panel):
|
|||
|
||||
row = col.row(align=True)
|
||||
row.use_property_split = False
|
||||
row.prop(settings, "use_default_red_channel", text="R", toggle=True)
|
||||
row.prop(settings, "use_default_green_channel", text="G", toggle=True)
|
||||
row.prop(settings, "use_default_blue_channel", text="B", toggle=True)
|
||||
row.prop(settings, "use_default_red_channel", text="R", text_ctxt=i18n_contexts.color, toggle=True)
|
||||
row.prop(settings, "use_default_green_channel", text="G", text_ctxt=i18n_contexts.color, toggle=True)
|
||||
row.prop(settings, "use_default_blue_channel", text="B", text_ctxt=i18n_contexts.color, toggle=True)
|
||||
|
||||
col.separator()
|
||||
col.operator("clip.track_settings_as_default", text="Copy from Active Track")
|
||||
|
@ -744,9 +744,9 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
|
|||
|
||||
row = layout.row(align=True)
|
||||
sub = row.row(align=True)
|
||||
sub.prop(act_track, "use_red_channel", text="R", toggle=True)
|
||||
sub.prop(act_track, "use_green_channel", text="G", toggle=True)
|
||||
sub.prop(act_track, "use_blue_channel", text="B", toggle=True)
|
||||
sub.prop(act_track, "use_red_channel", text="R", text_ctxt=i18n_contexts.color, toggle=True)
|
||||
sub.prop(act_track, "use_green_channel", text="G", text_ctxt=i18n_contexts.color, toggle=True)
|
||||
sub.prop(act_track, "use_blue_channel", text="B", text_ctxt=i18n_contexts.color, toggle=True)
|
||||
|
||||
row.separator()
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ class USERPREF_PT_interface_translation(InterfacePanel, CenterAlignMixIn, Panel)
|
|||
|
||||
layout.prop(view, "language")
|
||||
|
||||
col = layout.column(heading="Translate")
|
||||
col = layout.column(heading="Translate", heading_ctxt=i18n_contexts.editor_preferences)
|
||||
col.active = (bpy.app.translations.locale != "en_US")
|
||||
col.prop(view, "use_translate_tooltips", text="Tooltips")
|
||||
col.prop(view, "use_translate_interface", text="Interface")
|
||||
|
|
|
@ -1574,7 +1574,7 @@ MovieTrackingPlaneTrack *BKE_tracking_plane_track_add(MovieTracking *tracking,
|
|||
plane_track = MEM_cnew<MovieTrackingPlaneTrack>("new plane track");
|
||||
|
||||
/* Use some default name. */
|
||||
STRNCPY(plane_track->name, "Plane Track");
|
||||
STRNCPY(plane_track->name, DATA_("Plane Track"));
|
||||
|
||||
plane_track->image_opacity = 1.0f;
|
||||
|
||||
|
|
|
@ -130,8 +130,9 @@ const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid
|
|||
#define BLT_I18NCONTEXT_ID_WORLD "World"
|
||||
|
||||
/* Editors-types contexts. */
|
||||
#define BLT_I18NCONTEXT_EDITOR_PYTHON_CONSOLE "Python console"
|
||||
#define BLT_I18NCONTEXT_EDITOR_FILEBROWSER "File browser"
|
||||
#define BLT_I18NCONTEXT_EDITOR_PREFERENCES "Preferences"
|
||||
#define BLT_I18NCONTEXT_EDITOR_PYTHON_CONSOLE "Python console"
|
||||
#define BLT_I18NCONTEXT_EDITOR_VIEW3D "View3D"
|
||||
|
||||
/* Generic contexts. */
|
||||
|
@ -203,8 +204,9 @@ struct BLT_i18n_contexts_descriptor {
|
|||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "id_windowmanager"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WORKSPACE, "id_workspace"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WORLD, "id_world"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_PYTHON_CONSOLE, "editor_python_console"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_FILEBROWSER, "editor_filebrowser"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_PYTHON_CONSOLE, "editor_python_console"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_PREFERENCES, "editor_preferences"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_VIEW3D, "editor_view3d"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_AMOUNT, "amount"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_COLOR, "color"), \
|
||||
|
|
|
@ -2856,6 +2856,7 @@ void GPENCIL_OT_dissolve(wmOperatorType *ot)
|
|||
0,
|
||||
"Type",
|
||||
"Method used for dissolving stroke points");
|
||||
RNA_def_property_translation_context(ot->prop, BLT_I18NCONTEXT_ID_GPENCIL);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -644,6 +644,7 @@ static void GREASE_PENCIL_OT_dissolve(wmOperatorType *ot)
|
|||
"Type",
|
||||
"Method used for dissolving stroke points");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_GPENCIL);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -4538,15 +4538,48 @@ static void curvemap_buttons_layout(uiLayout *layout,
|
|||
UI_but_func_set(bt, curvemap_buttons_redraw);
|
||||
}
|
||||
if (cumap->cm[0].curve) {
|
||||
bt = uiDefButI(block, UI_BTYPE_ROW, 0, IFACE_("R"), 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, "");
|
||||
bt = uiDefButI(block,
|
||||
UI_BTYPE_ROW,
|
||||
0,
|
||||
CTX_IFACE_(BLT_I18NCONTEXT_COLOR, "R"),
|
||||
0,
|
||||
0,
|
||||
dx,
|
||||
dx,
|
||||
&cumap->cur,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(bt, curvemap_buttons_redraw);
|
||||
}
|
||||
if (cumap->cm[1].curve) {
|
||||
bt = uiDefButI(block, UI_BTYPE_ROW, 0, IFACE_("G"), 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, "");
|
||||
bt = uiDefButI(block,
|
||||
UI_BTYPE_ROW,
|
||||
0,
|
||||
CTX_IFACE_(BLT_I18NCONTEXT_COLOR, "G"),
|
||||
0,
|
||||
0,
|
||||
dx,
|
||||
dx,
|
||||
&cumap->cur,
|
||||
0.0,
|
||||
1.0,
|
||||
"");
|
||||
UI_but_func_set(bt, curvemap_buttons_redraw);
|
||||
}
|
||||
if (cumap->cm[2].curve) {
|
||||
bt = uiDefButI(block, UI_BTYPE_ROW, 0, IFACE_("B"), 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, "");
|
||||
bt = uiDefButI(block,
|
||||
UI_BTYPE_ROW,
|
||||
0,
|
||||
CTX_IFACE_(BLT_I18NCONTEXT_COLOR, "B"),
|
||||
0,
|
||||
0,
|
||||
dx,
|
||||
dx,
|
||||
&cumap->cur,
|
||||
0.0,
|
||||
2.0,
|
||||
"");
|
||||
UI_but_func_set(bt, curvemap_buttons_redraw);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ static int wm_drop_import_file_invoke(bContext *C, wmOperator *op, const wmEvent
|
|||
wmOperatorType *ot = WM_operatortype_find(file_handler->import_operator, false);
|
||||
uiItemFullO_ptr(layout,
|
||||
ot,
|
||||
TIP_(ot->name),
|
||||
CTX_TIP_(ot->translation_context, ot->name),
|
||||
ICON_NONE,
|
||||
static_cast<IDProperty *>(file_props.data),
|
||||
WM_OP_INVOKE_DEFAULT,
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_attribute.hh"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
|
@ -2255,24 +2257,27 @@ void OBJECT_OT_bake(wmOperatorType *ot)
|
|||
R_BAKE_SPACE_TANGENT,
|
||||
"Normal Space",
|
||||
"Choose normal space for baking");
|
||||
RNA_def_enum(ot->srna,
|
||||
"normal_r",
|
||||
rna_enum_normal_swizzle_items,
|
||||
R_BAKE_POSX,
|
||||
"R",
|
||||
"Axis to bake in red channel");
|
||||
RNA_def_enum(ot->srna,
|
||||
"normal_g",
|
||||
rna_enum_normal_swizzle_items,
|
||||
R_BAKE_POSY,
|
||||
"G",
|
||||
"Axis to bake in green channel");
|
||||
RNA_def_enum(ot->srna,
|
||||
"normal_b",
|
||||
rna_enum_normal_swizzle_items,
|
||||
R_BAKE_POSZ,
|
||||
"B",
|
||||
"Axis to bake in blue channel");
|
||||
prop = RNA_def_enum(ot->srna,
|
||||
"normal_r",
|
||||
rna_enum_normal_swizzle_items,
|
||||
R_BAKE_POSX,
|
||||
"R",
|
||||
"Axis to bake in red channel");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
prop = RNA_def_enum(ot->srna,
|
||||
"normal_g",
|
||||
rna_enum_normal_swizzle_items,
|
||||
R_BAKE_POSY,
|
||||
"G",
|
||||
"Axis to bake in green channel");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
prop = RNA_def_enum(ot->srna,
|
||||
"normal_b",
|
||||
rna_enum_normal_swizzle_items,
|
||||
R_BAKE_POSZ,
|
||||
"B",
|
||||
"Axis to bake in blue channel");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
RNA_def_enum(ot->srna,
|
||||
"target",
|
||||
rna_enum_bake_target_items,
|
||||
|
|
|
@ -112,7 +112,7 @@ static TransformOrientation *createViewSpace(bContext *C,
|
|||
name = v3d->camera->id.name + 2;
|
||||
}
|
||||
else {
|
||||
name = "Custom View";
|
||||
name = DATA_("Custom View");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ static TransformOrientation *createBoneSpace(bContext *C,
|
|||
}
|
||||
|
||||
if (name[0] == 0) {
|
||||
name = "Bone";
|
||||
name = DATA_("Bone");
|
||||
}
|
||||
|
||||
return addMatrixSpace(C, mat, name, overwrite);
|
||||
|
@ -183,7 +183,7 @@ static TransformOrientation *createCurveSpace(bContext *C,
|
|||
}
|
||||
|
||||
if (name[0] == 0) {
|
||||
name = "Curve";
|
||||
name = DATA_("Curve");
|
||||
}
|
||||
|
||||
return addMatrixSpace(C, mat, name, overwrite);
|
||||
|
@ -208,7 +208,7 @@ static TransformOrientation *createMeshSpace(bContext *C,
|
|||
}
|
||||
|
||||
if (name[0] == 0) {
|
||||
name = "Vertex";
|
||||
name = DATA_("Vertex");
|
||||
}
|
||||
break;
|
||||
case ORIENTATION_EDGE:
|
||||
|
@ -218,7 +218,7 @@ static TransformOrientation *createMeshSpace(bContext *C,
|
|||
}
|
||||
|
||||
if (name[0] == 0) {
|
||||
name = "Edge";
|
||||
name = DATA_("Edge");
|
||||
}
|
||||
break;
|
||||
case ORIENTATION_FACE:
|
||||
|
@ -228,7 +228,7 @@ static TransformOrientation *createMeshSpace(bContext *C,
|
|||
}
|
||||
|
||||
if (name[0] == 0) {
|
||||
name = "Face";
|
||||
name = DATA_("Face");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -1950,6 +1950,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
|
|||
RNA_def_property_enum_sdna(prop, nullptr, "eraser_mode");
|
||||
RNA_def_property_enum_items(prop, rna_enum_gpencil_brush_eraser_modes_items);
|
||||
RNA_def_property_ui_text(prop, "Mode", "Eraser Mode");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_GPENCIL);
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
RNA_def_property_update(
|
||||
prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_eraser_mode_update");
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_node_tree_update.hh"
|
||||
|
||||
#include "RNA_define.hh"
|
||||
|
@ -1121,6 +1123,7 @@ static void rna_def_histogram(BlenderRNA *brna)
|
|||
RNA_def_property_enum_sdna(prop, nullptr, "mode");
|
||||
RNA_def_property_enum_items(prop, prop_mode_items);
|
||||
RNA_def_property_ui_text(prop, "Mode", "Channels to display in the histogram");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
|
||||
prop = RNA_def_property(srna, "show_line", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flag", HISTO_FLAG_LINE);
|
||||
|
|
|
@ -409,6 +409,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "use_dissolve", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "flags", MOD_DPAINT_DISSOLVE);
|
||||
RNA_def_property_ui_text(prop, "Dissolve", "Enable to make surface changes disappear over time");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SIMULATION);
|
||||
|
||||
prop = RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_TIME);
|
||||
RNA_def_property_int_sdna(prop, nullptr, "diss_speed");
|
||||
|
|
|
@ -2894,6 +2894,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna)
|
|||
RNA_def_property_enum_sdna(prop, nullptr, "mode");
|
||||
RNA_def_property_enum_items(prop, modifier_decim_mode_items);
|
||||
RNA_def_property_ui_text(prop, "Mode", "");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MESH);
|
||||
RNA_def_property_update(prop, 0, "rna_Modifier_update");
|
||||
|
||||
/* (mode == MOD_DECIM_MODE_COLLAPSE) */
|
||||
|
|
|
@ -6782,6 +6782,7 @@ static void def_cmp_color_spill(StructRNA *srna)
|
|||
RNA_def_property_enum_sdna(prop, nullptr, "custom1");
|
||||
RNA_def_property_enum_items(prop, channel_items);
|
||||
RNA_def_property_ui_text(prop, "Channel", "");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "limit_method", PROP_ENUM, PROP_NONE);
|
||||
|
@ -6796,6 +6797,7 @@ static void def_cmp_color_spill(StructRNA *srna)
|
|||
RNA_def_property_enum_sdna(prop, nullptr, "limchan");
|
||||
RNA_def_property_enum_items(prop, limit_channel_items);
|
||||
RNA_def_property_ui_text(prop, "Limit Channel", "");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
|
||||
|
@ -6813,18 +6815,21 @@ static void def_cmp_color_spill(StructRNA *srna)
|
|||
RNA_def_property_float_sdna(prop, nullptr, "uspillr");
|
||||
RNA_def_property_range(prop, 0.0f, 1.5f);
|
||||
RNA_def_property_ui_text(prop, "R", "Red spillmap scale");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "unspill_green", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "uspillg");
|
||||
RNA_def_property_range(prop, 0.0f, 1.5f);
|
||||
RNA_def_property_ui_text(prop, "G", "Green spillmap scale");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "unspill_blue", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "uspillb");
|
||||
RNA_def_property_range(prop, 0.0f, 1.5f);
|
||||
RNA_def_property_ui_text(prop, "B", "Blue spillmap scale");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
}
|
||||
|
||||
|
@ -6930,6 +6935,7 @@ static void def_cmp_channel_matte(StructRNA *srna)
|
|||
RNA_def_property_enum_items(prop, prop_tri_channel_items);
|
||||
RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_Node_channel_itemf");
|
||||
RNA_def_property_ui_text(prop, "Channel", "Channel used to determine matte");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
|
||||
|
@ -6945,6 +6951,7 @@ static void def_cmp_channel_matte(StructRNA *srna)
|
|||
RNA_def_property_enum_items(prop, prop_tri_channel_items);
|
||||
RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_Node_channel_itemf");
|
||||
RNA_def_property_ui_text(prop, "Limit Channel", "Limit by this channel's value");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "limit_max", PROP_FLOAT, PROP_NONE);
|
||||
|
|
|
@ -21,10 +21,10 @@ static void cmp_node_sephsva_declare(NodeDeclarationBuilder &b)
|
|||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>("H");
|
||||
b.add_output<decl::Float>("S");
|
||||
b.add_output<decl::Float>("V");
|
||||
b.add_output<decl::Float>("A");
|
||||
b.add_output<decl::Float>("H").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("S").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("V").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("A").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
@ -70,11 +70,27 @@ namespace blender::nodes::node_composite_combine_hsva_cc {
|
|||
|
||||
static void cmp_node_combhsva_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>("H").min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>("S").min(0.0f).max(1.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>("V").min(0.0f).max(1.0f).compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>("A").default_value(1.0f).min(0.0f).max(1.0f).compositor_domain_priority(
|
||||
3);
|
||||
b.add_input<decl::Float>("H")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("S")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(1)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("V")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(2)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("A")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(3)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@ static void cmp_node_seprgba_declare(NodeDeclarationBuilder &b)
|
|||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>("R");
|
||||
b.add_output<decl::Float>("G");
|
||||
b.add_output<decl::Float>("B");
|
||||
b.add_output<decl::Float>("A");
|
||||
b.add_output<decl::Float>("R").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("G").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("B").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("A").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
@ -70,11 +70,27 @@ namespace blender::nodes::node_composite_combine_rgba_cc {
|
|||
|
||||
static void cmp_node_combrgba_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>("R").min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>("G").min(0.0f).max(1.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>("B").min(0.0f).max(1.0f).compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>("A").default_value(1.0f).min(0.0f).max(1.0f).compositor_domain_priority(
|
||||
3);
|
||||
b.add_input<decl::Float>("R")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("G")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(1)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("B")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(2)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("A")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(3)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@ static void cmp_node_sepycca_declare(NodeDeclarationBuilder &b)
|
|||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>("Y");
|
||||
b.add_output<decl::Float>("Y").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("Cb");
|
||||
b.add_output<decl::Float>("Cr");
|
||||
b.add_output<decl::Float>("A");
|
||||
b.add_output<decl::Float>("A").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
}
|
||||
|
||||
static void node_composit_init_mode_sepycca(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
@ -98,7 +98,11 @@ namespace blender::nodes::node_composite_combine_ycca_cc {
|
|||
|
||||
static void cmp_node_combycca_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>("Y").min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>("Y")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("Cb")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
|
@ -109,8 +113,12 @@ static void cmp_node_combycca_declare(NodeDeclarationBuilder &b)
|
|||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>("A").default_value(1.0f).min(0.0f).max(1.0f).compositor_domain_priority(
|
||||
3);
|
||||
b.add_input<decl::Float>("A")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(3)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@ static void cmp_node_sepyuva_declare(NodeDeclarationBuilder &b)
|
|||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>("Y");
|
||||
b.add_output<decl::Float>("U");
|
||||
b.add_output<decl::Float>("V");
|
||||
b.add_output<decl::Float>("A");
|
||||
b.add_output<decl::Float>("Y").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("U").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("V").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("A").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
@ -70,11 +70,27 @@ namespace blender::nodes::node_composite_combine_yuva_cc {
|
|||
|
||||
static void cmp_node_combyuva_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>("Y").min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>("U").min(0.0f).max(1.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>("V").min(0.0f).max(1.0f).compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>("A").default_value(1.0f).min(0.0f).max(1.0f).compositor_domain_priority(
|
||||
3);
|
||||
b.add_input<decl::Float>("Y")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("U")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(1)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("V")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(2)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("A")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(3)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ static void node_declare(NodeDeclarationBuilder &b)
|
|||
BLI_assert_unreachable();
|
||||
break;
|
||||
}
|
||||
value_declaration->supports_field().description(N_("The values to be accumulated"));
|
||||
value_declaration->supports_field().description("The values to be accumulated");
|
||||
}
|
||||
|
||||
b.add_input<decl::Int>("Group ID", "Group Index")
|
||||
|
@ -54,15 +54,14 @@ static void node_declare(NodeDeclarationBuilder &b)
|
|||
const eCustomDataType data_type = eCustomDataType(node_storage(*node).data_type);
|
||||
b.add_output(data_type, "Leading")
|
||||
.field_source_reference_all()
|
||||
.description(N_("The running total of values in the corresponding group, starting at the "
|
||||
"first value"));
|
||||
.description(
|
||||
"The running total of values in the corresponding group, starting at the first value");
|
||||
b.add_output(data_type, "Trailing")
|
||||
.field_source_reference_all()
|
||||
.description(
|
||||
N_("The running total of values in the corresponding group, starting at zero"));
|
||||
.description("The running total of values in the corresponding group, starting at zero");
|
||||
b.add_output(data_type, "Total")
|
||||
.field_source_reference_all()
|
||||
.description(N_("The total of all of the values in the corresponding group"));
|
||||
.description("The total of all of the values in the corresponding group");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,14 +31,14 @@ static void node_declare(NodeDeclarationBuilder &b)
|
|||
const eCustomDataType data_type = eCustomDataType(node->custom1);
|
||||
b.add_input(data_type, "Attribute").hide_value().field_on_all();
|
||||
|
||||
b.add_output(data_type, "Mean");
|
||||
b.add_output(data_type, "Median");
|
||||
b.add_output(data_type, "Sum");
|
||||
b.add_output(data_type, "Min");
|
||||
b.add_output(data_type, "Max");
|
||||
b.add_output(data_type, "Range");
|
||||
b.add_output(data_type, "Standard Deviation");
|
||||
b.add_output(data_type, "Variance");
|
||||
b.add_output(data_type, N_("Mean"));
|
||||
b.add_output(data_type, N_("Median"));
|
||||
b.add_output(data_type, N_("Sum"));
|
||||
b.add_output(data_type, N_("Min"));
|
||||
b.add_output(data_type, N_("Max"));
|
||||
b.add_output(data_type, N_("Range"));
|
||||
b.add_output(data_type, N_("Standard Deviation"));
|
||||
b.add_output(data_type, N_("Variance"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,9 @@ static void node_declare(NodeDeclarationBuilder &b)
|
|||
.description(
|
||||
"The distance a point can be from the surface before the face is no longer "
|
||||
"considered planar");
|
||||
b.add_output<decl::Bool>("Planar").field_source();
|
||||
b.add_output<decl::Bool>("Planar")
|
||||
.translation_context(BLT_I18NCONTEXT_ID_NODETREE)
|
||||
.field_source();
|
||||
}
|
||||
|
||||
class PlanarFieldInput final : public bke::MeshFieldInput {
|
||||
|
|
|
@ -18,9 +18,9 @@ static void sh_node_seprgb_declare(NodeDeclarationBuilder &b)
|
|||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Color>("Image").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Float>("R");
|
||||
b.add_output<decl::Float>("G");
|
||||
b.add_output<decl::Float>("B");
|
||||
b.add_output<decl::Float>("R").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("G").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Float>("B").translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
}
|
||||
|
||||
static int gpu_shader_seprgb(GPUMaterial *mat,
|
||||
|
@ -94,9 +94,9 @@ namespace blender::nodes::node_shader_sepcomb_rgb_cc {
|
|||
static void sh_node_combrgb_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>("R").min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>("G").min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>("B").min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>("R").min(0.0f).max(1.0f).translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("G").min(0.0f).max(1.0f).translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("B").min(0.0f).max(1.0f).translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue