diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_cloth.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_cloth.py | 53 |
1 files changed, 39 insertions, 14 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index a5cbffb2e2c..3ebf2691b4c 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -46,11 +46,12 @@ class PhysicButtonsPanel: def poll(cls, context): ob = context.object rd = context.scene.render - return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.cloth) + return (ob and ob.type == 'MESH') and (rd.engine in cls.COMPAT_ENGINES) and (context.cloth) class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): bl_label = "Cloth" + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -59,20 +60,29 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): ob = context.object cloth = md.settings - split = layout.split() - - split.active = cloth_panel_enabled(md) + layout.active = cloth_panel_enabled(md) - col = split.column() + split = layout.split(percentage=0.25) - col.label(text="Presets:") - sub = col.row(align=True) + split.label(text="Presets:") + sub = split.row(align=True) sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label) sub.operator("cloth.preset_add", text="", icon='ZOOMIN') sub.operator("cloth.preset_add", text="", icon='ZOOMOUT').remove_active = True - col.label(text="Quality:") - col.prop(cloth, "quality", text="Steps", slider=True) + split = layout.split(percentage=0.25) + + split.label(text="Quality:") + split.prop(cloth, "quality", text="Steps") + + split = layout.split(percentage=0.25) + + split.label(text="Speed:") + split.prop(cloth, "time_scale", text="Multiplier") + + split = layout.split() + + col = split.column() col.label(text="Material:") col.prop(cloth, "mass") @@ -86,7 +96,11 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): col.prop(cloth, "air_damping", text="Air") col.prop(cloth, "vel_damping", text="Velocity") - col.prop(cloth, "use_pin_cloth", text="Pinning") + split = layout.split() + + col = split.column() + + col.prop(cloth, "use_pin_cloth", text="Pinning:") sub = col.column() sub.active = cloth.use_pin_cloth sub.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="") @@ -103,16 +117,23 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): col.prop(cloth, "goal_friction", text="Friction") """ + col = split.column() + + col.prop(cloth, "use_dynamic_mesh", text="Dynamic Mesh") + key = ob.data.shape_keys if key: - col.label(text="Rest Shape Key:") - col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="") + sub = col.column() + sub.active = not cloth.use_dynamic_mesh + sub.label(text="Rest Shape Key:") + sub.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="") class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): bl_label = "Cloth Cache" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): md = context.cloth @@ -122,6 +143,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): bl_label = "Cloth Collision" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): cloth = context.cloth.collision_settings @@ -141,7 +163,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): split = layout.split() col = split.column() - col.prop(cloth, "collision_quality", slider=True, text="Quality") + col.prop(cloth, "collision_quality", text="Quality") col.prop(cloth, "distance_min", slider=True, text="Distance") col.prop(cloth, "repel_force", slider=True, text="Repel") col.prop(cloth, "distance_repel", slider=True, text="Repel Distance") @@ -151,7 +173,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): col.prop(cloth, "use_self_collision", text="Self Collision") sub = col.column() sub.active = cloth.use_self_collision - sub.prop(cloth, "self_collision_quality", slider=True, text="Quality") + sub.prop(cloth, "self_collision_quality", text="Quality") sub.prop(cloth, "self_distance_min", slider=True, text="Distance") sub.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="") @@ -161,6 +183,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel): bl_label = "Cloth Stiffness Scaling" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): cloth = context.cloth.settings @@ -193,6 +216,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel): bl_label = "Cloth Sewing Springs" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): cloth = context.cloth.settings @@ -226,6 +250,7 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel): bl_label = "Cloth Field Weights" bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): cloth = context.cloth.settings |