So here is a example Panel and adding a boolean,
import bpy from bpy.props import BoolProperty bpy.types.Scene.Boolean= BoolProperty( name="Boolean", description="Example", default = True) class Example_Panel(bpy.types.Panel): bl_label = "Example" bl_category = "Example" bl_space_type = "VIEW_3D" bl_region_type = "UI" def draw(self, context): layout = self.layout sce = context.scene layout.prop(sce, "Boolean") def register(): bpy.utils.register_class(Example_Panel) def unregister(): bpy.utils.unregister_class(Example_Panel) if __name__ == "__main__": register()
so that would give a check like this,
and to add a icon,
layout.prop(sce, "Boolean", icon = 'CHECKMARK')
that would give this,
so I don't want an icon and at the same time I want a a button like the latter picture.
So far, I do this to not put a Icon to my booleans,
layout.prop(sce, "Boolean", icon = 'BLANK1')
It gives this,
But there is a offset to the right which I don't want, so how would I do this?