Changeset View
Changeset View
Standalone View
Standalone View
sun_position/ui_sun.py
| Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col.separator() | col.separator() | ||||
| if p.show_north: | if p.show_north: | ||||
| col = flow.column(align=True) | col = flow.column(align=True) | ||||
| col.prop(sp, "show_north", toggle=True) | col.prop(sp, "show_north", toggle=True) | ||||
| col.prop(sp, "north_offset") | col.prop(sp, "north_offset") | ||||
| col.separator() | col.separator() | ||||
| if p.show_surface or p.show_analemmas: | |||||
| col = flow.column(align=True) | |||||
| if p.show_surface: | |||||
| col.prop(sp, "show_surface", toggle=True) | |||||
| if p.show_analemmas: | |||||
| col.prop(sp, "show_analemmas", toggle=True) | |||||
pioverfour: If `p.show_surface` is false, this prop is drawn in an other column, maybe the `show_north` col… | |||||
| col.separator() | |||||
| if p.show_az_el: | if p.show_az_el: | ||||
| col = flow.column(align=True) | col = flow.column(align=True) | ||||
| split = col.split(factor=0.4, align=True) | split = col.split(factor=0.4, align=True) | ||||
| split.label(text="Azimuth:") | split.label(text="Azimuth:") | ||||
| split.label(text=str(round(sun.azimuth, 3)) + "°") | split.label(text=str(round(sun.azimuth, 3)) + "°") | ||||
| split = col.split(factor=0.4, align=True) | split = col.split(factor=0.4, align=True) | ||||
| split.label(text="Elevation:") | split.label(text="Elevation:") | ||||
| split.label(text=str(round(sun.elevation, 3)) + "°") | split.label(text=str(round(sun.elevation, 3)) + "°") | ||||
| col.separator() | col.separator() | ||||
| if p.show_refraction: | if p.show_refraction: | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(sp, "use_refraction") | col.prop(sp, "use_refraction") | ||||
| col.separator() | col.separator() | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(sp, "sun_distance") | col.prop(sp, "sun_distance") | ||||
| col.separator() | |||||
| class SUNPOS_PT_Time(bpy.types.Panel): | class SUNPOS_PT_Time(bpy.types.Panel): | ||||
| bl_space_type = "PROPERTIES" | bl_space_type = "PROPERTIES" | ||||
| bl_region_type = "WINDOW" | bl_region_type = "WINDOW" | ||||
| bl_context = "world" | bl_context = "world" | ||||
| bl_label = "Time" | bl_label = "Time" | ||||
| bl_parent_id = "SUNPOS_PT_Panel" | bl_parent_id = "SUNPOS_PT_Panel" | ||||
| ▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines | |||||
If p.show_surface is false, this prop is drawn in an other column, maybe the show_north col or the previous one. It needs its own column.