finish handle for properties_XXX scripts

This commit is contained in:
Xiao Xiangquan
2011-08-02 16:51:50 +00:00
parent 66d1707293
commit 79656a65e0
27 changed files with 1262 additions and 1237 deletions

View File

@@ -18,7 +18,7 @@
# <pep8 compliant>
import bpy
from blf import gettext as _
from bl_ui.properties_physics_common import (
basic_force_field_settings_ui,
@@ -38,7 +38,7 @@ class PhysicButtonsPanel():
class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Force Fields"
bl_label = _("Force Fields")
@classmethod
def poll(cls, context):
@@ -53,13 +53,13 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
field = ob.field
split = layout.split(percentage=0.2)
split.label(text="Type:")
split.label(text=_("Type:"))
split.prop(field, "type", text="")
if field.type not in {'NONE', 'GUIDE', 'TEXTURE'}:
split = layout.split(percentage=0.2)
split.label(text="Shape:")
split.label(text=_("Shape:"))
split.prop(field, "shape", text="")
split = layout.split()
@@ -75,7 +75,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
col.prop(field, "use_guide_path_weight")
col = split.column()
col.label(text="Clumping:")
col.label(text=_("Clumping:"))
col.prop(field, "guide_clump_amount")
col.prop(field, "guide_clump_shape")
@@ -116,7 +116,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
if field.type not in {'NONE', 'GUIDE'}:
layout.label(text="Falloff:")
layout.label(text=_("Falloff:"))
layout.prop(field, "falloff_type", expand=True)
basic_force_field_falloff_ui(self, context, field)
@@ -127,20 +127,20 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
split = layout.split(percentage=0.35)
col = split.column()
col.label(text="Angular:")
col.prop(field, "use_radial_min", text="Use Minimum")
col.prop(field, "use_radial_max", text="Use Maximum")
col.label(text=_("Angular:"))
col.prop(field, "use_radial_min", text=_("Use Minimum"))
col.prop(field, "use_radial_max", text=_("Use Maximum"))
col = split.column()
col.prop(field, "radial_falloff", text="Power")
col.prop(field, "radial_falloff", text=_("Power"))
sub = col.column()
sub.active = field.use_radial_min
sub.prop(field, "radial_min", text="Angle")
sub.prop(field, "radial_min", text=_("Angle"))
sub = col.column()
sub.active = field.use_radial_max
sub.prop(field, "radial_max", text="Angle")
sub.prop(field, "radial_max", text=_("Angle"))
elif field.falloff_type == 'TUBE':
layout.separator()
@@ -148,24 +148,24 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
split = layout.split(percentage=0.35)
col = split.column()
col.label(text="Radial:")
col.prop(field, "use_radial_min", text="Use Minimum")
col.prop(field, "use_radial_max", text="Use Maximum")
col.label(text=_("Radial:"))
col.prop(field, "use_radial_min", text=_("Use Minimum"))
col.prop(field, "use_radial_max", text=_("Use Maximum"))
col = split.column()
col.prop(field, "radial_falloff", text="Power")
col.prop(field, "radial_falloff", text=_("Power"))
sub = col.column()
sub.active = field.use_radial_min
sub.prop(field, "radial_min", text="Distance")
sub.prop(field, "radial_min", text=_("Distance"))
sub = col.column()
sub.active = field.use_radial_max
sub.prop(field, "radial_max", text="Distance")
sub.prop(field, "radial_max", text=_("Distance"))
class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Collision"
bl_label = _("Collision")
#bl_options = {'DEFAULT_CLOSED'}
@classmethod
@@ -191,31 +191,31 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
split = layout.split()
col = split.column()
col.label(text="Particle:")
col.label(text=_("Particle:"))
col.prop(settings, "permeability", slider=True)
col.prop(settings, "stickness")
col.prop(settings, "use_particle_kill")
col.label(text="Particle Damping:")
col.label(text=_("Particle Damping:"))
sub = col.column(align=True)
sub.prop(settings, "damping_factor", text="Factor", slider=True)
sub.prop(settings, "damping_random", text="Random", slider=True)
sub.prop(settings, "damping_factor", text=_("Factor"), slider=True)
sub.prop(settings, "damping_random", text=_("Random"), slider=True)
col.label(text="Particle Friction:")
col.label(text=_("Particle Friction:"))
sub = col.column(align=True)
sub.prop(settings, "friction_factor", text="Factor", slider=True)
sub.prop(settings, "friction_random", text="Random", slider=True)
sub.prop(settings, "friction_factor", text=_("Factor"), slider=True)
sub.prop(settings, "friction_random", text=_("Random"), slider=True)
col = split.column()
col.label(text="Soft Body and Cloth:")
col.label(text=_("Soft Body and Cloth:"))
sub = col.column(align=True)
sub.prop(settings, "thickness_outer", text="Outer", slider=True)
sub.prop(settings, "thickness_inner", text="Inner", slider=True)
sub.prop(settings, "thickness_outer", text=_("Outer"), slider=True)
sub.prop(settings, "thickness_inner", text=_("Inner"), slider=True)
col.label(text="Soft Body Damping:")
col.prop(settings, "damping", text="Factor", slider=True)
col.label(text=_("Soft Body Damping:"))
col.prop(settings, "damping", text=_("Factor"), slider=True)
col.label(text="Force Fields:")
col.prop(settings, "absorption", text="Absorption")
col.label(text=_("Force Fields:"))
col.prop(settings, "absorption", text=_("Absorption"))
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)