Hi, I’m trying to add a checkbox to my panel but I keep getting
AttributeError: ‘Scene’ object has no attribute “my_tool”
Can someone please help me figure out what I’m doing wrong? I can’t seem to find documentation on how to add checkboxes in 2.8
class MSWRIG_PT_SegmentationPanel(bpy.types.Panel):
"""Panel Creation"""
bl_label = "Segmentation Panel"
bl_idname = "object.mswrig_pt_segmentationpanel"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "MSW Tools"
my_prop = BoolProperty(
name="Autokey changes",
description="Set keyframe for any parameter change in this panel",
default = True
)
def draw(self, context):
layout = self.layout
view = context.space_data
scene = context.scene
mytool = scene.my_tool
row = layout.row()
layout.label(text="test")
layout.prop(mytool, "my_bool", text="Bool Property")