From add777da2eba06b84ed01dd9f516ac5c20e8f6f0 Mon Sep 17 00:00:00 2001 From: Anas RAR Date: Sat, 4 Jul 2020 09:23:46 +0700 Subject: [PATCH] bump version and add dynamic version --- UE4WS_Credit.py | 4 +++- __init__.py | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/UE4WS_Credit.py b/UE4WS_Credit.py index 3345edb..cdd7622 100644 --- a/UE4WS_Credit.py +++ b/UE4WS_Credit.py @@ -8,6 +8,8 @@ class PANEL(Panel): bl_space_type = "VIEW_3D" bl_region_type = "UI" + addonVersion = None + def draw(self, context): layout = self.layout @@ -22,7 +24,7 @@ def draw(self, context): row.label(text="Workspace") row = col.row() row.alignment = "CENTER" - row.label(text= "Version : 1.2.1") + row.label(text= "Version : " + (".".join(str(x) for x in self.addonVersion))) # Big Button Documentation row = layout.row(align=True) row.scale_y = 1.5 diff --git a/__init__.py b/__init__.py index d0b807e..b861b56 100644 --- a/__init__.py +++ b/__init__.py @@ -16,7 +16,7 @@ "author" : "Anas RAR", "description" : "Addon For UE4 Workspace", "blender" : (2, 81, 0), - "version" : (1, 0, 1), + "version" : (1, 3, 2), "location" : "3D View > Tools", "warning" : "", "wiki_url": "https://github.com/anasrar", @@ -176,6 +176,8 @@ def register(): for X in AR_UE4WS_OperatorArray: if hasattr(X, "remote"): X.remote = remote_exec + if hasattr(X, "addonVersion"): + X.addonVersion = bl_info["version"] register_class(X) for P in AR_UE4WS_PropsArray: @@ -184,6 +186,8 @@ def register(): for C in AR_UE4WS_classes: if hasattr(C, "remote"): C.remote = remote_exec + if hasattr(C, "addonVersion"): + C.addonVersion = bl_info["version"] register_class(C) bpy.app.handlers.load_post.append(resetVariable)