It's actually pretty easy to do:
1 - Create a proxy PropertyGroup that will represent your bool properties: that proxy should have just a "value" field of type BoolProperty. Also make sure the update function of that property will actually change the ID property:
class BoolPropertyProxy(bpy.types.PropertyGroup):
value = BoolProperty(name="Value", update=bool_property_update)
def minko_script_bool_property_update(self, context):
context.active_object[self.name] = self.value
bpy.utils.register_class(BoolPropertyProxy)
bpy.types.Object.bool_properties = bpy.props.CollectionProperty(type=BoolPropertyProxy)
2 - When creating your ID properties, if the property is a bool then create and store an additional BoolPropertyProxy:
obj['properties'] = props
for key, key_type in props.items():
obj[key] = get_property_default_value(key)
if key_type == 'bool':
bool_prop = obj.bool_properties.add()
bool_prop.name = key
bool_prop.value = get_property_default_value(key)
3 - In the UI, if the property is typed as a bool, use the corresponding proxy instead:
for key, key_type in obj['properties']:
if key_type == 'bool':
for bool_prop in obj.bool_properties:
if bool_prop.name == key:
col.prop(bool_prop, 'value', text=key)
break
else:
col.prop(obj, '["' + key + '"]', text=key)
The value is stilled stored as an integer, but it's displayed as a checkbox which is much more convenient. I guess the same "proxy" idea can be used for pretty much any type.