diff options
author | William Reynish <william@reynish.com> | 2009-08-07 23:14:49 +0400 |
---|---|---|
committer | William Reynish <william@reynish.com> | 2009-08-07 23:14:49 +0400 |
commit | 0ce86b0a763e9669a15aa0c07242e6ab2aa8dacd (patch) | |
tree | 10a8e0f5aff75988cf1817ad9c6a2c67cf549e13 /release | |
parent | 70f011bbcea9aee222e43895fea503b26d3d566a (diff) |
Added material game physics options in RNA and layout.
Thanks to the new render API system these options don't clutter up the layout when you're not doing games.
Diffstat (limited to 'release')
-rw-r--r-- | release/ui/buttons_material.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py index d401367008b..bbb575a14e2 100644 --- a/release/ui/buttons_material.py +++ b/release/ui/buttons_material.py @@ -141,6 +141,28 @@ class MATERIAL_PT_strand(MaterialButtonsPanel): sub.active = tan.surface_diffuse sub.itemR(tan, "blend_distance", text="Distance") +class MATERIAL_PT_physics(MaterialButtonsPanel): + __label__ = "Physics" + COMPAT_ENGINES = set(['BLENDER_GAME']) + + def draw(self, context): + layout = self.layout + + mat = context.material + phys = mat.physics + + split = layout.split() + + col = split.column() + col.itemR(phys, "distance") + col.itemR(phys, "friction") + col.itemR(phys, "align_to_normal") + + col = split.column() + col.itemR(phys, "force", slider=True) + col.itemR(phys, "elasticity", slider=True) + col.itemR(phys, "damp", slider=True) + class MATERIAL_PT_options(MaterialButtonsPanel): __label__ = "Options" COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME']) @@ -515,6 +537,7 @@ bpy.types.register(MATERIAL_PT_raymir) bpy.types.register(MATERIAL_PT_raytransp) bpy.types.register(MATERIAL_PT_sss) bpy.types.register(MATERIAL_PT_halo) +bpy.types.register(MATERIAL_PT_physics) bpy.types.register(MATERIAL_PT_strand) bpy.types.register(MATERIAL_PT_options) bpy.types.register(MATERIAL_PT_shadows) |