Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sun_position')
-rw-r--r--sun_position/__init__.py39
-rw-r--r--sun_position/properties.py3
-rw-r--r--sun_position/translations.py493
-rw-r--r--sun_position/ui_sun.py45
4 files changed, 538 insertions, 42 deletions
diff --git a/sun_position/__init__.py b/sun_position/__init__.py
index 01e22df0..5b2a89ce 100644
--- a/sun_position/__init__.py
+++ b/sun_position/__init__.py
@@ -29,39 +29,32 @@ if "bpy" in locals():
importlib.reload(properties)
importlib.reload(ui_sun)
importlib.reload(hdr)
+ importlib.reload(translations)
else:
- from . import properties, ui_sun, hdr
+ from . import properties, ui_sun, hdr, translations
import bpy
+register_classes, unregister_classes = bpy.utils.register_classes_factory(
+ (properties.SunPosProperties,
+ properties.SunPosAddonPreferences, ui_sun.SUNPOS_OT_AddPreset,
+ ui_sun.SUNPOS_MT_Presets, ui_sun.SUNPOS_PT_Panel,
+ ui_sun.SUNPOS_PT_Location, ui_sun.SUNPOS_PT_Time, hdr.SUNPOS_OT_ShowHdr))
+
+
def register():
- bpy.utils.register_class(properties.SunPosProperties)
+ register_classes()
bpy.types.Scene.sun_pos_properties = (
bpy.props.PointerProperty(type=properties.SunPosProperties,
- name="Sun Position",
- description="Sun Position Settings"))
- bpy.utils.register_class(properties.SunPosAddonPreferences)
- bpy.utils.register_class(ui_sun.SUNPOS_OT_AddPreset)
- bpy.utils.register_class(ui_sun.SUNPOS_MT_Presets)
- bpy.utils.register_class(ui_sun.SUNPOS_PT_Panel)
- bpy.utils.register_class(ui_sun.SUNPOS_PT_Location)
- bpy.utils.register_class(ui_sun.SUNPOS_PT_Time)
- bpy.utils.register_class(hdr.SUNPOS_OT_ShowHdr)
-
+ name="Sun Position",
+ description="Sun Position Settings"))
bpy.app.handlers.frame_change_post.append(sun_calc.sun_handler)
-
+ bpy.app.translations.register(__name__, translations.translations_dict)
def unregister():
- bpy.utils.unregister_class(hdr.SUNPOS_OT_ShowHdr)
- bpy.utils.unregister_class(ui_sun.SUNPOS_PT_Panel)
- bpy.utils.unregister_class(ui_sun.SUNPOS_PT_Location)
- bpy.utils.unregister_class(ui_sun.SUNPOS_PT_Time)
- bpy.utils.unregister_class(ui_sun.SUNPOS_MT_Presets)
- bpy.utils.unregister_class(ui_sun.SUNPOS_OT_AddPreset)
- bpy.utils.unregister_class(properties.SunPosAddonPreferences)
- del bpy.types.Scene.sun_pos_properties
- bpy.utils.unregister_class(properties.SunPosProperties)
-
+ bpy.app.translations.unregister(__name__)
bpy.app.handlers.frame_change_post.remove(sun_calc.sun_handler)
+ del bpy.types.Scene.sun_pos_properties
+ unregister_classes()
diff --git a/sun_position/properties.py b/sun_position/properties.py
index ef3a21e3..af2734a4 100644
--- a/sun_position/properties.py
+++ b/sun_position/properties.py
@@ -136,7 +136,7 @@ class SunPosProperties(PropertyGroup):
object_collection_type: EnumProperty(
name="Display type",
- description="Show object group as sun motion",
+ description="Show object collection as sun motion",
items=(
('ANALEMMA', "Analemma", ""),
('DIURNAL', "Diurnal", ""),
@@ -174,6 +174,7 @@ class SunPosProperties(PropertyGroup):
update=sun_update)
bind_to_sun: BoolProperty(
+ name="Bind Texture to Sun",
description="If true, Environment texture moves with sun",
default=False,
update=sun_update)
diff --git a/sun_position/translations.py b/sun_position/translations.py
new file mode 100644
index 00000000..c50b797c
--- /dev/null
+++ b/sun_position/translations.py
@@ -0,0 +1,493 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# ##### BEGIN AUTOGENERATED I18N SECTION #####
+# NOTE: You can safely move around this auto-generated block (with the begin/end markers!),
+# and edit the translations by hand.
+# Just carefully respect the format of the tuple!
+
+# Tuple of tuples:
+# ((msgctxt, msgid), (sources, gen_comments), (lang, translation, (is_fuzzy, comments)), ...)
+translations_tuple = (
+ (("*", ""),
+ ((), ()),
+ ("fr_FR", "Project-Id-Version: Sun Position 3.1.2 (0)\n",
+ (False,
+ ("Blender's translation file (po format).",
+ "Copyright (C) 2022 The Blender Foundation.",
+ "This file is distributed under the same license as the Blender package.",
+ "Damien Picard <dam.pic@free.fr>, 2022."))),
+ ),
+ (("*", "Azimuth and elevation info"),
+ (("bpy.types.SunPosAddonPreferences.show_az_el",),
+ ()),
+ ("fr_FR", "Infos d’azimut et de hauteur",
+ (False, ())),
+ ),
+ (("*", "Show azimuth and solar elevation info"),
+ (("bpy.types.SunPosAddonPreferences.show_az_el",),
+ ()),
+ ("fr_FR", "Afficher les infos d’azimut et de hauteur du soleil",
+ (False, ())),
+ ),
+ (("*", "Daylight savings"),
+ (("bpy.types.SunPosAddonPreferences.show_daylight_savings",
+ "bpy.types.SunPosProperties.use_daylight_savings"),
+ ()),
+ ("fr_FR", "Heure d’été",
+ (False, ())),
+ ),
+ (("*", "Show daylight savings time choice"),
+ (("bpy.types.SunPosAddonPreferences.show_daylight_savings",),
+ ()),
+ ("fr_FR", "Afficher l’option de changement d’heure",
+ (False, ())),
+ ),
+ (("*", "D° M' S\""),
+ (("bpy.types.SunPosAddonPreferences.show_dms",),
+ ()),
+ ("fr_FR", "",
+ (False, ())),
+ ),
+ (("*", "Show lat/long degrees, minutes, seconds labels"),
+ (("bpy.types.SunPosAddonPreferences.show_dms",),
+ ()),
+ ("fr_FR", "Afficher les étiquettes de latitude et longitude en degrés, minutes, secondes",
+ (False, ())),
+ ),
+ (("*", "Show North"),
+ (("bpy.types.SunPosAddonPreferences.show_north",
+ "bpy.types.SunPosProperties.show_north"),
+ ()),
+ ("fr_FR", "Afficher le nord",
+ (False, ())),
+ ),
+ (("*", "Show north offset choice and slider"),
+ (("bpy.types.SunPosAddonPreferences.show_north",),
+ ()),
+ ("fr_FR", "Afficher l’option et le curseur de décalage du nord",
+ (False, ())),
+ ),
+ (("*", "Refraction"),
+ (("bpy.types.SunPosAddonPreferences.show_refraction",),
+ ()),
+ ("fr_FR", "Réfraction",
+ (False, ())),
+ ),
+ (("*", "Show sun refraction choice"),
+ (("bpy.types.SunPosAddonPreferences.show_refraction",),
+ ()),
+ ("fr_FR", "Afficher l’option de réfraction du soleil",
+ (False, ())),
+ ),
+ (("*", "Sunrise and sunset info"),
+ (("bpy.types.SunPosAddonPreferences.show_rise_set",),
+ ()),
+ ("fr_FR", "Infos de lever et coucher",
+ (False, ())),
+ ),
+ (("*", "Show sunrise and sunset labels"),
+ (("bpy.types.SunPosAddonPreferences.show_rise_set",),
+ ()),
+ ("fr_FR", "Afficher les informations de lever et coucher du soleil",
+ (False, ())),
+ ),
+ (("*", "Time and place presets"),
+ (("bpy.types.SunPosAddonPreferences.show_time_place",),
+ ()),
+ ("fr_FR", "Préréglages d’heure et de lieu",
+ (False, ())),
+ ),
+ (("*", "Show time/place presets"),
+ (("bpy.types.SunPosAddonPreferences.show_time_place",),
+ ()),
+ ("fr_FR", "Afficher les préréglages d’heure et de lieu",
+ (False, ())),
+ ),
+ (("*", "Sun Position"),
+ (("bpy.types.Scene.sun_pos_properties",
+ "bpy.types.SUNPOS_PT_Panel",
+ "Add-on Sun Position info: name"),
+ ()),
+ ("fr_FR", "Position du Soleil",
+ (False, ())),
+ ),
+ (("*", "Sun Position Settings"),
+ (("bpy.types.Scene.sun_pos_properties",),
+ ()),
+ ("fr_FR", "Options de Position du Soleil",
+ (False, ())),
+ ),
+ (("*", "Sun Position Presets"),
+ (("bpy.types.SUNPOS_MT_Presets",),
+ ()),
+ ("fr_FR", "Préréglages de position du Soleil",
+ (False, ())),
+ ),
+ (("Operator", "Sync Sun to Texture"),
+ (("bpy.types.WORLD_OT_sunpos_show_hdr",),
+ ()),
+ ("fr_FR", "Synchroniser Soleil et texture",
+ (False, ())),
+ ),
+ (("*", "UTC zone"),
+ (("bpy.types.SunPosProperties.UTC_zone",),
+ ()),
+ ("fr_FR", "Fuseau horaire",
+ (False, ())),
+ ),
+ (("*", "Time zone: Difference from Greenwich, England in hours"),
+ (("bpy.types.SunPosProperties.UTC_zone",),
+ ()),
+ ("fr_FR", "Fuseau horaire : différence avec Greenwich, Angleterre, en heures",
+ (False, ())),
+ ),
+ (("*", "Bind Texture to Sun"),
+ (("bpy.types.SunPosProperties.bind_to_sun",
+ "scripts/addons/sun_position/ui_sun.py:119"),
+ ()),
+ ("fr_FR", "Lier la texture au Soleil",
+ (False, ())),
+ ),
+ (("*", "If true, Environment texture moves with sun"),
+ (("bpy.types.SunPosProperties.bind_to_sun",),
+ ()),
+ ("fr_FR", "Si actif, la texture d’environnement tourne avec le Soleil",
+ (False, ())),
+ ),
+ (("*", "Enter coordinates"),
+ (("bpy.types.SunPosProperties.co_parser",),
+ ()),
+ ("fr_FR", "Saisir coordonnées",
+ (False, ())),
+ ),
+ (("*", "Enter coordinates from an online map"),
+ (("bpy.types.SunPosProperties.co_parser",),
+ ()),
+ ("fr_FR", "Saisir des coordonnées depuis une carte",
+ (False, ())),
+ ),
+ (("*", "Day"),
+ (("bpy.types.SunPosProperties.day",),
+ ()),
+ ("fr_FR", "Jour",
+ (False, ())),
+ ),
+ (("*", "Day of year"),
+ (("bpy.types.SunPosProperties.day_of_year",),
+ ()),
+ ("fr_FR", "Jour de l’année",
+ (False, ())),
+ ),
+ (("*", "Rotation angle of sun and environment texture"),
+ (("bpy.types.SunPosProperties.hdr_azimuth",),
+ ()),
+ ("fr_FR", "Angle de rotation du Soleil et de la texture d’environnement",
+ (False, ())),
+ ),
+ (("*", "Elevation"),
+ (("bpy.types.SunPosProperties.hdr_elevation",),
+ ()),
+ ("fr_FR", "Hauteur",
+ (False, ())),
+ ),
+ (("*", "Elevation angle of sun"),
+ (("bpy.types.SunPosProperties.hdr_elevation",),
+ ()),
+ ("fr_FR", "Angle de hauteur du Soleil",
+ (False, ())),
+ ),
+ (("*", "Name of texture to use. World nodes must be enabled and color set to Environment Texture"),
+ (("bpy.types.SunPosProperties.hdr_texture",),
+ ()),
+ ("fr_FR", "Nom de la texture à utiliser. Les nœuds de shader du monde doivent être activés, et la couleur utiliser une texture d’environnement",
+ (False, ())),
+ ),
+ (("*", "Latitude"),
+ (("bpy.types.SunPosProperties.latitude",),
+ ()),
+ ("fr_FR", "Latitude",
+ (False, ())),
+ ),
+ (("*", "Latitude: (+) Northern (-) Southern"),
+ (("bpy.types.SunPosProperties.latitude",),
+ ()),
+ ("fr_FR", "Latitude : (+) nord (-) sud",
+ (False, ())),
+ ),
+ (("*", "Longitude"),
+ (("bpy.types.SunPosProperties.longitude",),
+ ()),
+ ("fr_FR", "Longitude",
+ (False, ())),
+ ),
+ (("*", "Longitude: (-) West of Greenwich (+) East of Greenwich"),
+ (("bpy.types.SunPosProperties.longitude",),
+ ()),
+ ("fr_FR", "Longitude : (-) ouest depuis Greenwich (+) est depuis Greenwich",
+ (False, ())),
+ ),
+ (("*", "Month"),
+ (("bpy.types.SunPosProperties.month",),
+ ()),
+ ("fr_FR", "Mois",
+ (False, ())),
+ ),
+ (("*", "North Offset"),
+ (("bpy.types.SunPosProperties.north_offset",),
+ ()),
+ ("fr_FR", "Décalage du nord",
+ (False, ())),
+ ),
+ (("*", "Rotate the scene to choose North direction"),
+ (("bpy.types.SunPosProperties.north_offset",),
+ ()),
+ ("fr_FR", "Tourner la scène pour choisir la direction du nord",
+ (False, ())),
+ ),
+ (("*", "Collection of objects used to visualize sun motion"),
+ (("bpy.types.SunPosProperties.object_collection",),
+ ()),
+ ("fr_FR", "Collection d’objets utilisée pour visualiser la trajectoire du Soleil",
+ (False, ())),
+ ),
+ (("*", "Show object collection as sun motion"),
+ (("bpy.types.SunPosProperties.object_collection_type",),
+ ()),
+ ("fr_FR", "Afficher la collection en tant que",
+ (False, ())),
+ ),
+ (("*", "Analemma"),
+ (("bpy.types.SunPosProperties.object_collection_type:'ANALEMMA'",),
+ ()),
+ ("fr_FR", "Analemme",
+ (False, ())),
+ ),
+ (("*", "Diurnal"),
+ (("bpy.types.SunPosProperties.object_collection_type:'DIURNAL'",),
+ ()),
+ ("fr_FR", "Diurne",
+ (False, ())),
+ ),
+ (("*", "Draw line pointing north"),
+ (("bpy.types.SunPosProperties.show_north",),
+ ()),
+ ("fr_FR", "Afficher une ligne pointant le nord",
+ (False, ())),
+ ),
+ (("*", "Name of sky texture to be used"),
+ (("bpy.types.SunPosProperties.sky_texture",),
+ ()),
+ ("fr_FR", "Nom de la texture à utiliser",
+ (False, ())),
+ ),
+ (("*", "Distance to sun from origin"),
+ (("bpy.types.SunPosProperties.sun_distance",),
+ ()),
+ ("fr_FR", "Distance entre l’origine et le Soleil",
+ (False, ())),
+ ),
+ (("*", "Sun Object"),
+ (("bpy.types.SunPosProperties.sun_object",
+ "scripts/addons/sun_position/ui_sun.py:101"),
+ ()),
+ ("fr_FR", "Objet soleil",
+ (False, ())),
+ ),
+ (("*", "Sun object to set in the scene"),
+ (("bpy.types.SunPosProperties.sun_object",),
+ ()),
+ ("fr_FR", "Objet soleil à utiliser dans la scène",
+ (False, ())),
+ ),
+ (("*", "Time of the day"),
+ (("bpy.types.SunPosProperties.time",),
+ ()),
+ ("fr_FR", "Heure du jour",
+ (False, ())),
+ ),
+ (("*", "Time Spread"),
+ (("bpy.types.SunPosProperties.time_spread",),
+ ()),
+ ("fr_FR", "Plage horaire",
+ (False, ())),
+ ),
+ (("*", "Time period in which to spread object collection"),
+ (("bpy.types.SunPosProperties.time_spread",),
+ ()),
+ ("fr_FR", "Plage horaire à visualiser par les objets de la collection",
+ (False, ())),
+ ),
+ (("*", "Usage mode"),
+ (("bpy.types.SunPosProperties.usage_mode",),
+ ()),
+ ("fr_FR", "Mode",
+ (False, ())),
+ ),
+ (("*", "Operate in normal mode or environment texture mode"),
+ (("bpy.types.SunPosProperties.usage_mode",),
+ ()),
+ ("fr_FR", "Passer en mode normal ou texture d’environnement",
+ (False, ())),
+ ),
+ (("*", "Sun + HDR texture"),
+ (("bpy.types.SunPosProperties.usage_mode:'HDR'",),
+ ()),
+ ("fr_FR", "Soleil + texture HDRI",
+ (False, ())),
+ ),
+ (("*", "Use day of year"),
+ (("bpy.types.SunPosProperties.use_day_of_year",),
+ ()),
+ ("fr_FR", "Utiliser le jour de l’année",
+ (False, ())),
+ ),
+ (("*", "Use a single value for day of year"),
+ (("bpy.types.SunPosProperties.use_day_of_year",),
+ ()),
+ ("fr_FR", "Utiliser une seule valeur pour le jour de l’année",
+ (False, ())),
+ ),
+ (("*", "Daylight savings time adds 1 hour to standard time"),
+ (("bpy.types.SunPosProperties.use_daylight_savings",),
+ ()),
+ ("fr_FR", "L’heure d’été ajoute une heure à l’heure standard",
+ (False, ())),
+ ),
+ (("*", "Use refraction"),
+ (("bpy.types.SunPosProperties.use_refraction",),
+ ()),
+ ("fr_FR", "Utiliser la réfraction",
+ (False, ())),
+ ),
+ (("*", "Show apparent sun position due to refraction"),
+ (("bpy.types.SunPosProperties.use_refraction",),
+ ()),
+ ("fr_FR", "Afficher la position apparente du Soleil due à la réfraction",
+ (False, ())),
+ ),
+ (("*", "Year"),
+ (("bpy.types.SunPosProperties.year",),
+ ()),
+ ("fr_FR", "Année",
+ (False, ())),
+ ),
+ (("*", "Could not find 3D View"),
+ (("scripts/addons/sun_position/hdr.py:262",),
+ ()),
+ ("fr_FR", "Impossible de trouver la vue 3D",
+ (False, ())),
+ ),
+ (("*", "Please select an Environment Texture node"),
+ (("scripts/addons/sun_position/hdr.py:268",),
+ ()),
+ ("fr_FR", "Veuillez utiliser un nœud de texture d’environnement",
+ (False, ())),
+ ),
+ (("*", "Unknown projection"),
+ (("scripts/addons/sun_position/hdr.py:180",),
+ ()),
+ ("fr_FR", "Projection inconnue",
+ (False, ())),
+ ),
+ (("*", "Show options or labels:"),
+ (("scripts/addons/sun_position/properties.py:242",),
+ ()),
+ ("fr_FR", "Afficher les options et étiquettes :",
+ (False, ())),
+ ),
+ (("*", "Usage Mode"),
+ (("scripts/addons/sun_position/ui_sun.py:71",),
+ ()),
+ ("fr_FR", "Mode",
+ (False, ())),
+ ),
+ (("*", "Environment Texture"),
+ (("scripts/addons/sun_position/ui_sun.py:85",),
+ ()),
+ ("fr_FR", "Texture d’environnement",
+ (False, ())),
+ ),
+ (("*", "Enter Coordinates"),
+ (("scripts/addons/sun_position/ui_sun.py:174",),
+ ()),
+ ("fr_FR", "Saisir coordonnées",
+ (False, ())),
+ ),
+ (("*", "Local:"),
+ (("scripts/addons/sun_position/ui_sun.py:269",),
+ ()),
+ ("fr_FR", "Locale :",
+ (False, ())),
+ ),
+ (("*", "UTC:"),
+ (("scripts/addons/sun_position/ui_sun.py:272",),
+ ()),
+ ("fr_FR", "UTC : ",
+ (False, ())),
+ ),
+ (("*", "Please select World in the World panel."),
+ (("scripts/addons/sun_position/ui_sun.py:95",
+ "scripts/addons/sun_position/ui_sun.py:153"),
+ ()),
+ ("fr_FR", "Veuillez sélectionner le monde dans le panneau Monde",
+ (False, ())),
+ ),
+ (("*", "Release binding"),
+ (("scripts/addons/sun_position/ui_sun.py:116",),
+ ()),
+ ("fr_FR", "Annuler le lien",
+ (False, ())),
+ ),
+ (("*", "Azimuth:"),
+ (("scripts/addons/sun_position/ui_sun.py:205",),
+ ()),
+ ("fr_FR", "Azimut :",
+ (False, ())),
+ ),
+ (("*", "Elevation:"),
+ (("scripts/addons/sun_position/ui_sun.py:208",),
+ ()),
+ ("fr_FR", "Hauteur :",
+ (False, ())),
+ ),
+ (("*", "Sunrise:"),
+ (("scripts/addons/sun_position/ui_sun.py:284",),
+ ()),
+ ("fr_FR", "Lever : ",
+ (False, ())),
+ ),
+ (("*", "Sunset:"),
+ (("scripts/addons/sun_position/ui_sun.py:287",),
+ ()),
+ ("fr_FR", "Coucher : ",
+ (False, ())),
+ ),
+ (("*", "Please activate Use Nodes in the World panel."),
+ (("scripts/addons/sun_position/ui_sun.py:92",
+ "scripts/addons/sun_position/ui_sun.py:150"),
+ ()),
+ ("fr_FR", "Veuillez activer Utiliser nœuds dans le panneau Monde",
+ (False, ())),
+ ),
+ (("*", "World > Sun Position"),
+ (("Add-on Sun Position info: location",),
+ ()),
+ ("fr_FR", "Monde > Position du Soleil",
+ (False, ())),
+ ),
+ (("*", "Show sun position with objects and/or sky texture"),
+ (("Add-on Sun Position info: description",),
+ ()),
+ ("fr_FR", "Afficher la position du Soleil avec des objets ou une texture de ciel",
+ (False, ())),
+ ),
+)
+
+translations_dict = {}
+for msg in translations_tuple:
+ key = msg[0]
+ for lang, trans, (is_fuzzy, comments) in msg[2:]:
+ if trans and not is_fuzzy:
+ translations_dict.setdefault(lang, {})[key] = trans
+
+# ##### END AUTOGENERATED I18N SECTION #####
diff --git a/sun_position/ui_sun.py b/sun_position/ui_sun.py
index 1f4f8f34..c6eebc33 100644
--- a/sun_position/ui_sun.py
+++ b/sun_position/ui_sun.py
@@ -112,11 +112,11 @@ class SUNPOS_PT_Panel(bpy.types.Panel):
col = flow.column(align=True)
if sp.bind_to_sun:
- prop_text="Release binding"
+ col.prop(sp, "bind_to_sun", toggle=True, icon="CONSTRAINT",
+ text="Release binding")
else:
- prop_text="Bind Texture to Sun "
- col.prop(sp, "bind_to_sun", toggle=True, icon="CONSTRAINT",
- text=prop_text)
+ col.prop(sp, "bind_to_sun", toggle=True, icon="CONSTRAINT",
+ text="Bind Texture to Sun")
row = col.row(align=True)
row.enabled = not sp.bind_to_sun
@@ -201,14 +201,12 @@ class SUNPOS_PT_Location(bpy.types.Panel):
if p.show_az_el:
col = flow.column(align=True)
- row = col.row()
- row.alignment = 'RIGHT'
- row.label(text="Azimuth: " +
- str(round(sun.azimuth, 3)) + "°")
- row = col.row()
- row.alignment = 'RIGHT'
- row.label(text="Elevation: " +
- str(round(sun.elevation, 3)) + "°")
+ split = col.split(factor=0.4, align=True)
+ split.label(text="Azimuth:")
+ split.label(text=str(round(sun.azimuth, 3)) + "°")
+ split = col.split(factor=0.4, align=True)
+ split.label(text="Elevation:")
+ split.label(text=str(round(sun.elevation, 3)) + "°")
col.separator()
if p.show_refraction:
@@ -266,16 +264,27 @@ class SUNPOS_PT_Time(bpy.types.Panel):
sp.longitude,
sp.UTC_zone)
col.alignment = 'CENTER'
- col.label(text="Local: " + lt, icon='TIME')
- col.label(text=" UTC: " + ut, icon='PREVIEW_RANGE')
+
+ split = col.split(factor=0.5, align=True)
+ split.label(text="Local:", icon='TIME')
+ split.label(text=lt)
+ split = col.split(factor=0.5, align=True)
+ split.label(text="UTC:", icon='PREVIEW_RANGE')
+ split.label(text=ut)
col.separator()
+
col = flow.column(align=True)
col.alignment = 'CENTER'
if p.show_rise_set:
sr = format_hms(sun.sunrise.time)
ss = format_hms(sun.sunset.time)
- tsr = "Sunrise: " + sr
- tss = " Sunset: " + ss
- col.label(text=tsr, icon='LIGHT_SUN')
- col.label(text=tss, icon='SOLO_ON')
+
+ split = col.split(factor=0.5, align=True)
+ split.label(text="Sunrise:", icon='LIGHT_SUN')
+ split.label(text=sr)
+ split = col.split(factor=0.5, align=True)
+ split.label(text="Sunset:", icon='SOLO_ON')
+ split.label(text=ss)
+
+ col.separator()