removed updater

1.6.1

- removed: Auto Updater that was failing since 2.93
- prefs: add a checkbox to disable the "load base palette button" in UI.
gpv2
Pullusb 2021-08-23 14:50:00 +02:00
parent e6ff824684
commit 408f017e81
6 changed files with 31 additions and 3229 deletions

View File

@ -1,5 +1,10 @@
# Changelog # Changelog
1.6.1
- removed: Auto Updater that was failing since 2.93
- prefs: add a checkbox to disable the "load base palette button" in UI.
1.6.0 1.6.0
- feat: Namespace upgrade - feat: Namespace upgrade

View File

@ -127,7 +127,7 @@ TODO: profiter du système de render layers (per layer) pour faire un meilleur b
**Check links** (pop une fenêtre) - Permet de lister les liens de la scène, voir si il y en a des cassés et ouvrir le dossier d'un lien existant. **Check links** (pop une fenêtre) - Permet de lister les liens de la scène, voir si il y en a des cassés et ouvrir le dossier d'un lien existant.
**Auto update** - Un système de mise à jour est diponible dans les addon prefs, autocheck possible (désactivé par défaut). Utilise [CGcookie addon updater](https://github.com/CGCookie/blender-addon-updater)) <!-- **Auto update** - Un système de mise à jour est diponible dans les addon prefs, autocheck possible (désactivé par défaut). Utilise [CGcookie addon updater](https://github.com/CGCookie/blender-addon-updater)) -->
## raccourci supplémentaires ## raccourci supplémentaires

View File

@ -1,4 +1,4 @@
from . import addon_updater_ops # from . import addon_updater_ops
from .utils import get_addon_prefs from .utils import get_addon_prefs
import bpy import bpy
from pathlib import Path from pathlib import Path
@ -44,9 +44,10 @@ class GPTB_PT_sidebar_panel(bpy.types.Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
# layout.use_property_split = True # layout.use_property_split = True
prefs = get_addon_prefs()
rd = context.scene.render rd = context.scene.render
# check for update # check for update
addon_updater_ops.check_for_update_background() # addon_updater_ops.check_for_update_background()
# layout.label(text='View options:') # layout.label(text='View options:')
## flip X cam ## flip X cam
@ -147,10 +148,11 @@ class GPTB_PT_sidebar_panel(bpy.types.Panel):
row.operator('gp.rename_data_from_obj', text='Rename all').rename_all = True row.operator('gp.rename_data_from_obj', text='Rename all').rename_all = True
## Check base palette ## Check base palette
if not all(x in [m.name for m in context.object.data.materials if m] for x in ("line", "invisible")): if prefs.warn_base_palette and prefs.palette_path:
box = col.box() if not all(x in [m.name for m in context.object.data.materials if m] for x in ("line", "invisible")):
box.label(text='Missing base material setup', icon='INFO') box = col.box()
box.operator('gp.load_default_palette') box.label(text='Missing base material setup', icon='INFO')
box.operator('gp.load_default_palette')
else: else:
col.label(text='No GP object selected') col.label(text='No GP object selected')
@ -177,7 +179,7 @@ class GPTB_PT_sidebar_panel(bpy.types.Panel):
col.prop(context.scene.gptoolprops, 'cursor_follow', text=text, icon=icon) col.prop(context.scene.gptoolprops, 'cursor_follow', text=text, icon=icon)
# Mention update as notice # Mention update as notice
addon_updater_ops.update_notice_box_ui(self, context) # addon_updater_ops.update_notice_box_ui(self, context)
# row = layout.row(align=False) # row = layout.row(align=False)

View File

@ -15,7 +15,7 @@ bl_info = {
"name": "GP toolbox", "name": "GP toolbox",
"description": "Set of tools for Grease Pencil in animation production", "description": "Set of tools for Grease Pencil in animation production",
"author": "Samuel Bernou, Christophe Seux", "author": "Samuel Bernou, Christophe Seux",
"version": (1, 6, 0), "version": (1, 6, 1),
"blender": (2, 91, 0), "blender": (2, 91, 0),
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties", "location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
"warning": "", "warning": "",
@ -24,7 +24,7 @@ bl_info = {
"category": "3D View", "category": "3D View",
} }
from . import addon_updater_ops # from . import addon_updater_ops
from .utils import * from .utils import *
from .functions import * from .functions import *
@ -124,48 +124,12 @@ class GPTB_prefs(bpy.types.AddonPreferences):
pref_tabs : EnumProperty( pref_tabs : EnumProperty(
items=(('PREF', "Preferences", "Change some preferences of the modal"), items=(('PREF', "Preferences", "Change some preferences of the modal"),
('MAN_OPS', "Operator", "Operator to add Manually"), ('MAN_OPS', "Operator", "Operator to add Manually"),
# ('TUTO', "Tutorial", "How to use the tool"),
('CHECKS', "Check List", "Customise what should happend when hitting 'check fix' button"), ('CHECKS', "Check List", "Customise what should happend when hitting 'check fix' button"),
('UPDATE', "Update", "Check and apply updates"), # ('UPDATE', "Update", "Check and apply updates"),
# ('TUTO', "Tutorial", "How to use the tool"),
# ('KEYMAP', "Keymap", "customise the default keymap"), # ('KEYMAP', "Keymap", "customise the default keymap"),
), ),
default='PREF') default='PREF')
## addon pref updater props
auto_check_update : BoolProperty(
name="Auto-check for Update",
description="If enabled, auto-check for updates using an interval",
default=False,
)
updater_intrval_months : IntProperty(
name='Months',
description="Number of months between checking for updates",
default=0,
min=0
)
updater_intrval_days : IntProperty(
name='Days',
description="Number of days between checking for updates",
default=7,
min=0,
max=31
)
updater_intrval_hours : IntProperty(
name='Hours',
description="Number of hours between checking for updates",
default=0,
min=0,
max=23
)
updater_intrval_minutes : IntProperty(
name='Minutes',
description="Number of minutes between checking for updates",
default=0,
min=0,
max=59
)
## addon prefs ## addon prefs
@ -212,7 +176,13 @@ class GPTB_prefs(bpy.types.AddonPreferences):
palette_path : StringProperty( palette_path : StringProperty(
name="Palettes directory", name="Palettes directory",
description="Path to palette containing palette.json files to save and load", description="Path to palette containing palette.json files to save and load",
default="//", maxlen=0, subtype='DIR_PATH')#, update = set_palette_path default="", maxlen=0, subtype='DIR_PATH')#, update = set_palette_path
warn_base_palette : BoolProperty(
name="Warn if base palette isn't loaded",
description="Display a button to load palette base.json if current grease pencil has a no 'line' and 'invisible' materials",
default=True,
)
use_env_brushes : BoolProperty( use_env_brushes : BoolProperty(
name="Use Project Brushes", name="Use Project Brushes",
@ -364,6 +334,7 @@ class GPTB_prefs(bpy.types.AddonPreferences):
## Palette ## Palette
subbox.prop(self, 'use_env_palettes', text='Use Palettes Environnement Path') subbox.prop(self, 'use_env_palettes', text='Use Palettes Environnement Path')
subbox.prop(self, 'palette_path') subbox.prop(self, 'palette_path')
subbox.prop(self, 'warn_base_palette')
## Brushes ## Brushes
subbox.prop(self, 'use_env_brushes', text='Use Brushes Environnement Path') subbox.prop(self, 'use_env_brushes', text='Use Brushes Environnement Path')
@ -490,8 +461,8 @@ class GPTB_prefs(bpy.types.AddonPreferences):
col.prop(self.fixprops, "lock_object_mode") col.prop(self.fixprops, "lock_object_mode")
# row.label(text='lock the active camera if not a draw cam (and if not "layout" in blendfile name)') # row.label(text='lock the active camera if not a draw cam (and if not "layout" in blendfile name)')
if self.pref_tabs == 'UPDATE': # if self.pref_tabs == 'UPDATE':
addon_updater_ops.update_settings_ui(self, context) # addon_updater_ops.update_settings_ui(self, context)
@ -543,7 +514,7 @@ GPT_OT_auto_tint_gp_layers,
def register(): def register():
addon_updater_ops.register(bl_info) # addon_updater_ops.register(bl_info)
# bpy.types.Scene.gpfixprops = bpy.props.PointerProperty(type = GP_PG_FixSettings) # used in prefs # bpy.types.Scene.gpfixprops = bpy.props.PointerProperty(type = GP_PG_FixSettings) # used in prefs
for cls in classes: for cls in classes:
bpy.utils.register_class(cls) bpy.utils.register_class(cls)
@ -586,7 +557,7 @@ def unregister():
bpy.app.handlers.save_pre.remove(remap_relative) bpy.app.handlers.save_pre.remove(remap_relative)
keymaps.unregister() keymaps.unregister()
addon_updater_ops.unregister() # addon_updater_ops.unregister()
for cls in reversed(classes): for cls in reversed(classes):
bpy.utils.unregister_class(cls) bpy.utils.unregister_class(cls)
UI_tools.unregister() UI_tools.unregister()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff