check list for file

1.5.1

- fix: eraser brush
- change: check file has custom check list in addon prefs
This commit is contained in:
Pullusb
2021-06-17 16:21:27 +02:00
parent 060fa8ff92
commit 2efbb36ddf
5 changed files with 202 additions and 77 deletions
Regular → Executable
+31 -4
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, 5, 0),
"version": (1, 5, 1),
"blender": (2, 91, 0),
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
"warning": "",
@@ -57,7 +57,7 @@ from .OP_pseudo_tint import GPT_OT_auto_tint_gp_layers
from . import UI_tools
from .properties import GP_PG_ToolsSettings
from .properties import GP_PG_ToolsSettings, GP_PG_FixSettings
from bpy.props import (FloatProperty,
BoolProperty,
@@ -122,6 +122,7 @@ class GPTB_prefs(bpy.types.AddonPreferences):
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"),
# ('KEYMAP', "Keymap", "customise the default keymap"),
),
@@ -180,7 +181,7 @@ class GPTB_prefs(bpy.types.AddonPreferences):
fps : IntProperty(
name='Frame Rate',
description="Fps of the project, Used to conform the file when you use Check file operator",
default=25,
default=24,
min=1,
max=10000
)
@@ -307,6 +308,9 @@ class GPTB_prefs(bpy.types.AddonPreferences):
description = "add ctrl",
default = False)
fixprops: bpy.props.PointerProperty(type = GP_PG_FixSettings)
## Temp cutter
# temp_cutter_use_shortcut: BoolProperty(
# name = "Use temp cutter Shortcut",
@@ -437,6 +441,26 @@ class GPTB_prefs(bpy.types.AddonPreferences):
box.label(text='Note: You can access user pref file and startup file in config folder')
box.operator("wm.path_open", text='Open config location').filepath = bpy.utils.user_resource('CONFIG')
if self.pref_tabs == 'CHECKS':
layout.label(text='Following checks will be made when clicking "Check File" button:')
col = layout.column()
# row = col.row()
col.prop(self.fixprops, 'lock_main_cam')
col.prop(self.fixprops, 'set_scene_res', text=f'Reset Scene Resolution (to {self.render_res_x}x{self.render_res_y})')
col.prop(self.fixprops, 'set_res_percentage')
col.prop(self.fixprops, 'set_fps', text=f'Reset FPS (to {self.fps})')
col.prop(self.fixprops, 'set_slider_n_sync')
col.prop(self.fixprops, 'set_cursor_type')
col.prop(self.fixprops, 'check_front_axis')
col.prop(self.fixprops, 'check_placement')
col.prop(self.fixprops, 'set_pivot_median_point')
col.prop(self.fixprops, 'disable_guide')
col.prop(self.fixprops, 'list_disabled_anim')
col.prop(self.fixprops, 'autokey_add_n_replace')
# 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)
@@ -448,8 +472,9 @@ class GPTB_prefs(bpy.types.AddonPreferences):
classes = (
GPTB_prefs,
GP_PG_FixSettings,
GP_PG_ToolsSettings,
GPTB_prefs,
GPT_OT_auto_tint_gp_layers,
)
@@ -458,6 +483,7 @@ GPT_OT_auto_tint_gp_layers,
def register():
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)
OP_helpers.register()
@@ -519,6 +545,7 @@ def unregister():
GP_colorize.unregister()## GP_guided_colorize.
OP_playblast_bg.unregister()
OP_playblast.unregister()
# del bpy.types.Scene.gpfixprops
del bpy.types.Scene.gptoolprops