# How to add a radian property to a panel and have it work?

I'm trying to add the Line art crease angle to my viewport panel. I thought it should be fairly straightforward. When I change it to 180 degrees using the slider control I get this in the console area:

bpy.context.object.grease_pencil_modifiers["Line Art"].crease_threshold = 3.14159


Of course the value is in radians and not degrees, but the slider display is in degrees. All well and good. But when I place in in a panel thusly:

col.prop(bpy.data.objects["Line Art Thin"].grease_pencil_modifiers["Line Art"], "crease_threshold")


I get a nice control, which has the degrees shown, and I can manually enter the value by typing in it, but the slider control does not work. What is the best way to remedy this situation?

Thanks to batfinger for pointing me to that link. The answer is straightforward:

col.prop(bpy.data.objects["Line Art Thin"].grease_pencil_modifiers["Line Art"], "crease_threshold", slider=True)


It needed to have the slider=True appended.

• Possibly worth mentioning that this works because the property is a 'ROTATION' type. If the scene unit designated to rotations is degrees (default) it will display as degrees. Jul 30 at 10:56