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
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
- 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.
**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

View File

@ -1,4 +1,4 @@
from . import addon_updater_ops
# from . import addon_updater_ops
from .utils import get_addon_prefs
import bpy
from pathlib import Path
@ -44,9 +44,10 @@ class GPTB_PT_sidebar_panel(bpy.types.Panel):
def draw(self, context):
layout = self.layout
# layout.use_property_split = True
prefs = get_addon_prefs()
rd = context.scene.render
# check for update
addon_updater_ops.check_for_update_background()
# addon_updater_ops.check_for_update_background()
# layout.label(text='View options:')
## 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
## Check base palette
if not all(x in [m.name for m in context.object.data.materials if m] for x in ("line", "invisible")):
box = col.box()
box.label(text='Missing base material setup', icon='INFO')
box.operator('gp.load_default_palette')
if prefs.warn_base_palette and prefs.palette_path:
if not all(x in [m.name for m in context.object.data.materials if m] for x in ("line", "invisible")):
box = col.box()
box.label(text='Missing base material setup', icon='INFO')
box.operator('gp.load_default_palette')
else:
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)
# 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)

View File

@ -15,7 +15,7 @@ bl_info = {
"name": "GP toolbox",
"description": "Set of tools for Grease Pencil in animation production",
"author": "Samuel Bernou, Christophe Seux",
"version": (1, 6, 0),
"version": (1, 6, 1),
"blender": (2, 91, 0),
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
"warning": "",
@ -24,7 +24,7 @@ bl_info = {
"category": "3D View",
}
from . import addon_updater_ops
# from . import addon_updater_ops
from .utils import *
from .functions import *
@ -124,48 +124,12 @@ class GPTB_prefs(bpy.types.AddonPreferences):
pref_tabs : EnumProperty(
items=(('PREF', "Preferences", "Change some preferences of the modal"),
('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"),
('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"),
),
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
@ -212,7 +176,13 @@ class GPTB_prefs(bpy.types.AddonPreferences):
palette_path : StringProperty(
name="Palettes directory",
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(
name="Use Project Brushes",
@ -364,6 +334,7 @@ class GPTB_prefs(bpy.types.AddonPreferences):
## Palette
subbox.prop(self, 'use_env_palettes', text='Use Palettes Environnement Path')
subbox.prop(self, 'palette_path')
subbox.prop(self, 'warn_base_palette')
## Brushes
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")
# row.label(text='lock the active camera if not a draw cam (and if not "layout" in blendfile name)')
if self.pref_tabs == 'UPDATE':
addon_updater_ops.update_settings_ui(self, context)
# if self.pref_tabs == 'UPDATE':
# addon_updater_ops.update_settings_ui(self, context)
@ -543,7 +514,7 @@ GPT_OT_auto_tint_gp_layers,
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
for cls in classes:
bpy.utils.register_class(cls)
@ -586,7 +557,7 @@ def unregister():
bpy.app.handlers.save_pre.remove(remap_relative)
keymaps.unregister()
addon_updater_ops.unregister()
# addon_updater_ops.unregister()
for cls in reversed(classes):
bpy.utils.unregister_class(cls)
UI_tools.unregister()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff