def draw(self, context):
    layout = self.layout
    layout.use_property_split = True
    md = context.cloth
    ob = context.object
    cloth = md.settings
    layout.active = cloth_panel_enabled(md)
    flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
    col = flow.column(align=True)
    col.prop_search(cloth, 'vertex_group_mass', ob, 'vertex_groups', text='Pin Group')
    sub = col.column(align=True)
    sub.active = (cloth.vertex_group_mass != '')
    sub.prop(cloth, 'pin_stiffness', text='Stiffness')
    col.separator()
    col = flow.column(align=True)
    col.prop(cloth, 'use_sewing_springs', text='Sewing')
    sub = col.column(align=True)
    sub.active = cloth.use_sewing_springs
    sub.prop(cloth, 'sewing_force_max', text='Max Sewing Force')
    col.separator()
    col = flow.column()
    col.prop(cloth, 'shrink_min', text='Shrinking Factor')
    col = flow.column()
    col.prop(cloth, 'use_dynamic_mesh', text='Dynamic Mesh')
    key = ob.data.shape_keys
    if key:
        col = flow.column()
        col.active = (not cloth.use_dynamic_mesh)
        col.prop_search(cloth, 'rest_shape_key', key, 'key_blocks', text='Rest Shape Key')
def draw(self, context):
    layout = self.layout
    layout.use_property_split = True
    md = context.cloth
    ob = context.object
    cloth = md.settings
    layout.active = cloth_panel_enabled(md)
    flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
    col = flow.column(align=True)
    col.prop_search(cloth, 'vertex_group_mass', ob, 'vertex_groups', text='Pin Group')
    sub = col.column(align=True)
    sub.active = (cloth.vertex_group_mass != )
    sub.prop(cloth, 'pin_stiffness', text='Stiffness')
    col.separator()
    col = flow.column(align=True)
    col.prop(cloth, 'use_sewing_springs', text='Sewing')
    sub = col.column(align=True)
    sub.active = cloth.use_sewing_springs
    sub.prop(cloth, 'sewing_force_max', text='Max Sewing Force')
    col.separator()
    col = flow.column()
    col.prop(cloth, 'shrink_min', text='Shrinking Factor')
    col = flow.column()
    col.prop(cloth, 'use_dynamic_mesh', text='Dynamic Mesh')
    key = ob.data.shape_keys
    if key:
        col = flow.column()
        col.active = (not cloth.use_dynamic_mesh)
        col.prop_search(cloth, 'rest_shape_key', key, 'key_blocks', text='Rest Shape Key')