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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-04-01 17:47:19 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-04-01 17:47:19 +0400
commit5524ed9ba2d60331abed47c9df0bc2fcf330b36b (patch)
treee8380010f140f022b77236af171d97083a294006 /release
parent1360bb6fb0bf0c5c14235c47bf1399accbcecc6f (diff)
parent689f3aa174ff795044a4dab719edf60b7b1f5bd3 (diff)
Merged changes in the trunk up to revision 55700.
Conflicts resolved: source/blender/editors/mesh/mesh_intern.h
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bl_i18n_utils/bl_extract_messages.py32
-rw-r--r--release/scripts/modules/bl_i18n_utils/settings.py6
-rw-r--r--release/scripts/modules/bl_i18n_utils/utils.py2
-rw-r--r--release/scripts/modules/bpy_extras/anim_utils.py2
-rw-r--r--release/scripts/modules/bpy_types.py14
-rw-r--r--release/scripts/modules/console/complete_import.py9
-rw-r--r--release/scripts/startup/bl_operators/add_mesh_torus.py3
-rw-r--r--release/scripts/startup/bl_operators/node.py6
-rw-r--r--release/scripts/startup/bl_operators/rigidbody.py6
-rw-r--r--release/scripts/startup/bl_operators/wm.py6
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_common.py11
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py4
-rw-r--r--release/scripts/startup/bl_ui/space_image.py73
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py2
-rw-r--r--release/scripts/startup/bl_ui/space_node.py6
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py3
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py3
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py8
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py18
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py110
-rw-r--r--release/windows/contrib/vfapi/vfapi-plugin.c2
22 files changed, 173 insertions, 155 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 ea162557c95..26b6845530d 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -409,6 +409,7 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
import ast
bpy_struct = bpy.types.ID.__base__
+ i18n_contexts = bpy.app.translations.contexts
root_paths = tuple(bpy.utils.resource_path(t) for t in ('USER', 'LOCAL', 'SYSTEM'))
def make_rel(path):
@@ -445,7 +446,7 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
nds_ls.extend(nds)
ret = _extract_string_merge(estr_ls, nds_ls)
return ret
-
+
def extract_strings_split(node):
"""
Returns a list args as returned by 'extract_strings()', But split into groups based on separate_nodes, this way
@@ -468,20 +469,33 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
return [_extract_string_merge(estr_ls, nds_ls) for estr_ls, nds_ls in bag]
+ i18n_ctxt_ids = {v for v in bpy.app.translations.contexts_C_to_py.values()}
def _ctxt_to_ctxt(node):
- return extract_strings(node)[0]
+ # We must try, to some extend, to get contexts from vars instead of only literal strings...
+ ctxt = extract_strings(node)[0]
+ if ctxt:
+ return ctxt
+ # Basically, we search for attributes matching py context names, for now.
+ # So non-literal contexts should be used that way:
+ # i18n_ctxt = bpy.app.translations.contexts
+ # foobar(text="Foo", text_ctxt=i18n_ctxt.id_object)
+ if type(node) == ast.Attribute:
+ if node.attr in i18n_ctxt_ids:
+ #print(node, node.attr, getattr(i18n_contexts, node.attr))
+ return getattr(i18n_contexts, node.attr)
+ return i18n_contexts.default
def _op_to_ctxt(node):
opname, _ = extract_strings(node)
if not opname:
- return settings.DEFAULT_CONTEXT
+ return i18n_contexts.default
op = bpy.ops
for n in opname.split('.'):
op = getattr(op, n)
try:
return op.get_rna().bl_rna.translation_context
except Exception as e:
- default_op_context = bpy.app.translations.contexts.operator_default
+ default_op_context = i18n_contexts.operator_default
print("ERROR: ", str(e))
print(" Assuming default operator context '{}'".format(default_op_context))
return default_op_context
@@ -492,7 +506,8 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
pgettext_variants = (
("pgettext", ("_",)),
("pgettext_iface", ("iface_",)),
- ("pgettext_tip", ("tip_",))
+ ("pgettext_tip", ("tip_",)),
+ ("pgettext_data", ("data_",)),
)
pgettext_variants_args = {"msgid": (0, {"msgctxt": 1})}
@@ -858,9 +873,8 @@ def dump_addon_messages(module_name, messages_formats, do_checks, settings):
# and make the diff!
for key in minus_msgs:
- if key == settings.PO_HEADER_KEY:
- continue
- del msgs[key]
+ if key != settings.PO_HEADER_KEY:
+ del msgs[key]
if check_ctxt:
for key in check_ctxt:
@@ -873,7 +887,7 @@ def dump_addon_messages(module_name, messages_formats, do_checks, settings):
# get strings from UI layout definitions text="..." args
reports["check_ctxt"] = check_ctxt
- dump_messages_pytext(msgs, reports, addons, settings, addons_only=True)
+ dump_py_messages(msgs, reports, {addon}, settings, addons_only=True)
print_info(reports, pot)
diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py
index 31e457151bb..832adc80934 100644
--- a/release/scripts/modules/bl_i18n_utils/settings.py
+++ b/release/scripts/modules/bl_i18n_utils/settings.py
@@ -240,7 +240,7 @@ PYGETTEXT_KEYWORDS = (() +
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_DATA_", "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",
@@ -252,7 +252,7 @@ PYGETTEXT_KEYWORDS = (() +
tuple(("{}\\((?:[^\"',]+,)\\s*" + _msg_re + r"\s*(?:\)|,)").format(it)
for it in ("modifier_setError",)) +
- tuple((r"{}\(\s*" + _msg_re + r"\s*,\s*(?:" + \
+ tuple((r"{}\(\s*" + _msg_re + r"\s*,\s*(?:" +
r"\s*,\s*)?(?:".join(_ctxt_re_gen(i) for i in range(PYGETTEXT_MAX_MULTI_CTXT)) + r")?\s*\)").format(it)
for it in ("BLF_I18N_MSGID_MULTI_CTXT",))
)
@@ -354,7 +354,7 @@ PARSER_PY_ID = "__PY__"
PARSER_PY_MARKER_BEGIN = "\n# ##### BEGIN AUTOGENERATED I18N SECTION #####\n"
PARSER_PY_MARKER_END = "\n# ##### END AUTOGENERATED I18N SECTION #####\n"
-PARSER_MAX_FILE_SIZE = 2**24 # in bytes, i.e. 16 Mb.
+PARSER_MAX_FILE_SIZE = 2 ** 24 # in bytes, i.e. 16 Mb.
###############################################################################
# PATHS
diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py
index 4ab92880bde..5e9464b782a 100644
--- a/release/scripts/modules/bl_i18n_utils/utils.py
+++ b/release/scripts/modules/bl_i18n_utils/utils.py
@@ -173,7 +173,7 @@ class I18nMessage:
self.comment_lines.remove(l)
lines_src = []
lines_src_custom = []
- for src in sources:
+ for src in sources:
if is_valid_po_path(src):
lines_src.append(self.settings.PO_COMMENT_PREFIX_SOURCE + src)
else:
diff --git a/release/scripts/modules/bpy_extras/anim_utils.py b/release/scripts/modules/bpy_extras/anim_utils.py
index 20a9a412f26..de702b53978 100644
--- a/release/scripts/modules/bpy_extras/anim_utils.py
+++ b/release/scripts/modules/bpy_extras/anim_utils.py
@@ -169,7 +169,7 @@ def bake_action(frame_start,
euler_prev = None
for (f, matrix) in zip(frame_range, obj_info):
- name = "Action Bake" # XXX: placeholder
+ name = "Action Bake" # XXX: placeholder
obj.matrix_basis = matrix
obj.keyframe_insert("location", -1, f, name, options)
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index f42fd8e3107..85a532e9a27 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -729,6 +729,7 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
self.preset_operator,
filter_ext=lambda ext: ext.lower() in {".py", ".xml"})
+
class Region(StructRNA):
__slots__ = ()
@@ -782,9 +783,11 @@ def gen_valid_identifier(seq):
if ch == '_' or ch.isalpha() or ch.isdigit():
yield ch
+
def sanitize_identifier(name):
return ''.join(gen_valid_identifier(name))
+
def unique_identifier(name, identifier_list):
# First some basic sanitation, to make a usable identifier string from the name
base = sanitize_identifier(name)
@@ -796,6 +799,7 @@ def unique_identifier(name, identifier_list):
identifier = base + str(index)
return identifier
+
class RNAMetaNode(RNAMetaPropGroup):
def __new__(cls, name, bases, classdict, **args):
# Wrapper for node.init, to add sockets from templates
@@ -846,7 +850,7 @@ class Node(StructRNA, metaclass=RNAMetaNode):
@classmethod
def poll(cls, ntree):
- return True
+ return True
class NodeSocket(StructRNA, metaclass=RNAMetaPropGroup):
@@ -870,17 +874,18 @@ class CompositorNode(Node):
@classmethod
def poll(cls, ntree):
- return ntree.bl_idname == 'CompositorNodeTree'
+ return ntree.bl_idname == 'CompositorNodeTree'
def update(self):
self.tag_need_exec()
+
class ShaderNode(Node):
__slots__ = ()
@classmethod
def poll(cls, ntree):
- return ntree.bl_idname == 'ShaderNodeTree'
+ return ntree.bl_idname == 'ShaderNodeTree'
class TextureNode(Node):
@@ -888,5 +893,4 @@ class TextureNode(Node):
@classmethod
def poll(cls, ntree):
- return ntree.bl_idname == 'TextureNodeTree'
-
+ return ntree.bl_idname == 'TextureNodeTree'
diff --git a/release/scripts/modules/console/complete_import.py b/release/scripts/modules/console/complete_import.py
index 9277e04af76..f28f61b303d 100644
--- a/release/scripts/modules/console/complete_import.py
+++ b/release/scripts/modules/console/complete_import.py
@@ -111,10 +111,11 @@ def module_list(path):
else:
folder_list = []
#folder_list = glob.glob(os.path.join(path,'*'))
- folder_list = [p for p in folder_list \
- if os.path.exists(os.path.join(path, p, '__init__.py')) \
- or p[-3:] in {'.py', '.so'} \
- or p[-4:] in {'.pyc', '.pyo', '.pyd'}]
+ folder_list = [
+ p for p in folder_list
+ if (os.path.exists(os.path.join(path, p, '__init__.py')) or
+ p[-3:] in {'.py', '.so'} or
+ p[-4:] in {'.pyc', '.pyo', '.pyd'})]
folder_list = [os.path.basename(p).split('.')[0] for p in folder_list]
return folder_list
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py
index 63e796e2b5d..948cb39f5b1 100644
--- a/release/scripts/startup/bl_operators/add_mesh_torus.py
+++ b/release/scripts/startup/bl_operators/add_mesh_torus.py
@@ -24,6 +24,7 @@ from bpy.props import (FloatProperty,
IntProperty,
BoolProperty,
)
+from bpy.app.translations import pgettext_data as data_
from bpy_extras import object_utils
@@ -142,7 +143,7 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
self.major_segments,
self.minor_segments)
- mesh = bpy.data.meshes.new("Torus")
+ mesh = bpy.data.meshes.new(data_("Torus"))
mesh.vertices.add(len(verts_loc) // 3)
diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py
index 5c7f3c3f4b2..c9063436bb3 100644
--- a/release/scripts/startup/bl_operators/node.py
+++ b/release/scripts/startup/bl_operators/node.py
@@ -127,7 +127,8 @@ def node_class_items_iter(node_class, context):
tree_idname = context.space_data.edit_tree.bl_idname
for group in bpy.data.node_groups:
if group.bl_idname == tree_idname:
- yield (group.name, "", {"node_tree":group}) # XXX empty string should be replaced by description from tree
+ # XXX empty string should be replaced by description from tree
+ yield (group.name, "", {"node_tree": group})
else:
yield (node_class.bl_rna.name, node_class.bl_rna.description, {})
@@ -169,7 +170,7 @@ class NODE_OT_add_search(NodeAddOperator, Operator):
for index, item in enumerate(node_items_iter(context)):
if str(index) == self.type:
node = self.create_node(context, item[0].bl_rna.identifier)
- for prop,value in item[3].items():
+ for prop, value in item[3].items():
setattr(node, prop, value)
break
return {'FINISHED'}
@@ -257,4 +258,3 @@ class NODE_OT_tree_path_parent(Operator):
space.path.pop()
return {'FINISHED'}
-
diff --git a/release/scripts/startup/bl_operators/rigidbody.py b/release/scripts/startup/bl_operators/rigidbody.py
index f327c602fb6..80516a85d43 100644
--- a/release/scripts/startup/bl_operators/rigidbody.py
+++ b/release/scripts/startup/bl_operators/rigidbody.py
@@ -146,7 +146,7 @@ class BakeToKeyframes(Operator):
# this is a little roundabout but there's no better way right now
aa = mat.to_quaternion().to_axis_angle()
obj.rotation_axis_angle = (aa[1], ) + aa[0][:]
- else: # euler
+ else: # euler
# make sure euler rotation is compatible to previous frame
obj.rotation_euler = mat.to_euler(rot_mode, obj_prev.rotation_euler)
@@ -275,10 +275,10 @@ class ConnectRigidBodies(Operator):
self._add_constraint(context, objs_sorted[i-1], objs_sorted[i])
change = True
- else: # SELECTED_TO_ACTIVE
+ else: # SELECTED_TO_ACTIVE
for obj in objects:
self._add_constraint(context, obj_act, obj)
- change = True;
+ change = True
if change:
# restore selection
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index a7085e51bd3..660faecc564 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -830,7 +830,7 @@ def _wm_doc_get_id(doc_id, do_url=True, url_prefix=""):
rna = "bpy.ops.%s.%s" % (class_name, class_prop)
else:
rna_class = getattr(bpy.types, class_name)
-
+
# an operator setting (selected from a running operator), rare case
# note: Py defined operators are subclass of Operator,
# C defined operators are subclass of OperatorProperties.
@@ -1273,11 +1273,15 @@ class WM_OT_copy_prev_settings(Operator):
else:
shutil.copytree(path_src, path_dst, symlinks=True)
+ # reload recent-files.txt
+ bpy.ops.wm.read_history()
+
# don't loose users work if they open the splash later.
if bpy.data.is_saved is bpy.data.is_dirty is False:
bpy.ops.wm.read_homefile()
else:
self.report({'INFO'}, "Reload Start-Up file to restore settings")
+
return {'FINISHED'}
return {'CANCELLED'}
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 17dcf267c3b..391874ea3dc 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -93,7 +93,7 @@ def brush_texture_settings(layout, brush, sculpt):
col.prop(brush, "texture_angle_source_random", text="")
else:
col.prop(brush, "texture_angle_source_no_random", text="")
-
+
else:
col.prop(brush, "texture_angle_source_random", text="")
else:
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index 2d9d4649e28..b02a53302e7 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -20,8 +20,7 @@
import bpy
from bpy.types import Panel
-
-i18n_default_ctxt = bpy.app.translations.contexts.default
+from bpy.app.translations import contexts as i18n_contexts
class PhysicButtonsPanel():
@@ -39,20 +38,20 @@ def physics_add(self, layout, md, name, type, typeicon, toggles):
sub = layout.row(align=True)
if md:
sub.context_pointer_set("modifier", md)
- sub.operator("object.modifier_remove", text=name, text_ctxt=i18n_default_ctxt, icon='X')
+ sub.operator("object.modifier_remove", text=name, text_ctxt=i18n_contexts.default, icon='X')
if(toggles):
sub.prop(md, "show_render", text="")
sub.prop(md, "show_viewport", text="")
else:
- sub.operator("object.modifier_add", text=name, text_ctxt=i18n_default_ctxt, icon=typeicon).type = type
+ sub.operator("object.modifier_add", text=name, text_ctxt=i18n_contexts.default, icon=typeicon).type = type
def physics_add_special(self, layout, data, name, addop, removeop, typeicon):
sub = layout.row(align=True)
if data:
- sub.operator(removeop, text=name, text_ctxt=i18n_default_ctxt, icon='X')
+ sub.operator(removeop, text=name, text_ctxt=i18n_contexts.default, icon='X')
else:
- sub.operator(addop, text=name, text_ctxt=i18n_default_ctxt, icon=typeicon)
+ sub.operator(addop, text=name, text_ctxt=i18n_contexts.default, icon=typeicon)
class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 5cf86b8d4b0..c8cc433d3af 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -358,12 +358,12 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
layout.prop(rd, "filepath", text="")
split = layout.split()
-
+
col = split.column()
col.active = not rd.is_movie_format
col.prop(rd, "use_overwrite")
col.prop(rd, "use_placeholder")
-
+
split.prop(rd, "use_file_extension")
layout.template_image_settings(image_settings, color_management=False)
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index d2bbca358aa..3537ca62d93 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -697,13 +697,6 @@ class IMAGE_PT_paint(Panel, ImagePaintPanel):
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
row = col.row(align=True)
- if(brush.use_relative_jitter):
- row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
- row.prop(brush, "jitter", slider=True)
- else:
- row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
- row.prop(brush, "jitter_absolute")
- row.prop(brush, "use_pressure_jitter", toggle=True, text="")
col.prop(brush, "blend", text="Blend")
@@ -728,16 +721,24 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
brush_texture_settings(col, brush, 0)
+ # use_texture_overlay and texture_overlay_alpha
+ col = layout.column(align=True)
+ col.active = brush.brush_capabilities.has_overlay
+ col.label(text="Overlay:")
+
+ row = col.row()
+ if brush.use_texture_overlay:
+ row.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
+ else:
+ row.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
+ sub = row.row()
+ sub.prop(brush, "texture_overlay_alpha", text="Alpha")
+
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
@@ -778,32 +779,52 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
toolsettings = context.tool_settings.image_paint
brush = toolsettings.brush
-
+
col = layout.column()
col.prop(toolsettings, "input_samples")
- col.prop(brush, "use_airbrush")
- row = col.row()
- row.active = brush.use_airbrush
- row.prop(brush, "rate", slider=True)
+ col = layout.column()
+ col.label(text="Stroke Method:")
+
+ col.prop(brush, "stroke_method", text="")
+
+ if brush.use_anchor:
+ col.separator()
+ col.prop(brush, "use_edge_to_edge", "Edge To Edge")
+
+ if brush.use_airbrush:
+ col.separator()
+ col.prop(brush, "rate", text="Rate", slider=True)
+
+ if brush.use_space:
+ col.separator()
+ row = col.row(align=True)
+ row.active = brush.use_space
+ row.prop(brush, "spacing", text="Spacing")
+ row.prop(brush, "use_pressure_spacing", toggle=True, text="")
+
+
+ col = layout.column()
col.separator()
col.prop(brush, "use_smooth_stroke")
- col = layout.column()
- col.active = brush.use_smooth_stroke
- col.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
- col.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
+ sub = col.column()
+ sub.active = brush.use_smooth_stroke
+ sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
+ sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
col.separator()
- col = layout.column()
- col.prop(brush, "use_space")
row = col.row(align=True)
- row.active = brush.use_space
- row.prop(brush, "spacing", text="Distance", slider=True)
- row.prop(brush, "use_pressure_spacing", toggle=True, text="")
+ if brush.use_relative_jitter:
+ row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
+ row.prop(brush, "jitter", slider=True)
+ else:
+ row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
+ row.prop(brush, "jitter_absolute")
+ row.prop(brush, "use_pressure_jitter", toggle=True, text="")
col.prop(brush, "use_wrap")
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index 49dedaa83c5..dd3ec33d56b 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -167,7 +167,7 @@ class NLA_MT_add(Menu):
layout.separator()
layout.operator("nla.tracks_add").above_selected = False
layout.operator("nla.tracks_add", text="Add Tracks Above Selected").above_selected = True
-
+
layout.separator()
layout.operator("nla.selected_objects_add")
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 6e92b55f88c..26c76bd6655 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -44,7 +44,7 @@ class NODE_HT_header(Header):
row.menu("NODE_MT_node")
layout.prop(snode, "tree_type", text="", expand=True)
-
+
if snode.tree_type == 'ShaderNodeTree':
if scene.render.use_shading_nodes:
layout.prop(snode, "shader_type", text="", expand=True)
@@ -84,7 +84,7 @@ class NODE_HT_header(Header):
row = layout.row(align=True)
row.prop(snode, "backdrop_channels", text="", expand=True)
layout.prop(snode, "use_auto_render")
-
+
else:
# Custom node tree is edited as independent ID block
layout.template_ID(snode, "node_tree", new="node.new_node_tree")
@@ -292,7 +292,7 @@ class NODE_UL_interface_sockets(bpy.types.UIList):
if self.layout_type in {'DEFAULT', 'COMPACT'}:
row = layout.row(align=True)
- # inputs get icon on the left
+ # inputs get icon on the left
if socket.in_out == 'IN':
row.template_node_socket(color)
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index ae9e0f72009..90ade0c8ccb 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -514,9 +514,6 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
layout.prop(strip, "speed_factor", text="Frame number")
layout.prop(strip, "scale_to_length")
- #doesn't work currently
- #layout.prop(strip, "use_frame_blend")
-
elif strip.type == 'TRANSFORM':
layout = self.layout
col = layout.column()
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 2742e6d8155..8755e37c68d 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Header, Menu, Panel
from bpy.app.translations import pgettext_iface as iface_
+from bpy.app.translations import contexts as i18n_contexts
def ui_style_items(col, context):
@@ -528,7 +529,7 @@ class USERPREF_PT_system(Panel):
if system.use_international_fonts:
column.prop(system, "language")
row = column.row()
- row.label(text="Translate:", text_ctxt=bpy.app.translations.contexts.id_windowmanager)
+ row.label(text="Translate:", text_ctxt=i18n_contexts.id_windowmanager)
row = column.row(True)
row.prop(system, "use_translate_interface", text="Interface", toggle=True)
row.prop(system, "use_translate_tooltips", text="Tooltips", toggle=True)
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py
index a13d77942eb..8d6eb2c623d 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -20,8 +20,7 @@
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
+from bpy.app.translations import contexts as i18n_contexts
class USERPREF_MT_keyconfigs(Menu):
@@ -81,7 +80,7 @@ class InputKeyMapPanel:
row = col.row()
row.prop(km, "show_expanded_children", text="", emboss=False)
- row.label(text=km.name, text_ctxt=km_i18n_context)
+ row.label(text=km.name, text_ctxt=i18n_contexts.id_windowmanager)
row.label()
row.label()
@@ -112,7 +111,8 @@ 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", text_ctxt=km_i18n_context, icon='ZOOMIN')
+ subcol.operator("wm.keyitem_add", text="Add New", text_ctxt=i18n_contexts.id_windowmanager,
+ icon='ZOOMIN')
col.separator()
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index e474117f0d4..8f65eb5b726 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Header, Menu, Panel
from bl_ui.properties_paint_common import UnifiedPaintPanel
+from bpy.app.translations import contexts as i18n_contexts
class VIEW3D_HT_header(Header):
@@ -994,20 +995,20 @@ class VIEW3D_MT_object_apply(Menu):
def draw(self, context):
layout = self.layout
- props = layout.operator("object.transform_apply", text="Location")
+ props = layout.operator("object.transform_apply", text="Location", text_ctxt=i18n_contexts.default)
props.location, props.rotation, props.scale = True, False, False
- props = layout.operator("object.transform_apply", text="Rotation")
+ props = layout.operator("object.transform_apply", text="Rotation", text_ctxt=i18n_contexts.default)
props.location, props.rotation, props.scale = False, True, False
- props = layout.operator("object.transform_apply", text="Scale")
+ props = layout.operator("object.transform_apply", text="Scale", text_ctxt=i18n_contexts.default)
props.location, props.rotation, props.scale = False, False, True
- props = layout.operator("object.transform_apply", text="Rotation & Scale")
+ props = layout.operator("object.transform_apply", text="Rotation & Scale", text_ctxt=i18n_contexts.default)
props.location, props.rotation, props.scale = False, True, True
layout.separator()
- layout.operator("object.visual_transform_apply", text="Visual Transform")
+ layout.operator("object.visual_transform_apply", text="Visual Transform", text_ctxt=i18n_contexts.default)
layout.operator("object.duplicates_make_real")
@@ -1657,8 +1658,6 @@ class BoneOptions:
def draw(self, context):
layout = self.layout
- default_context = bpy.app.translations.contexts.default
-
options = [
"show_wire",
"use_deform",
@@ -1679,7 +1678,7 @@ class BoneOptions:
for opt in options:
props = layout.operator("wm.context_collection_boolean_set", text=bone_props[opt].name,
- text_ctxt=default_context)
+ text_ctxt=i18n_contexts.default)
props.data_path_iter = data_path_iter
props.data_path_item = opt_suffix + opt
props.type = self.type
@@ -2561,7 +2560,7 @@ class VIEW3D_PT_view3d_meshdisplay(Panel):
col.label()
if not with_freestyle:
col.prop(mesh, "show_edge_seams", text="Seams")
- col.prop(mesh, "show_edge_sharp", text="Sharp")
+ col.prop(mesh, "show_edge_sharp", text="Sharp", text_ctxt=i18n_contexts.plural)
col.prop(mesh, "show_edge_bevel_weight", text="Weights")
if with_freestyle:
col.prop(mesh, "show_freestyle_edge_marks", text="Edge Marks")
@@ -2584,6 +2583,7 @@ class VIEW3D_PT_view3d_meshdisplay(Panel):
col.separator()
col.label(text="Numerics:")
col.prop(mesh, "show_extra_edge_length")
+ col.prop(mesh, "show_extra_edge_angle")
col.prop(mesh, "show_extra_face_angle")
col.prop(mesh, "show_extra_face_area")
if bpy.app.debug:
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 54d3b61c665..ff368a682e9 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -681,13 +681,6 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
row = col.row(align=True)
- if(brush.use_relative_jitter):
- row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
- row.prop(brush, "jitter", slider=True)
- else:
- row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
- row.prop(brush, "jitter_absolute")
- row.prop(brush, "use_pressure_jitter", toggle=True, text="")
col.prop(brush, "blend", text="Blend")
@@ -714,14 +707,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
row = col.row(align=True)
- if(brush.use_relative_jitter):
- row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
- row.prop(brush, "jitter", slider=True)
- else:
- row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
- row.prop(brush, "jitter_absolute")
- row.prop(brush, "use_pressure_jitter", toggle=True, text="")
-
+
col.prop(brush, "vertex_tool", text="Blend")
# Vertex Paint Mode #
@@ -793,11 +779,6 @@ class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel):
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
@@ -830,79 +811,74 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
settings = self.paint_settings(context)
brush = settings.brush
- image_paint = context.image_paint_object
col = layout.column()
+ col.label(text="Stroke Method:")
+
if context.sculpt_object:
- col.label(text="Stroke Method:")
+ col.prop(brush, "sculpt_stroke_method", text="")
+ else:
col.prop(brush, "stroke_method", text="")
- if brush.use_anchor:
- col.separator()
- col.prop(brush, "use_edge_to_edge", "Edge To Edge")
-
- if brush.use_airbrush:
- col.separator()
- col.prop(brush, "rate", text="Rate", slider=True)
-
- if brush.use_space:
- col.separator()
- row = col.row(align=True)
- row.active = brush.use_space
- row.prop(brush, "spacing", text="Spacing")
- row.prop(brush, "use_pressure_spacing", toggle=True, text="")
-
- if brush.sculpt_capabilities.has_smooth_stroke:
- col = layout.column()
- col.separator()
+ if brush.use_anchor:
+ col.separator()
+ col.prop(brush, "use_edge_to_edge", "Edge To Edge")
- col.prop(brush, "use_smooth_stroke")
+ if brush.use_airbrush:
+ col.separator()
+ col.prop(brush, "rate", text="Rate", slider=True)
- sub = col.column()
- sub.active = brush.use_smooth_stroke
- sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
- sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
+ if brush.use_space:
+ col.separator()
+ row = col.row(align=True)
+ row.active = brush.use_space
+ row.prop(brush, "spacing", text="Spacing")
+ row.prop(brush, "use_pressure_spacing", toggle=True, text="")
+ if context.sculpt_object:
if brush.sculpt_capabilities.has_jitter:
col.separator()
row = col.row(align=True)
- if(brush.use_relative_jitter):
+ if brush.use_relative_jitter:
row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
row.prop(brush, "jitter", slider=True)
else:
row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
row.prop(brush, "jitter_absolute")
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
+ if brush.sculpt_capabilities.has_smooth_stroke:
+ col = layout.column()
+ col.separator()
- else:
- col.prop(brush, "use_airbrush")
-
- row = col.row()
- row.active = brush.use_airbrush and (not brush.use_space) and (not brush.use_anchor)
- row.prop(brush, "rate", slider=True)
+ col.prop(brush, "use_smooth_stroke")
+ sub = col.column()
+ sub.active = brush.use_smooth_stroke
+ sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
+ sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
+ else:
col.separator()
- col.prop(brush, "use_smooth_stroke")
+ row = col.row(align=True)
+ if brush.use_relative_jitter:
+ row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
+ row.prop(brush, "jitter", slider=True)
+ else:
+ row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
+ row.prop(brush, "jitter_absolute")
+ row.prop(brush, "use_pressure_jitter", toggle=True, text="")
col = layout.column()
- col.active = brush.use_smooth_stroke
- col.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
- col.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
-
col.separator()
- col = layout.column()
- col.active = brush.brush_capabilities.has_spacing
- col.prop(brush, "use_space")
-
- row = col.row(align=True)
- row.active = brush.use_space
- row.prop(brush, "spacing", text="Spacing")
- row.prop(brush, "use_pressure_spacing", toggle=True, text="")
+ col.prop(brush, "use_smooth_stroke")
+ sub = col.column()
+ sub.active = brush.use_smooth_stroke
+ sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
+ sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
class VIEW3D_PT_tools_brush_curve(Panel, View3DPaintPanel):
bl_label = "Curve"
@@ -1180,7 +1156,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel):
row = layout.row()
row.prop(ipaint, "use_normal_falloff")
-
+
sub = row.row()
sub.active = (ipaint.use_normal_falloff)
sub.prop(ipaint, "normal_angle", text="")
@@ -1214,7 +1190,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel):
col.operator("paint.project_image", text="Apply Camera Image")
col.operator("image.save_dirty", text="Save All Edited")
-
+
class VIEW3D_PT_imagepaint_options(View3DPaintPanel):
bl_label = "Options"
diff --git a/release/windows/contrib/vfapi/vfapi-plugin.c b/release/windows/contrib/vfapi/vfapi-plugin.c
index 96a5ada8f14..8fe19da3d72 100644
--- a/release/windows/contrib/vfapi/vfapi-plugin.c
+++ b/release/windows/contrib/vfapi/vfapi-plugin.c
@@ -111,7 +111,7 @@ __declspec(dllexport) HRESULT vfGetPluginInfo(
return VF_OK;
}
-static unsigned long getipaddress(const char * ipaddr)
+static unsigned long getipaddress(const char *ipaddr)
{
struct hostent *host;
unsigned long ip;