Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-03-26 13:09:31 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-03-26 13:09:31 +0400
commit18d2dd7e3ae0338829fd61740151f41c21668474 (patch)
tree53d755b496944c9017c2cda0ac812e7c545f4024 /release
parentfc9e0a37f0087d003808a87c26e46ed573ae39dd (diff)
parentf1ed223e34e61777af46d33e5bfc2fc03223a689 (diff)
Merging r55547 through r55594 from trunk into soc-2008-mxcurioni
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bl_i18n_utils/bl_extract_messages.py6
-rw-r--r--release/scripts/modules/bl_i18n_utils/settings.py5
-rw-r--r--release/scripts/modules/bl_i18n_utils/utils_spell_check.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py15
-rw-r--r--release/scripts/startup/bl_ui/space_image.py25
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py6
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py29
7 files changed, 79 insertions, 10 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
index 9be786f14c1..ea162557c95 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -135,7 +135,7 @@ def print_info(reports, pot):
_print("{} messages were rejected.".format(len(reports["messages_skipped"])))
_print("\n")
_print("Current POT stats:")
- pot.print_stats(prefix="\t", output=_print)
+ pot.print_info(prefix="\t", output=_print)
_print("\n")
check_ctxt = reports["check_ctxt"]
@@ -365,9 +365,10 @@ def dump_messages_rna(msgs, reports, settings):
walk_properties(cls)
def walk_keymap_hierarchy(hier, msgsrc_prev):
+ km_i18n_context = bpy.app.translations.contexts.id_windowmanager
for lvl in hier:
msgsrc = msgsrc_prev + "." + lvl[1]
- process_msg(msgs, default_context, lvl[0], msgsrc, reports, None, settings)
+ process_msg(msgs, km_i18n_context, lvl[0], msgsrc, reports, None, settings)
if lvl[3]:
walk_keymap_hierarchy(lvl[3], msgsrc)
@@ -396,7 +397,6 @@ def dump_messages_rna(msgs, reports, settings):
# And parse keymaps!
from bpy_extras.keyconfig_utils import KM_HIERARCHY
-
walk_keymap_hierarchy(KM_HIERARCHY, "KM_HIERARCHY")
diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py
index fbfca8f639d..31e457151bb 100644
--- a/release/scripts/modules/bl_i18n_utils/settings.py
+++ b/release/scripts/modules/bl_i18n_utils/settings.py
@@ -237,10 +237,10 @@ _ctxt_re = _ctxt_re_gen("")
_msg_re = r"(?P<msg_raw>" + _str_whole_re.format(_="_msg") + r")"
PYGETTEXT_KEYWORDS = (() +
tuple((r"{}\(\s*" + _msg_re + r"\s*\)").format(it)
- for it in ("IFACE_", "TIP_", "N_")) +
+ for it in ("IFACE_", "TIP_", "DATA_", "N_")) +
tuple((r"{}\(\s*" + _ctxt_re + r"\s*,\s*" + _msg_re + r"\s*\)").format(it)
- for it in ("CTX_IFACE_", "CTX_TIP_", "CTX_N_")) +
+ for it in ("CTX_IFACE_", "CTX_TIP_", "CTX_DATA_", "CTX_N_")) +
tuple(("{}\\((?:[^\"',]+,){{1,2}}\\s*" + _msg_re + r"\s*(?:\)|,)").format(it)
for it in ("BKE_report", "BKE_reportf", "BKE_reports_prepend", "BKE_reports_prependf",
@@ -308,6 +308,7 @@ WARN_MSGID_NOT_CAPITALIZED_ALLOWED = {
"sqrt(x*x+y*y+z*z)",
"sRGB",
"utf-8",
+ "var",
"vBVH",
"view",
"wav",
diff --git a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
index 925166a3d8b..574553d75b7 100644
--- a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
+++ b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
@@ -374,8 +374,9 @@ class SpellChecker():
"fluidsim",
"frameserver",
"enum",
+ "idcol",
"keyframe", "keyframes", "keyframing", "keyframed",
- "metaball", "metaballs",
+ "metaball", "metaballs", "mball",
"metaelement", "metaelements",
"metastrip", "metastrips",
"movieclip",
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index a3275bea4ee..17dcf267c3b 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -112,3 +112,18 @@ def brush_texture_settings(layout, brush, sculpt):
col = layout.column(align=True)
col.label(text="Sample Bias:")
col.prop(brush, "texture_sample_bias", slider=True, text="")
+
+
+def brush_mask_texture_settings(layout, brush):
+ mask_tex_slot = brush.mask_texture_slot
+
+ if(brush.mask_texture):
+ layout.label(text="Mask Mapping:")
+ col = layout.column()
+ col.active = brush.brush_capabilities.has_texture_angle
+ col.prop(mask_tex_slot, "angle", text="")
+
+ # scale and offset
+ split = layout.split()
+ split.prop(mask_tex_slot, "offset")
+ split.prop(mask_tex_slot, "scale")
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index b48e7660a6b..d2bbca358aa 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
-from bl_ui.properties_paint_common import UnifiedPaintPanel, brush_texture_settings
+from bl_ui.properties_paint_common import UnifiedPaintPanel, brush_texture_settings, brush_mask_texture_settings
from bpy.app.translations import pgettext_iface as iface_
@@ -477,7 +477,6 @@ class IMAGE_PT_game_properties(Panel):
split = layout.split()
col = split.column()
-
col.prop(ima, "use_animation")
sub = col.column(align=True)
sub.active = ima.use_animation
@@ -730,6 +729,28 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
brush_texture_settings(col, brush, 0)
+class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
+ bl_label = "Texture Mask"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw_header(self, context):
+ brush = context.tool_settings.image_paint.brush
+ tex_slot_alpha = brush.mask_texture_slot
+ self.layout.prop(brush, 'use_mask', text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ brush = context.tool_settings.image_paint.brush
+ tex_slot_alpha = brush.mask_texture_slot
+
+ col = layout.column()
+
+ col.template_ID_preview(brush, "mask_texture", new="texture.new", rows=3, cols=8)
+
+ brush_mask_texture_settings(col, brush)
+
+
class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
bl_label = "Tool"
bl_options = {'DEFAULT_CLOSED'}
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py
index 4c634378ed2..a13d77942eb 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -21,6 +21,8 @@ import bpy
from bpy.types import Menu
from bpy.app.translations import pgettext_iface as iface_
+km_i18n_context = bpy.app.translations.contexts.id_windowmanager
+
class USERPREF_MT_keyconfigs(Menu):
bl_label = "KeyPresets"
@@ -79,7 +81,7 @@ class InputKeyMapPanel:
row = col.row()
row.prop(km, "show_expanded_children", text="", emboss=False)
- row.label(text=km.name)
+ row.label(text=km.name, text_ctxt=km_i18n_context)
row.label()
row.label()
@@ -110,7 +112,7 @@ class InputKeyMapPanel:
# "Add New" at end of keymap item list
col = self.indented_layout(col, level + 1)
subcol = col.split(percentage=0.2).column()
- subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
+ subcol.operator("wm.keyitem_add", text="Add New", text_ctxt=km_i18n_context, icon='ZOOMIN')
col.separator()
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 24e4dac4ded..54d3b61c665 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -21,6 +21,7 @@ import bpy
from bpy.types import Menu, Panel
from bl_ui.properties_paint_common import UnifiedPaintPanel
from bl_ui.properties_paint_common import brush_texture_settings
+from bl_ui.properties_paint_common import brush_mask_texture_settings
class View3DPanel():
@@ -782,6 +783,34 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
+class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel):
+ bl_context = "imagepaint"
+ bl_label = "Texture Mask"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ brush = context.tool_settings.image_paint.brush
+ return (context.image_paint_object and brush and brush.image_tool != 'SOFTEN')
+
+ def draw_header(self, context):
+ brush = context.tool_settings.image_paint.brush
+ tex_slot_alpha = brush.mask_texture_slot
+ self.layout.prop(brush, 'use_mask', text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ brush = context.tool_settings.image_paint.brush
+ tex_slot_alpha = brush.mask_texture_slot
+
+ col = layout.column()
+
+ col.template_ID_preview(brush, "mask_texture", new="texture.new", rows=3, cols=8)
+
+ brush_mask_texture_settings(col, brush)
+
+
class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
bl_label = "Stroke"
bl_options = {'DEFAULT_CLOSED'}