Another fix for r54414 (cleaner to "import" pgettext once at top of files, also now using usual '_' shortcut).
This commit is contained in:
@@ -22,6 +22,8 @@ from bpy.types import Header, Menu, Panel
|
||||
from bl_ui.properties_paint_common import UnifiedPaintPanel
|
||||
from bl_ui.properties_paint_common import brush_texture_settings
|
||||
|
||||
_ = bpy.app.translations.pgettext
|
||||
|
||||
|
||||
class ImagePaintPanel(UnifiedPaintPanel):
|
||||
bl_space_type = 'IMAGE_EDITOR'
|
||||
@@ -71,10 +73,8 @@ class IMAGE_MT_view(Menu):
|
||||
|
||||
ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
|
||||
|
||||
pgettext = bpy.app.translations.pgettext
|
||||
for a, b in ratios:
|
||||
layout.operator("image.view_zoom_ratio", text=pgettext("Zoom %d:%d") % (a, b),
|
||||
translate=False).ratio = a / b
|
||||
layout.operator("image.view_zoom_ratio", text=_("Zoom %d:%d") % (a, b), translate=False).ratio = a / b
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -723,7 +723,7 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
|
||||
|
||||
col = layout.column()
|
||||
col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
|
||||
|
||||
|
||||
brush_texture_settings(col, brush, 0)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user