remove use of gettext: _("...") style translation now its handled by rna.
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
import bpy
|
||||
from bpy.types import Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class ObjectButtonsPanel():
|
||||
@@ -56,14 +55,14 @@ class OBJECT_PT_transform(ObjectButtonsPanel, Panel):
|
||||
|
||||
row.column().prop(ob, "location")
|
||||
if ob.rotation_mode == 'QUATERNION':
|
||||
row.column().prop(ob, "rotation_quaternion", text=_("Rotation"))
|
||||
row.column().prop(ob, "rotation_quaternion", text="Rotation")
|
||||
elif ob.rotation_mode == 'AXIS_ANGLE':
|
||||
#row.column().label(text=_("Rotation"))
|
||||
#row.column().prop(pchan, "rotation_angle", text=_("Angle"))
|
||||
#row.column().prop(pchan, "rotation_axis", text=_("Axis"))
|
||||
row.column().prop(ob, "rotation_axis_angle", text=_("Rotation"))
|
||||
#row.column().label(text="Rotation")
|
||||
#row.column().prop(pchan, "rotation_angle", text="Angle")
|
||||
#row.column().prop(pchan, "rotation_axis", text="Axis")
|
||||
row.column().prop(ob, "rotation_axis_angle", text="Rotation")
|
||||
else:
|
||||
row.column().prop(ob, "rotation_euler", text=_("Rotation"))
|
||||
row.column().prop(ob, "rotation_euler", text="Rotation")
|
||||
|
||||
row.column().prop(ob, "scale")
|
||||
|
||||
@@ -83,15 +82,15 @@ class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel):
|
||||
|
||||
row.column().prop(ob, "delta_location")
|
||||
if ob.rotation_mode == 'QUATERNION':
|
||||
row.column().prop(ob, "delta_rotation_quaternion", text=_("Rotation"))
|
||||
row.column().prop(ob, "delta_rotation_quaternion", text="Rotation")
|
||||
elif ob.rotation_mode == 'AXIS_ANGLE':
|
||||
#row.column().label(text=_("Rotation"))
|
||||
#row.column().prop(pchan, "delta_rotation_angle", text=_("Angle"))
|
||||
#row.column().prop(pchan, "delta_rotation_axis", text=_("Axis"))
|
||||
#row.column().prop(ob, "delta_rotation_axis_angle", text=_("Rotation"))
|
||||
row.column().label(text=_("Not for Axis-Angle"))
|
||||
#row.column().label(text="Rotation")
|
||||
#row.column().prop(pchan, "delta_rotation_angle", text="Angle")
|
||||
#row.column().prop(pchan, "delta_rotation_axis", text="Axis")
|
||||
#row.column().prop(ob, "delta_rotation_axis_angle", text="Rotation")
|
||||
row.column().label(text="Not for Axis-Angle")
|
||||
else:
|
||||
row.column().prop(ob, "delta_rotation_euler", text=_("Rotation"))
|
||||
row.column().prop(ob, "delta_rotation_euler", text="Rotation")
|
||||
|
||||
row.column().prop(ob, "delta_scale")
|
||||
|
||||
@@ -108,18 +107,18 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
|
||||
row = layout.row()
|
||||
|
||||
col = row.column()
|
||||
col.prop(ob, "lock_location", text=_("Location"))
|
||||
col.prop(ob, "lock_location", text="Location")
|
||||
|
||||
col = row.column()
|
||||
if ob.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
|
||||
col.prop(ob, "lock_rotations_4d", text=_("Rotation"))
|
||||
col.prop(ob, "lock_rotations_4d", text="Rotation")
|
||||
if ob.lock_rotations_4d:
|
||||
col.prop(ob, "lock_rotation_w", text="W")
|
||||
col.prop(ob, "lock_rotation", text="")
|
||||
else:
|
||||
col.prop(ob, "lock_rotation", text=_("Rotation"))
|
||||
col.prop(ob, "lock_rotation", text="Rotation")
|
||||
|
||||
row.column().prop(ob, "lock_scale", text=_("Scale"))
|
||||
row.column().prop(ob, "lock_scale", text="Scale")
|
||||
|
||||
|
||||
class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
|
||||
@@ -138,7 +137,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
|
||||
col.prop(ob, "pass_index")
|
||||
|
||||
col = split.column()
|
||||
col.label(text=_("Parent:"))
|
||||
col.label(text="Parent:")
|
||||
col.prop(ob, "parent", text="")
|
||||
|
||||
sub = col.column()
|
||||
@@ -158,7 +157,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
|
||||
ob = context.object
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator("object.group_link", text=_("Add to Group"))
|
||||
row.operator("object.group_link", text="Add to Group")
|
||||
row.operator("object.group_add", text="", icon='ZOOMIN')
|
||||
|
||||
# XXX, this is bad practice, yes, I wrote it :( - campbell
|
||||
@@ -177,12 +176,12 @@ class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
|
||||
split = col.box().split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(group, "layers", text=_("Dupli"))
|
||||
col.prop(group, "layers", text="Dupli")
|
||||
|
||||
col = split.column()
|
||||
col.prop(group, "dupli_offset", text="")
|
||||
|
||||
prop = col.operator("wm.context_set_value", text=_("From Cursor"))
|
||||
prop = col.operator("wm.context_set_value", text="From Cursor")
|
||||
prop.data_path = "object.users_group[%d].dupli_offset" % index
|
||||
prop.value = value
|
||||
index += 1
|
||||
@@ -198,11 +197,11 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
|
||||
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
col.prop(ob, "draw_type", text=_("Type"))
|
||||
col.prop(ob, "draw_type", text="Type")
|
||||
|
||||
col = split.column()
|
||||
row = col.row()
|
||||
row.prop(ob, "show_bounds", text=_("Bounds"))
|
||||
row.prop(ob, "show_bounds", text="Bounds")
|
||||
sub = row.row()
|
||||
sub.active = ob.show_bounds
|
||||
sub.prop(ob, "draw_bounds_type", text="")
|
||||
@@ -210,16 +209,16 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(ob, "show_name", text=_("Name"))
|
||||
col.prop(ob, "show_axis", text=_("Axis"))
|
||||
col.prop(ob, "show_wire", text=_("Wire"))
|
||||
col.prop(ob, "color", text=_("Object Color"))
|
||||
col.prop(ob, "show_name", text="Name")
|
||||
col.prop(ob, "show_axis", text="Axis")
|
||||
col.prop(ob, "show_wire", text="Wire")
|
||||
col.prop(ob, "color", text="Object Color")
|
||||
|
||||
col = split.column()
|
||||
col.prop(ob, "show_texture_space", text=_("Texture Space"))
|
||||
col.prop(ob, "show_x_ray", text=_("X-Ray"))
|
||||
col.prop(ob, "show_texture_space", text="Texture Space")
|
||||
col.prop(ob, "show_x_ray", text="X-Ray")
|
||||
if ob.type == 'MESH':
|
||||
col.prop(ob, "show_transparent", text=_("Transparency"))
|
||||
col.prop(ob, "show_transparent", text="Transparency")
|
||||
|
||||
|
||||
class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
|
||||
@@ -236,26 +235,26 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
|
||||
split = layout.split()
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(ob, "dupli_frames_start", text=_("Start"))
|
||||
col.prop(ob, "dupli_frames_end", text=_("End"))
|
||||
col.prop(ob, "dupli_frames_start", text="Start")
|
||||
col.prop(ob, "dupli_frames_end", text="End")
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(ob, "dupli_frames_on", text=_("On"))
|
||||
col.prop(ob, "dupli_frames_off", text=_("Off"))
|
||||
col.prop(ob, "dupli_frames_on", text="On")
|
||||
col.prop(ob, "dupli_frames_off", text="Off")
|
||||
|
||||
layout.prop(ob, "use_dupli_frames_speed", text=_("Speed"))
|
||||
layout.prop(ob, "use_dupli_frames_speed", text="Speed")
|
||||
|
||||
elif ob.dupli_type == 'VERTS':
|
||||
layout.prop(ob, "use_dupli_vertices_rotation", text=_("Rotation"))
|
||||
layout.prop(ob, "use_dupli_vertices_rotation", text="Rotation")
|
||||
|
||||
elif ob.dupli_type == 'FACES':
|
||||
|
||||
row = layout.row()
|
||||
row.prop(ob, "use_dupli_faces_scale", text=_("Scale"))
|
||||
row.prop(ob, "dupli_faces_scale", text=_("Inherit Scale"))
|
||||
row.prop(ob, "use_dupli_faces_scale", text="Scale")
|
||||
row.prop(ob, "dupli_faces_scale", text="Inherit Scale")
|
||||
|
||||
elif ob.dupli_type == 'GROUP':
|
||||
layout.prop(ob, "dupli_group", text=_("Group"))
|
||||
layout.prop(ob, "dupli_group", text="Group")
|
||||
|
||||
|
||||
# XXX: the following options are all quite buggy, ancient hacks that should be dropped
|
||||
@@ -272,21 +271,21 @@ class OBJECT_PT_animation(ObjectButtonsPanel, Panel):
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.label(text=_("Time Offset:"))
|
||||
col.prop(ob, "use_time_offset_edit", text=_("Edit"))
|
||||
col.label(text="Time Offset:")
|
||||
col.prop(ob, "use_time_offset_edit", text="Edit")
|
||||
row = col.row()
|
||||
row.prop(ob, "use_time_offset_parent", text=_("Parent"))
|
||||
row.prop(ob, "use_time_offset_parent", text="Parent")
|
||||
row.active = (ob.parent is not None)
|
||||
row = col.row()
|
||||
row.prop(ob, "use_slow_parent")
|
||||
row.active = (ob.parent is not None)
|
||||
col.prop(ob, "time_offset", text=_("Offset"))
|
||||
col.prop(ob, "time_offset", text="Offset")
|
||||
|
||||
# XXX: these are still used for a few curve-related tracking features
|
||||
col = split.column()
|
||||
col.label(text=_("Tracking Axes:"))
|
||||
col.prop(ob, "track_axis", text=_("Axis"))
|
||||
col.prop(ob, "up_axis", text=_("Up Axis"))
|
||||
col.label(text="Tracking Axes:")
|
||||
col.prop(ob, "track_axis", text="Axis")
|
||||
col.prop(ob, "up_axis", text="Up Axis")
|
||||
|
||||
|
||||
from bl_ui.properties_animviz import (
|
||||
@@ -313,8 +312,8 @@ class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
||||
layout.separator()
|
||||
|
||||
row = layout.row()
|
||||
row.operator("object.paths_calculate", text=_("Calculate Paths"))
|
||||
row.operator("object.paths_clear", text=_("Clear Paths"))
|
||||
row.operator("object.paths_calculate", text="Calculate Paths")
|
||||
row.operator("object.paths_clear", text="Clear Paths")
|
||||
|
||||
|
||||
class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel): # , Panel): # inherit from panel when ready
|
||||
|
Reference in New Issue
Block a user