Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Commit

Permalink
polish for last version of Stamp Info
Browse files Browse the repository at this point in the history
  • Loading branch information
jatubi committed Jul 21, 2022
1 parent aa0817c commit 31b01fb
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 7 deletions.
4 changes: 2 additions & 2 deletions stampinfo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"author": "Julien Blervaque (aka Werwack) - Ubisoft",
"description": "Stamp scene information on the rendered images",
"blender": (3, 1, 0),
"version": (1, 3, 1),
"version": (1, 3, 2),
"location": "View3D > Stamp Info",
"wiki_url": "https://ubisoft-stampinfo.readthedocs.io",
"doc_url": "https://ubisoft-stampinfo.readthedocs.io",
"tracker_url": "https://github.com/ubisoft/stampinfo/issues",
"support": "COMMUNITY",
# "warning": "BETA Version",
Expand Down
44 changes: 40 additions & 4 deletions stampinfo/addon_prefs/addon_prefs_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ def draw_addon_prefs(self, context):
layout = self.layout
# layout = layout.column(align=False)

# Dependencies
###############
drawDependencies(context, layout)

# General
###############

splitFactor = 0.3

box = layout.box()
Expand All @@ -40,6 +47,11 @@ def draw_addon_prefs(self, context):
subCol.prop(self, "display_main_panel", text="Display Stamp Info panel in the 3D View tabs")
subCol.prop(self, "write_still")

drawGeneral(context, self, layout)

# Technical settings
###############

layout.separator(factor=0.5)
layout.label(text="Technical Settings:")
box = layout.box()
Expand All @@ -50,10 +62,6 @@ def draw_addon_prefs(self, context):
subCol.prop(self, "delete_temp_scene")
subCol.prop(self, "delete_temp_images")

# Dependencies
###############
drawDependencies(context, layout)

# Dev and debug
###############
box = layout.box()
Expand All @@ -79,3 +87,31 @@ def draw_addon_prefs(self, context):
rowRight.operator("uas_stamp_info.enable_debug", text="Turn Off").enable_debug = False
else:
rowRight.operator("uas_stamp_info.enable_debug", text="Turn On").enable_debug = True

if config.devDebug:
# initialization state
initRow = box.row()
initRow.prop(self, "isInitialized")


##################################################################
# Draw functions
##################################################################


def drawGeneral(context, prefs, layout):
box = layout.box()
# collapsable_panel(box, prefs, "addonPrefs_ui_expanded", text="UI")
# if prefs.addonPrefs_ui_expanded:
uiSplitFactor = 0.15

# column component here is technicaly not necessary but reduces the space between lines
col = box.column()

# split = col.split(factor=uiSplitFactor)
# rowLeft = split.row()
# rowLeft.separator()
# rowRight = split.row()
row = col.row()
row.separator(factor=3)
row.prop(prefs, "checkForNewAvailableVersion", text="Check for Updates")
2 changes: 1 addition & 1 deletion stampinfo/ui/dependencies_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ def drawDependencies(context, layout: bpy.types.UILayout, **kwargs):
subRow.alert = True
subRow.label(text="Module not found - Add-on cannot run normally")

box.separator()
box.separator(factor=0.2)
1 change: 1 addition & 0 deletions stampinfo/ui/prefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def draw(self, context):
row = layout.row(align=True)
row.operator("preferences.addon_show", text="Add-on Preferences...", icon="PREFERENCES").module = "stampinfo"

layout.separator()
row = layout.row(align=True)
row.operator(
"stampinfo.open_documentation_url", text="Documentation", icon="HELP"
Expand Down

0 comments on commit 31b01fb

Please sign in to comment.