Fixing issues with i18n stuff:
- Make gettext stuff draw-time. so switching between languages can happens without restart now. - Added option to translate visible interface (menus, buttons, labels) and tooltips. Now it's possible to have english UI and localized tooltips. - Clean-up sources, do not use gettext stuff for things which can be collected with RNA. - Fix issues with windows 64bit and ru_RU locale on my desktop (it was codepage issue). - Added operator "Get Messages" which generates new text block with with all strings collected from RNA. - Changed script for updating blender.pot so now it appends messages collected from rna to automatically gathered messages. To update .pot you have to re-generate messages.txt using "Get Messages" operator and then run update_pot script. - Clean up old translation stuff which wasn't used and most probably wouldn't be used. - Return back "International Fonts" option, so if it's disabled, no gettext lookups happens on draw. - Merged read_homefile function back. No need in splitting it. TODO: - Custom fonts and font size. Current font isn't nice at least for russian locale, it's difficult to read it. - Put references to messages.txt so gettext can merge translation when name/description of some property changes.
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
from blf import gettext as _
|
||||
|
||||
data_path_update = [
|
||||
("ClothCollisionSettings", "min_distance", "distance_min"),
|
||||
@@ -693,7 +692,6 @@ class UpdateAnimData(Operator):
|
||||
"""Update data paths from 2.56 and previous versions, modifying data paths of drivers and fcurves"""
|
||||
bl_idname = "anim.update_data_paths"
|
||||
bl_label = "Update Animation Data"
|
||||
__doc__ = _("Update data paths from 2.56 and previous versions, modifying data paths of drivers and fcurves")
|
||||
|
||||
def execute(self, context):
|
||||
import animsys_refactor
|
||||
|
||||
@@ -21,29 +21,28 @@
|
||||
import bpy
|
||||
from bpy.types import Operator
|
||||
from bpy.props import StringProperty, BoolProperty, EnumProperty, IntProperty
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class SelectPattern(Operator):
|
||||
'''Select object matching a naming pattern'''
|
||||
bl_idname = "object.select_pattern"
|
||||
bl_label = _("Select Pattern")
|
||||
bl_label = "Select Pattern"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
pattern = StringProperty(
|
||||
name=_("Pattern"),
|
||||
description=_("Name filter using '*' and '?' wildcard chars"),
|
||||
name="Pattern",
|
||||
description="Name filter using '*' and '?' wildcard chars",
|
||||
maxlen=32,
|
||||
default="*",
|
||||
)
|
||||
case_sensitive = BoolProperty(
|
||||
name=_("Case Sensitive"),
|
||||
description=_("Do a case sensitive compare"),
|
||||
name="Case Sensitive",
|
||||
description="Do a case sensitive compare",
|
||||
default=False,
|
||||
)
|
||||
extend = BoolProperty(
|
||||
name=_("Extend"),
|
||||
description=_("Extend the existing selection"),
|
||||
name="Extend",
|
||||
description="Extend the existing selection",
|
||||
default=True,
|
||||
)
|
||||
|
||||
@@ -104,7 +103,7 @@ class SelectPattern(Operator):
|
||||
class SelectCamera(Operator):
|
||||
'''Select object matching a naming pattern'''
|
||||
bl_idname = "object.select_camera"
|
||||
bl_label = _("Select Camera")
|
||||
bl_label = "Select Camera"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
@classmethod
|
||||
@@ -126,20 +125,20 @@ class SelectHierarchy(Operator):
|
||||
'''Select object relative to the active objects position''' \
|
||||
'''in the hierarchy'''
|
||||
bl_idname = "object.select_hierarchy"
|
||||
bl_label = _("Select Hierarchy")
|
||||
bl_label = "Select Hierarchy"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
direction = EnumProperty(
|
||||
items=(('PARENT', _("Parent"), ""),
|
||||
('CHILD', _("Child"), "")
|
||||
items=(('PARENT', "Parent", ""),
|
||||
('CHILD', "Child", ""),
|
||||
),
|
||||
name=_("Direction"),
|
||||
description=_("Direction to select in the hierarchy"),
|
||||
name="Direction",
|
||||
description="Direction to select in the hierarchy",
|
||||
default='PARENT')
|
||||
|
||||
extend = BoolProperty(
|
||||
name=_("Extend"),
|
||||
description=_("Extend the existing selection"),
|
||||
name="Extend",
|
||||
description="Extend the existing selection",
|
||||
default=False,
|
||||
)
|
||||
|
||||
@@ -193,19 +192,20 @@ class SubdivisionSet(Operator):
|
||||
'''Sets a Subdivision Surface Level (1-5)'''
|
||||
|
||||
bl_idname = "object.subdivision_set"
|
||||
bl_label = _("Subdivision Set")
|
||||
bl_label = "Subdivision Set"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
level = IntProperty(
|
||||
name=_("Level"),
|
||||
name="Level",
|
||||
min=-100, max=100,
|
||||
soft_min=-6, soft_max=6,
|
||||
default=1,
|
||||
)
|
||||
|
||||
relative = BoolProperty(
|
||||
name=_("Relative"),
|
||||
description=_("Apply the subsurf level as an offset relative to the current level"),
|
||||
name="Relative",
|
||||
description=("Apply the subsurf level as an offset "
|
||||
"relative to the current level"),
|
||||
default=False,
|
||||
)
|
||||
|
||||
@@ -273,30 +273,31 @@ class ShapeTransfer(Operator):
|
||||
'''applying the relative offsets'''
|
||||
|
||||
bl_idname = "object.shape_key_transfer"
|
||||
bl_label = _("Transfer Shape Key")
|
||||
bl_label = "Transfer Shape Key"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
mode = EnumProperty(
|
||||
items=(('OFFSET',
|
||||
_("Offset"),
|
||||
_("Apply the relative positional offset")
|
||||
"Offset",
|
||||
"Apply the relative positional offset",
|
||||
),
|
||||
('RELATIVE_FACE',
|
||||
_("Relative Face"),
|
||||
_("Calculate relative position (using faces)."),
|
||||
"Relative Face",
|
||||
"Calculate relative position (using faces).",
|
||||
),
|
||||
('RELATIVE_EDGE',
|
||||
_("Relative Edge"),
|
||||
_("Calculate relative position (using edges)."),
|
||||
"Relative Edge",
|
||||
"Calculate relative position (using edges).",
|
||||
),
|
||||
),
|
||||
name=_("Transformation Mode"),
|
||||
description=_("Relative shape positions to the new shape method"),
|
||||
name="Transformation Mode",
|
||||
description="Relative shape positions to the new shape method",
|
||||
default='OFFSET',
|
||||
)
|
||||
use_clamp = BoolProperty(
|
||||
name=_("Clamp Offset"),
|
||||
description=_("Clamp the transformation to the distance each vertex moves in the original shape."),
|
||||
name="Clamp Offset",
|
||||
description=("Clamp the transformation to the distance each "
|
||||
"vertex moves in the original shape."),
|
||||
default=False,
|
||||
)
|
||||
|
||||
@@ -514,7 +515,7 @@ class ShapeTransfer(Operator):
|
||||
class JoinUVs(Operator):
|
||||
'''Copy UV Layout to objects with matching geometry'''
|
||||
bl_idname = "object.join_uvs"
|
||||
bl_label = _("Join as UVs")
|
||||
bl_label = "Join as UVs"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -582,7 +583,7 @@ class JoinUVs(Operator):
|
||||
class MakeDupliFace(Operator):
|
||||
'''Make linked objects into dupli-faces'''
|
||||
bl_idname = "object.make_dupli_face"
|
||||
bl_label = _("Make Dupli-Face")
|
||||
bl_label = "Make Dupli-Face"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -657,7 +658,7 @@ class IsolateTypeRender(Operator):
|
||||
'''Hide unselected render objects of same type as active ''' \
|
||||
'''by setting the hide render flag'''
|
||||
bl_idname = "object.isolate_type_render"
|
||||
bl_label = _("Restrict Render Unselected")
|
||||
bl_label = "Restrict Render Unselected"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
def execute(self, context):
|
||||
@@ -677,7 +678,7 @@ class IsolateTypeRender(Operator):
|
||||
class ClearAllRestrictRender(Operator):
|
||||
'''Reveal all render objects by setting the hide render flag'''
|
||||
bl_idname = "object.hide_render_clear_all"
|
||||
bl_label = _("Clear All Restrict Render")
|
||||
bl_label = "Clear All Restrict Render"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
import bpy
|
||||
from bpy.types import Operator
|
||||
from mathutils import Vector
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
def GlobalBB_LQ(bb_world):
|
||||
@@ -344,16 +343,18 @@ from bpy.props import EnumProperty, BoolProperty
|
||||
class AlignObjects(Operator):
|
||||
'''Align Objects'''
|
||||
bl_idname = "object.align"
|
||||
bl_label = _("Align Objects")
|
||||
bl_label = "Align Objects"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
bb_quality = BoolProperty(
|
||||
name=_("High Quality"),
|
||||
description=_("Enables high quality calculation of the bounding box for perfect results on complex shape meshes with rotation/scale (Slow)"),
|
||||
name="High Quality",
|
||||
description=("Enables high quality calculation of the "
|
||||
"bounding box for perfect results on complex "
|
||||
"shape meshes with rotation/scale (Slow)"),
|
||||
default=True,
|
||||
)
|
||||
align_mode = EnumProperty(
|
||||
name=_("Align Mode:"),
|
||||
name="Align Mode:",
|
||||
items=(('OPT_1', "Negative Sides", ""),
|
||||
('OPT_2', "Centers", ""),
|
||||
('OPT_3', "Positive Sides", ""),
|
||||
@@ -361,7 +362,7 @@ class AlignObjects(Operator):
|
||||
default='OPT_2',
|
||||
)
|
||||
relative_to = EnumProperty(
|
||||
name=_("Relative To:"),
|
||||
name="Relative To:",
|
||||
items=(('OPT_1', "Scene Origin", ""),
|
||||
('OPT_2', "3D Cursor", ""),
|
||||
('OPT_3', "Selection", ""),
|
||||
@@ -370,8 +371,8 @@ class AlignObjects(Operator):
|
||||
default='OPT_4',
|
||||
)
|
||||
align_axis = EnumProperty(
|
||||
name=_("Align"),
|
||||
description=_("Align to axis"),
|
||||
name="Align",
|
||||
description="Align to axis",
|
||||
items=(('X', "X", ""),
|
||||
('Y', "Y", ""),
|
||||
('Z', "Z", ""),
|
||||
|
||||
@@ -27,7 +27,7 @@ from bpy.props import (BoolProperty,
|
||||
FloatProperty,
|
||||
FloatVectorProperty,
|
||||
)
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
def object_ensure_material(obj, mat_name):
|
||||
""" Use an existing material or add a new one.
|
||||
@@ -306,8 +306,8 @@ class QuickSmoke(Operator):
|
||||
)
|
||||
|
||||
show_flows = BoolProperty(
|
||||
name=_("Render Smoke Objects"),
|
||||
description=_("Keep the smoke objects visible during rendering."),
|
||||
name="Render Smoke Objects",
|
||||
description="Keep the smoke objects visible during rendering.",
|
||||
default=False,
|
||||
)
|
||||
|
||||
@@ -420,20 +420,21 @@ class QuickFluid(Operator):
|
||||
default='BASIC',
|
||||
)
|
||||
initial_velocity = FloatVectorProperty(
|
||||
name=_("Initial Velocity"),
|
||||
description=_("Initial velocity of the fluid"),
|
||||
name="Initial Velocity",
|
||||
description="Initial velocity of the fluid",
|
||||
min=-100.0, max=100.0,
|
||||
default=(0.0, 0.0, 0.0),
|
||||
subtype='VELOCITY',
|
||||
)
|
||||
show_flows = BoolProperty(
|
||||
name=_("Render Fluid Objects"),
|
||||
description=_("Keep the fluid objects visible during rendering."),
|
||||
name="Render Fluid Objects",
|
||||
description="Keep the fluid objects visible during rendering.",
|
||||
default=False,
|
||||
)
|
||||
start_baking = BoolProperty(
|
||||
name=_("Start Fluid Bake"),
|
||||
description=_("Start baking the fluid immediately after creating the domain object"),
|
||||
name="Start Fluid Bake",
|
||||
description=("Start baking the fluid immediately "
|
||||
"after creating the domain object"),
|
||||
default=False,
|
||||
)
|
||||
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
# <pep8-80 compliant>
|
||||
|
||||
import bpy
|
||||
|
||||
from bpy.types import Operator
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
def randomize_selected(seed, delta, loc, rot, scale, scale_even):
|
||||
@@ -93,55 +91,57 @@ from bpy.props import IntProperty, BoolProperty, FloatVectorProperty
|
||||
class RandomizeLocRotSize(Operator):
|
||||
'''Randomize objects loc/rot/scale'''
|
||||
bl_idname = "object.randomize_transform"
|
||||
bl_label = _("Randomize Transform")
|
||||
bl_label = "Randomize Transform"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
random_seed = IntProperty(
|
||||
name=_("Random Seed"),
|
||||
description=_("Seed value for the random generator"),
|
||||
name="Random Seed",
|
||||
description="Seed value for the random generator",
|
||||
min=0,
|
||||
max=1000,
|
||||
default=0,
|
||||
)
|
||||
use_delta = BoolProperty(
|
||||
name=_("Transform Delta"),
|
||||
description=_("Randomize delta transform values instead of regular transform"),
|
||||
name="Transform Delta",
|
||||
description=("Randomize delta transform values "
|
||||
"instead of regular transform"),
|
||||
default=False,
|
||||
)
|
||||
use_loc = BoolProperty(
|
||||
name=_("Randomize Location"),
|
||||
description=_("Randomize the location values"),
|
||||
name="Randomize Location",
|
||||
description="Randomize the location values",
|
||||
default=True,
|
||||
)
|
||||
loc = FloatVectorProperty(
|
||||
name=_("Location"),
|
||||
description=_("Maximun distance the objects can spread over each axis"),
|
||||
name="Location",
|
||||
description=("Maximun distance the objects "
|
||||
"can spread over each axis"),
|
||||
min=-100.0,
|
||||
max=100.0,
|
||||
default=(0.0, 0.0, 0.0),
|
||||
subtype='TRANSLATION',
|
||||
)
|
||||
use_rot = BoolProperty(
|
||||
name=_("Randomize Rotation"),
|
||||
description=_("Randomize the rotation values"),
|
||||
name="Randomize Rotation",
|
||||
description="Randomize the rotation values",
|
||||
default=True,
|
||||
)
|
||||
rot = FloatVectorProperty(
|
||||
name=_("Rotation"),
|
||||
description=_("Maximun rotation over each axis"),
|
||||
name="Rotation",
|
||||
description="Maximun rotation over each axis",
|
||||
min=-180.0,
|
||||
max=180.0,
|
||||
default=(0.0, 0.0, 0.0),
|
||||
subtype='TRANSLATION',
|
||||
)
|
||||
use_scale = BoolProperty(
|
||||
name=_("Randomize Scale"),
|
||||
description=_("Randomize the scale values"),
|
||||
name="Randomize Scale",
|
||||
description="Randomize the scale values",
|
||||
default=True,
|
||||
)
|
||||
scale_even = BoolProperty(
|
||||
name=_("Scale Even"),
|
||||
description=_("Use the same scale value for all axis"),
|
||||
name="Scale Even",
|
||||
description="Use the same scale value for all axis",
|
||||
default=False,
|
||||
)
|
||||
|
||||
@@ -153,8 +153,8 @@ class RandomizeLocRotSize(Operator):
|
||||
)'''
|
||||
|
||||
scale = FloatVectorProperty(
|
||||
name=_("Scale"),
|
||||
description=_("Maximum scale randomization over each axis"),
|
||||
name="Scale",
|
||||
description="Maximum scale randomization over each axis",
|
||||
min=-100.0,
|
||||
max=100.0,
|
||||
default=(0.0, 0.0, 0.0),
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
import bpy
|
||||
from bpy.types import Menu, Operator
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class AddPresetBase():
|
||||
@@ -33,8 +32,8 @@ class AddPresetBase():
|
||||
bl_options = {'REGISTER'} # only because invoke_props_popup requires.
|
||||
|
||||
name = bpy.props.StringProperty(
|
||||
name=_("Name"),
|
||||
description=_("Name of the preset, used to make the path name"),
|
||||
name="Name",
|
||||
description="Name of the preset, used to make the path name",
|
||||
maxlen=64,
|
||||
)
|
||||
remove_active = bpy.props.BoolProperty(
|
||||
@@ -145,17 +144,16 @@ class AddPresetBase():
|
||||
class ExecutePreset(Operator):
|
||||
''' Executes a preset '''
|
||||
bl_idname = "script.execute_preset"
|
||||
bl_label = _("Execute a Python Preset")
|
||||
__doc__ = _(" Executes a preset ")
|
||||
bl_label = "Execute a Python Preset"
|
||||
|
||||
filepath = bpy.props.StringProperty(
|
||||
name=_("Path"),
|
||||
description=_("Path of the Python file to execute"),
|
||||
name="Path",
|
||||
description="Path of the Python file to execute",
|
||||
maxlen=512,
|
||||
)
|
||||
menu_idname = bpy.props.StringProperty(
|
||||
name=_("Menu ID Name"),
|
||||
description=_("ID name of the menu this was called from"),
|
||||
name="Menu ID Name",
|
||||
description="ID name of the menu this was called from",
|
||||
)
|
||||
|
||||
def execute(self, context):
|
||||
@@ -174,7 +172,7 @@ class ExecutePreset(Operator):
|
||||
class AddPresetRender(AddPresetBase, Operator):
|
||||
'''Add a Render Preset'''
|
||||
bl_idname = "render.preset_add"
|
||||
bl_label = _("Add Render Preset")
|
||||
bl_label = "Add Render Preset"
|
||||
preset_menu = "RENDER_MT_presets"
|
||||
|
||||
preset_defines = [
|
||||
@@ -200,9 +198,8 @@ class AddPresetRender(AddPresetBase, Operator):
|
||||
class AddPresetSSS(AddPresetBase, Operator):
|
||||
'''Add a Subsurface Scattering Preset'''
|
||||
bl_idname = "material.sss_preset_add"
|
||||
bl_label = _("Add SSS Preset")
|
||||
bl_label = "Add SSS Preset"
|
||||
preset_menu = "MATERIAL_MT_sss_presets"
|
||||
__doc__ = _("Add a Subsurface Scattering Preset")
|
||||
|
||||
preset_defines = [
|
||||
("material = "
|
||||
@@ -229,7 +226,7 @@ class AddPresetSSS(AddPresetBase, Operator):
|
||||
class AddPresetCloth(AddPresetBase, Operator):
|
||||
'''Add a Cloth Preset'''
|
||||
bl_idname = "cloth.preset_add"
|
||||
bl_label = _("Add Cloth Preset")
|
||||
bl_label = "Add Cloth Preset"
|
||||
preset_menu = "CLOTH_MT_presets"
|
||||
|
||||
preset_defines = [
|
||||
@@ -251,7 +248,7 @@ class AddPresetCloth(AddPresetBase, Operator):
|
||||
class AddPresetSunSky(AddPresetBase, Operator):
|
||||
'''Add a Sky & Atmosphere Preset'''
|
||||
bl_idname = "lamp.sunsky_preset_add"
|
||||
bl_label = _("Add Sunsky Preset")
|
||||
bl_label = "Add Sunsky Preset"
|
||||
preset_menu = "LAMP_MT_sunsky_presets"
|
||||
|
||||
preset_defines = [
|
||||
@@ -280,9 +277,8 @@ class AddPresetSunSky(AddPresetBase, Operator):
|
||||
class AddPresetInteraction(AddPresetBase, Operator):
|
||||
'''Add an Application Interaction Preset'''
|
||||
bl_idname = "wm.interaction_preset_add"
|
||||
bl_label = _("Add Interaction Preset")
|
||||
bl_label = "Add Interaction Preset"
|
||||
preset_menu = "USERPREF_MT_interaction_presets"
|
||||
__doc__ = _('Add an Application Interaction Preset')
|
||||
|
||||
preset_defines = [
|
||||
"user_preferences = bpy.context.user_preferences"
|
||||
@@ -307,10 +303,9 @@ class AddPresetInteraction(AddPresetBase, Operator):
|
||||
class AddPresetKeyconfig(AddPresetBase, Operator):
|
||||
'''Add a Keyconfig Preset'''
|
||||
bl_idname = "wm.keyconfig_preset_add"
|
||||
bl_label = _("Add Keyconfig Preset")
|
||||
bl_label = "Add Keyconfig Preset"
|
||||
preset_menu = "USERPREF_MT_keyconfigs"
|
||||
preset_subdir = "keyconfig"
|
||||
__doc__ = _('Add a Keyconfig Preset')
|
||||
|
||||
def add(self, context, filepath):
|
||||
bpy.ops.wm.keyconfig_export(filepath=filepath)
|
||||
@@ -331,12 +326,11 @@ class AddPresetKeyconfig(AddPresetBase, Operator):
|
||||
class AddPresetOperator(AddPresetBase, Operator):
|
||||
'''Add an Application Interaction Preset'''
|
||||
bl_idname = "wm.operator_preset_add"
|
||||
bl_label = _("Operator Preset")
|
||||
bl_label = "Operator Preset"
|
||||
preset_menu = "WM_MT_operator_presets"
|
||||
__doc__ = _("Add an Application Interaction Preset")
|
||||
|
||||
operator = bpy.props.StringProperty(
|
||||
name=_("Operator"),
|
||||
name="Operator",
|
||||
maxlen=64,
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
@@ -375,7 +369,7 @@ class AddPresetOperator(AddPresetBase, Operator):
|
||||
|
||||
|
||||
class WM_MT_operator_presets(Menu):
|
||||
bl_label = _("Operator Presets")
|
||||
bl_label = "Operator Presets"
|
||||
|
||||
def draw(self, context):
|
||||
self.operator = context.space_data.operator.bl_idname
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
import bpy
|
||||
from bpy.types import Operator
|
||||
import os
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
def guess_player_path(preset):
|
||||
@@ -69,9 +68,8 @@ def guess_player_path(preset):
|
||||
class PlayRenderedAnim(Operator):
|
||||
'''Plays back rendered frames/movies using an external player.'''
|
||||
bl_idname = "render.play_rendered_anim"
|
||||
bl_label = _("Play Rendered Animation")
|
||||
bl_label = "Play Rendered Animation"
|
||||
bl_options = {'REGISTER'}
|
||||
__doc__ = _("Plays back rendered frames/movies using an external player.")
|
||||
|
||||
def execute(self, context):
|
||||
import subprocess
|
||||
|
||||
@@ -22,14 +22,13 @@ import bpy
|
||||
from bpy.types import Operator
|
||||
|
||||
from bpy.props import IntProperty
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class SequencerCrossfadeSounds(Operator):
|
||||
'''Do crossfading volume animation of two selected sound strips.'''
|
||||
|
||||
bl_idname = "sequencer.crossfade_sounds"
|
||||
bl_label = _("Crossfade sounds")
|
||||
bl_label = "Crossfade sounds"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
@classmethod
|
||||
@@ -80,11 +79,11 @@ class SequencerCutMulticam(Operator):
|
||||
'''Cut multicam strip and select camera.'''
|
||||
|
||||
bl_idname = "sequencer.cut_multicam"
|
||||
bl_label = _("Cut multicam")
|
||||
bl_label = "Cut multicam"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
camera = IntProperty(
|
||||
name=_("Camera"),
|
||||
name="Camera",
|
||||
min=1, max=32,
|
||||
soft_min=1, soft_max=32,
|
||||
default=1,
|
||||
@@ -122,9 +121,8 @@ class SequencerDeinterlaceSelectedMovies(Operator):
|
||||
'''Deinterlace all selected movie sources.'''
|
||||
|
||||
bl_idname = "sequencer.deinterlace_selected_movies"
|
||||
bl_label = _("Deinterlace Movies")
|
||||
bl_label = "Deinterlace Movies"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
__doc__ = _("Deinterlace all selected movie sources.")
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
|
||||
@@ -28,13 +28,12 @@ from bpy.props import (StringProperty,
|
||||
)
|
||||
|
||||
from rna_prop_ui import rna_idprop_ui_prop_get, rna_idprop_ui_prop_clear
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class MESH_OT_delete_edgeloop(Operator):
|
||||
'''Delete an edge loop by merging the faces on each side to a single face loop'''
|
||||
bl_idname = "mesh.delete_edgeloop"
|
||||
bl_label = _("Delete Edge Loop")
|
||||
bl_label = "Delete Edge Loop"
|
||||
|
||||
def execute(self, context):
|
||||
if 'FINISHED' in bpy.ops.transform.edge_slide(value=1.0):
|
||||
@@ -45,20 +44,20 @@ class MESH_OT_delete_edgeloop(Operator):
|
||||
return {'CANCELLED'}
|
||||
|
||||
rna_path_prop = StringProperty(
|
||||
name=_("Context Attributes"),
|
||||
description=_("rna context string"),
|
||||
name="Context Attributes",
|
||||
description="rna context string",
|
||||
maxlen=1024,
|
||||
)
|
||||
|
||||
rna_reverse_prop = BoolProperty(
|
||||
name=_("Reverse"),
|
||||
description=_("Cycle backwards"),
|
||||
name="Reverse",
|
||||
description="Cycle backwards",
|
||||
default=False,
|
||||
)
|
||||
|
||||
rna_relative_prop = BoolProperty(
|
||||
name=_("Relative"),
|
||||
description=_("Apply relative to the current value (delta)"),
|
||||
name="Relative",
|
||||
description="Apply relative to the current value (delta)",
|
||||
default=False,
|
||||
)
|
||||
|
||||
@@ -141,16 +140,16 @@ def execute_context_assign(self, context):
|
||||
class BRUSH_OT_active_index_set(Operator):
|
||||
'''Set active sculpt/paint brush from it's number'''
|
||||
bl_idname = "brush.active_index_set"
|
||||
bl_label = _("Set Brush Number")
|
||||
bl_label = "Set Brush Number"
|
||||
|
||||
mode = StringProperty(
|
||||
name=_("mode"),
|
||||
description=_("Paint mode to set brush for"),
|
||||
name="mode",
|
||||
description="Paint mode to set brush for",
|
||||
maxlen=1024,
|
||||
)
|
||||
index = IntProperty(
|
||||
name=_("number"),
|
||||
description=_("Brush number"),
|
||||
name="number",
|
||||
description="Brush number",
|
||||
)
|
||||
|
||||
_attr_dict = {"sculpt": "use_paint_sculpt",
|
||||
@@ -175,13 +174,13 @@ class BRUSH_OT_active_index_set(Operator):
|
||||
class WM_OT_context_set_boolean(Operator):
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_boolean"
|
||||
bl_label = _("Context Set Boolean")
|
||||
bl_label = "Context Set Boolean"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = BoolProperty(
|
||||
name=_("Value"),
|
||||
description=_("Assignment value"),
|
||||
name="Value",
|
||||
description="Assignment value",
|
||||
default=True,
|
||||
)
|
||||
|
||||
@@ -191,13 +190,13 @@ class WM_OT_context_set_boolean(Operator):
|
||||
class WM_OT_context_set_int(Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_int"
|
||||
bl_label = _("Context Set")
|
||||
bl_label = "Context Set"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = IntProperty(
|
||||
name=_("Value"),
|
||||
description=_("Assign value"),
|
||||
name="Value",
|
||||
description="Assign value",
|
||||
default=0,
|
||||
)
|
||||
relative = rna_relative_prop
|
||||
@@ -208,18 +207,18 @@ class WM_OT_context_set_int(Operator): # same as enum
|
||||
class WM_OT_context_scale_int(Operator):
|
||||
'''Scale an int context value.'''
|
||||
bl_idname = "wm.context_scale_int"
|
||||
bl_label = _("Context Set")
|
||||
bl_label = "Context Set"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = FloatProperty(
|
||||
name=_("Value"),
|
||||
description=_("Assign value"),
|
||||
name="Value",
|
||||
description="Assign value",
|
||||
default=1.0,
|
||||
)
|
||||
always_step = BoolProperty(
|
||||
name=_("Always Step"),
|
||||
description=_("Always adjust the value by a minimum of 1 when 'value' is not 1.0."),
|
||||
name="Always Step",
|
||||
description="Always adjust the value by a minimum of 1 when 'value' is not 1.0.",
|
||||
default=True,
|
||||
)
|
||||
|
||||
@@ -251,13 +250,13 @@ class WM_OT_context_scale_int(Operator):
|
||||
class WM_OT_context_set_float(Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_float"
|
||||
bl_label = _("Context Set Float")
|
||||
bl_label = "Context Set Float"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = FloatProperty(
|
||||
name=_("Value"),
|
||||
description=_("Assignment value"),
|
||||
name="Value",
|
||||
description="Assignment value",
|
||||
default=0.0,
|
||||
)
|
||||
relative = rna_relative_prop
|
||||
@@ -268,13 +267,13 @@ class WM_OT_context_set_float(Operator): # same as enum
|
||||
class WM_OT_context_set_string(Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_string"
|
||||
bl_label = _("Context Set String")
|
||||
bl_label = "Context Set String"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = StringProperty(
|
||||
name=_("Value"),
|
||||
description=_("Assign value"),
|
||||
name="Value",
|
||||
description="Assign value",
|
||||
maxlen=1024,
|
||||
)
|
||||
|
||||
@@ -284,13 +283,13 @@ class WM_OT_context_set_string(Operator): # same as enum
|
||||
class WM_OT_context_set_enum(Operator):
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_enum"
|
||||
bl_label = _("Context Set Enum")
|
||||
bl_label = "Context Set Enum"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = StringProperty(
|
||||
name=_("Value"),
|
||||
description=_("Assignment value (as a string)"),
|
||||
name="Value",
|
||||
description="Assignment value (as a string)",
|
||||
maxlen=1024,
|
||||
)
|
||||
|
||||
@@ -300,13 +299,13 @@ class WM_OT_context_set_enum(Operator):
|
||||
class WM_OT_context_set_value(Operator):
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_value"
|
||||
bl_label = _("Context Set Value")
|
||||
bl_label = "Context Set Value"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = StringProperty(
|
||||
name=_("Value"),
|
||||
description=_("Assignment value (as a string)"),
|
||||
name="Value",
|
||||
description="Assignment value (as a string)",
|
||||
maxlen=1024,
|
||||
)
|
||||
|
||||
@@ -321,7 +320,7 @@ class WM_OT_context_set_value(Operator):
|
||||
class WM_OT_context_toggle(Operator):
|
||||
'''Toggle a context value.'''
|
||||
bl_idname = "wm.context_toggle"
|
||||
bl_label = _("Context Toggle")
|
||||
bl_label = "Context Toggle"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
@@ -340,18 +339,18 @@ class WM_OT_context_toggle(Operator):
|
||||
class WM_OT_context_toggle_enum(Operator):
|
||||
'''Toggle a context value.'''
|
||||
bl_idname = "wm.context_toggle_enum"
|
||||
bl_label = _("Context Toggle Values")
|
||||
bl_label = "Context Toggle Values"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value_1 = StringProperty(
|
||||
name=_("Value"),
|
||||
description=_("Toggle enum"),
|
||||
name="Value",
|
||||
description="Toggle enum",
|
||||
maxlen=1024,
|
||||
)
|
||||
value_2 = StringProperty(
|
||||
name=_("Value"),
|
||||
description=_("Toggle enum"),
|
||||
name="Value",
|
||||
description="Toggle enum",
|
||||
maxlen=1024,
|
||||
)
|
||||
|
||||
@@ -374,7 +373,7 @@ class WM_OT_context_cycle_int(Operator):
|
||||
'''Set a context value. Useful for cycling active material, '''
|
||||
'''vertex keys, groups' etc.'''
|
||||
bl_idname = "wm.context_cycle_int"
|
||||
bl_label = _("Context Int Cycle")
|
||||
bl_label = "Context Int Cycle"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
@@ -408,7 +407,7 @@ class WM_OT_context_cycle_int(Operator):
|
||||
class WM_OT_context_cycle_enum(Operator):
|
||||
'''Toggle a context value.'''
|
||||
bl_idname = "wm.context_cycle_enum"
|
||||
bl_label = _("Context Enum Cycle")
|
||||
bl_label = "Context Enum Cycle"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
@@ -461,7 +460,7 @@ class WM_OT_context_cycle_array(Operator):
|
||||
'''Set a context array value.
|
||||
Useful for cycling the active mesh edit mode.'''
|
||||
bl_idname = "wm.context_cycle_array"
|
||||
bl_label = _("Context Array Cycle")
|
||||
bl_label = "Context Array Cycle"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
@@ -507,7 +506,7 @@ class WM_MT_context_menu_enum(Menu):
|
||||
|
||||
class WM_OT_context_menu_enum(Operator):
|
||||
bl_idname = "wm.context_menu_enum"
|
||||
bl_label = _("Context Enum Menu")
|
||||
bl_label = "Context Enum Menu"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
data_path = rna_path_prop
|
||||
|
||||
@@ -521,13 +520,13 @@ class WM_OT_context_menu_enum(Operator):
|
||||
class WM_OT_context_set_id(Operator):
|
||||
'''Toggle a context value.'''
|
||||
bl_idname = "wm.context_set_id"
|
||||
bl_label = _("Set Library ID")
|
||||
bl_label = "Set Library ID"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = StringProperty(
|
||||
name=_("Value"),
|
||||
description=_("Assign value"),
|
||||
name="Value",
|
||||
description="Assign value",
|
||||
maxlen=1024,
|
||||
)
|
||||
|
||||
@@ -557,13 +556,13 @@ class WM_OT_context_set_id(Operator):
|
||||
|
||||
|
||||
doc_id = StringProperty(
|
||||
name=_("Doc ID"),
|
||||
name="Doc ID",
|
||||
maxlen=1024,
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
|
||||
doc_new = StringProperty(
|
||||
name=_("Edit Description"),
|
||||
name="Edit Description",
|
||||
maxlen=1024,
|
||||
)
|
||||
|
||||
@@ -636,18 +635,18 @@ class WM_OT_context_collection_boolean_set(Operator):
|
||||
class WM_OT_context_modal_mouse(Operator):
|
||||
'''Adjust arbitrary values with mouse input'''
|
||||
bl_idname = "wm.context_modal_mouse"
|
||||
bl_label = _("Context Modal Mouse")
|
||||
bl_label = "Context Modal Mouse"
|
||||
bl_options = {'GRAB_POINTER', 'BLOCKING', 'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path_iter = data_path_iter
|
||||
data_path_item = data_path_item
|
||||
|
||||
input_scale = FloatProperty(
|
||||
description=_("Scale the mouse movement by this value before applying the delta"),
|
||||
description="Scale the mouse movement by this value before applying the delta",
|
||||
default=0.01,
|
||||
)
|
||||
invert = BoolProperty(
|
||||
description=_("Invert the mouse input"),
|
||||
description="Invert the mouse input",
|
||||
default=False,
|
||||
)
|
||||
initial_x = IntProperty(options={'HIDDEN'})
|
||||
@@ -729,7 +728,6 @@ class WM_OT_context_modal_mouse(Operator):
|
||||
|
||||
class WM_OT_url_open(Operator):
|
||||
"Open a website in the Webbrowser"
|
||||
__doc__ = _("Open a website in the Webbrowser")
|
||||
bl_idname = "wm.url_open"
|
||||
bl_label = ""
|
||||
|
||||
@@ -750,7 +748,7 @@ class WM_OT_path_open(Operator):
|
||||
bl_label = ""
|
||||
|
||||
filepath = StringProperty(
|
||||
name=_("File Path"),
|
||||
name="File Path",
|
||||
maxlen=1024,
|
||||
subtype='FILE_PATH',
|
||||
)
|
||||
@@ -784,7 +782,7 @@ class WM_OT_path_open(Operator):
|
||||
class WM_OT_doc_view(Operator):
|
||||
'''Load online reference docs'''
|
||||
bl_idname = "wm.doc_view"
|
||||
bl_label = _("View Documentation")
|
||||
bl_label = "View Documentation"
|
||||
|
||||
doc_id = doc_id
|
||||
if bpy.app.version_cycle == "release":
|
||||
@@ -839,7 +837,7 @@ class WM_OT_doc_view(Operator):
|
||||
class WM_OT_doc_edit(Operator):
|
||||
'''Load online reference docs'''
|
||||
bl_idname = "wm.doc_edit"
|
||||
bl_label = _("Edit Documentation")
|
||||
bl_label = "Edit Documentation"
|
||||
|
||||
doc_id = doc_id
|
||||
doc_new = doc_new
|
||||
@@ -899,7 +897,7 @@ class WM_OT_doc_edit(Operator):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.label(text=_("Descriptor ID")+": '%s'" % self.doc_id)
|
||||
layout.label(text="Descriptor ID: '%s'" % self.doc_id)
|
||||
layout.prop(self, "doc_new", text="")
|
||||
|
||||
def invoke(self, context, event):
|
||||
@@ -908,26 +906,26 @@ class WM_OT_doc_edit(Operator):
|
||||
|
||||
|
||||
rna_path = StringProperty(
|
||||
name=_("Property Edit"),
|
||||
description=_("Property data_path edit"),
|
||||
name="Property Edit",
|
||||
description="Property data_path edit",
|
||||
maxlen=1024,
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
|
||||
rna_value = StringProperty(
|
||||
name=_("Property Value"),
|
||||
description=_("Property value edit"),
|
||||
name="Property Value",
|
||||
description="Property value edit",
|
||||
maxlen=1024,
|
||||
)
|
||||
|
||||
rna_property = StringProperty(
|
||||
name=_("Property Name"),
|
||||
description=_("Property name edit"),
|
||||
name="Property Name",
|
||||
description="Property name edit",
|
||||
maxlen=1024,
|
||||
)
|
||||
|
||||
rna_min = FloatProperty(
|
||||
name=_("Min"),
|
||||
name="Min",
|
||||
default=0.0,
|
||||
precision=3,
|
||||
)
|
||||
@@ -942,8 +940,7 @@ rna_max = FloatProperty(
|
||||
class WM_OT_properties_edit(Operator):
|
||||
'''Internal use (edit a property data_path)'''
|
||||
bl_idname = "wm.properties_edit"
|
||||
bl_label = _("Edit Property")
|
||||
__doc__ = _("Internal use (edit a property data_path)")
|
||||
bl_label = "Edit Property"
|
||||
bl_options = {'REGISTER'} # only because invoke_props_popup requires.
|
||||
|
||||
data_path = rna_path
|
||||
@@ -952,7 +949,7 @@ class WM_OT_properties_edit(Operator):
|
||||
min = rna_min
|
||||
max = rna_max
|
||||
description = StringProperty(
|
||||
name=_("Tip"),
|
||||
name="Tip",
|
||||
)
|
||||
|
||||
def execute(self, context):
|
||||
@@ -1030,8 +1027,7 @@ class WM_OT_properties_edit(Operator):
|
||||
class WM_OT_properties_add(Operator):
|
||||
'''Internal use (edit a property data_path)'''
|
||||
bl_idname = "wm.properties_add"
|
||||
bl_label = _("Add Property")
|
||||
__doc__ = _("Internal use (edit a property data_path)")
|
||||
bl_label = "Add Property"
|
||||
|
||||
data_path = rna_path
|
||||
|
||||
@@ -1061,7 +1057,7 @@ class WM_OT_properties_context_change(Operator):
|
||||
bl_label = ""
|
||||
|
||||
context = StringProperty(
|
||||
name=_("Context"),
|
||||
name="Context",
|
||||
maxlen=32,
|
||||
)
|
||||
|
||||
@@ -1073,8 +1069,7 @@ class WM_OT_properties_context_change(Operator):
|
||||
class WM_OT_properties_remove(Operator):
|
||||
'''Internal use (edit a property data_path)'''
|
||||
bl_idname = "wm.properties_remove"
|
||||
bl_label = _("Remove Property")
|
||||
__doc__ = _("Internal use (edit a property data_path)")
|
||||
bl_label = "Remove Property"
|
||||
|
||||
data_path = rna_path
|
||||
property = rna_property
|
||||
@@ -1088,10 +1083,10 @@ class WM_OT_properties_remove(Operator):
|
||||
|
||||
class WM_OT_keyconfig_activate(Operator):
|
||||
bl_idname = "wm.keyconfig_activate"
|
||||
bl_label = _("Activate Keyconfig")
|
||||
bl_label = "Activate Keyconfig"
|
||||
|
||||
filepath = StringProperty(
|
||||
name=_("File Path"),
|
||||
name="File Path",
|
||||
maxlen=1024,
|
||||
)
|
||||
|
||||
@@ -1102,7 +1097,7 @@ class WM_OT_keyconfig_activate(Operator):
|
||||
|
||||
class WM_OT_appconfig_default(Operator):
|
||||
bl_idname = "wm.appconfig_default"
|
||||
bl_label = _("Default Application Configuration")
|
||||
bl_label = "Default Application Configuration"
|
||||
|
||||
def execute(self, context):
|
||||
import os
|
||||
@@ -1119,7 +1114,7 @@ class WM_OT_appconfig_default(Operator):
|
||||
|
||||
class WM_OT_appconfig_activate(Operator):
|
||||
bl_idname = "wm.appconfig_activate"
|
||||
bl_label = _("Activate Application Configuration")
|
||||
bl_label = "Activate Application Configuration"
|
||||
|
||||
filepath = StringProperty(
|
||||
name="File Path",
|
||||
@@ -1141,8 +1136,7 @@ class WM_OT_appconfig_activate(Operator):
|
||||
class WM_OT_sysinfo(Operator):
|
||||
'''Generate System Info'''
|
||||
bl_idname = "wm.sysinfo"
|
||||
bl_label = _("System Info")
|
||||
__doc__ = _("Generate System Info")
|
||||
bl_label = "System Info"
|
||||
|
||||
def execute(self, context):
|
||||
import sys_info
|
||||
@@ -1150,10 +1144,60 @@ class WM_OT_sysinfo(Operator):
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class WM_OT_get_messages(Operator):
|
||||
bl_idname = "wm.get_messages"
|
||||
bl_label = "Get Messages"
|
||||
|
||||
def _putMessage(self, messages, msg):
|
||||
if len(msg):
|
||||
messages[msg] = True
|
||||
|
||||
def _walkProperties(self, properties, messages):
|
||||
for prop in properties:
|
||||
self._putMessage(messages, prop.name)
|
||||
self._putMessage(messages, prop.description)
|
||||
|
||||
if isinstance(prop, bpy.types.EnumProperty):
|
||||
for item in prop.enum_items:
|
||||
self._putMessage(messages, item.name)
|
||||
self._putMessage(messages, item.description)
|
||||
|
||||
def _walkRNA(self, bl_rna, messages):
|
||||
if bl_rna.name and bl_rna.name != bl_rna.identifier:
|
||||
self._putMessage(messages, bl_rna.name)
|
||||
|
||||
if bl_rna.description:
|
||||
self._putMessage(messages, bl_rna.description)
|
||||
|
||||
self._walkProperties(bl_rna.properties, messages)
|
||||
|
||||
def _walkClass(self, cls, messages):
|
||||
self._walkRNA(cls.bl_rna, messages)
|
||||
|
||||
def execute(self, context):
|
||||
messages = {}
|
||||
|
||||
for cls in type(bpy.context).__base__.__subclasses__():
|
||||
self._walkClass(cls, messages)
|
||||
|
||||
for cls in bpy.types.Space.__subclasses__():
|
||||
self._walkClass(cls, messages)
|
||||
|
||||
for cls in bpy.types.Operator.__subclasses__():
|
||||
self._walkClass(cls, messages)
|
||||
|
||||
text = bpy.data.texts.new(name="messages.txt")
|
||||
for message in messages:
|
||||
text.write(message + "\n")
|
||||
self._walkClass(bpy.types.SpaceDopeSheetEditor, messages)
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class WM_OT_copy_prev_settings(Operator):
|
||||
'''Copy settings from previous version'''
|
||||
bl_idname = "wm.copy_prev_settings"
|
||||
bl_label = _("Copy Previous Settings")
|
||||
bl_label = "Copy Previous Settings"
|
||||
|
||||
def execute(self, context):
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user