I have a panel with split column. In the 2nd row is 3 boolean variables. I want to grey out the 2nd and 3rd option by default. I want the 2nd to be changeable if 1st is true, and 3rd to be changeable if both 1 and two are true. I've read something about "poll()" but not how to actually use it, or set conditions. Physics should only be enablable if singleMesh, and destructable only if physics enabled.
# Create two columns, by using a split layout.
split = layout.split()
# First column
col = split.column()
col.label(text="Building Size:")
col.prop(bpy.context.scene.user_vars, 'buildingHeight')
col.prop(bpy.context.scene.user_vars, 'buildingWidth')
col.prop(bpy.context.scene.user_vars, 'buildingDepth')
# Second column, aligned
col = split.column()
col.label(text="Dynamics:")
col.prop(bpy.context.scene.user_vars, 'singleMesh')
col.prop(bpy.context.scene.user_vars, 'enablePhysics')
col.prop(bpy.context.scene.user_vars, 'destructable_Building')
#EDIT This is what the specific solution to my example looks like.
col = split.column()
col.label(text="Dynamics:")
col.prop(vars, 'singleMesh')
sub = col.row()
sub.enabled = vars.singleMesh
sub.prop(vars, 'enablePhysics')
sub = col.row()
sub.enabled = vars.enablePhysics
sub.prop(vars, 'destructable_Building')
sub = col.row()
would suffice. $\endgroup$