Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_physics_cloth.py
| Context not available. | |||||
| ob = context.object | ob = context.object | ||||
| cloth = md.settings | cloth = md.settings | ||||
| split = layout.split() | layout.active = cloth_panel_enabled(md) | ||||
| split.active = cloth_panel_enabled(md) | |||||
| col = split.column() | split = layout.split(percentage=0.25) | ||||
| col.label(text="Presets:") | split.label(text="Presets:") | ||||
| sub = col.row(align=True) | sub = split.row(align=True) | ||||
| sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label) | 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='ZOOMIN') | ||||
| sub.operator("cloth.preset_add", text="", icon='ZOOMOUT').remove_active = True | sub.operator("cloth.preset_add", text="", icon='ZOOMOUT').remove_active = True | ||||
| col.label(text="Quality:") | split = layout.split(percentage=0.25) | ||||
| col.prop(cloth, "quality", text="Steps", slider=True) | |||||
| split.label(text="Quality:") | |||||
| split.prop(cloth, "quality", text="Steps") | |||||
| split = layout.split() | |||||
| col = split.column() | |||||
| col.label(text="Material:") | col.label(text="Material:") | ||||
| col.prop(cloth, "mass") | col.prop(cloth, "mass") | ||||
| Context not available. | |||||
| col.prop(cloth, "air_damping", text="Air") | col.prop(cloth, "air_damping", text="Air") | ||||
| col.prop(cloth, "vel_damping", text="Velocity") | 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 = col.column() | ||||
| sub.active = cloth.use_pin_cloth | sub.active = cloth.use_pin_cloth | ||||
| sub.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="") | sub.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="") | ||||
| Context not available. | |||||
| col.prop(cloth, "goal_friction", text="Friction") | col.prop(cloth, "goal_friction", text="Friction") | ||||
| """ | """ | ||||
| col = split.column() | |||||
| key = ob.data.shape_keys | key = ob.data.shape_keys | ||||
| if key: | if key: | ||||
| col.label(text="Rest Shape Key:") | sub = col.column() | ||||
| col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="") | sub.label(text="Rest Shape Key:") | ||||
| sub.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="") | |||||
| class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): | class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): | ||||
| Context not available. | |||||
| split = layout.split() | split = layout.split() | ||||
| col = split.column() | 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, "distance_min", slider=True, text="Distance") | ||||
| col.prop(cloth, "repel_force", slider=True, text="Repel") | col.prop(cloth, "repel_force", slider=True, text="Repel") | ||||
| col.prop(cloth, "distance_repel", slider=True, text="Repel Distance") | col.prop(cloth, "distance_repel", slider=True, text="Repel Distance") | ||||
| Context not available. | |||||
| col.prop(cloth, "use_self_collision", text="Self Collision") | col.prop(cloth, "use_self_collision", text="Self Collision") | ||||
| sub = col.column() | sub = col.column() | ||||
| sub.active = cloth.use_self_collision | 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(cloth, "self_distance_min", slider=True, text="Distance") | ||||
| sub.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="") | sub.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="") | ||||
| Context not available. | |||||