Brushstroke Tools: Initial Version #328
@ -6,11 +6,11 @@ def update_resource_path(self, context):
|
||||
utils.update_asset_lib_path()
|
||||
class BSBST_OT_copy_resources_to_path(bpy.types.Operator):
|
||||
"""
|
||||
Remove the active Style Preset Library.
|
||||
Copy Resources to Directory.
|
||||
"""
|
||||
bl_idname = "brushstroke_tools.copy_resources"
|
||||
bl_label = "Copy Resources to Directory"
|
||||
bl_description = "Remove the modifier to the preset"
|
||||
bl_label = "Copy Resources"
|
||||
bl_description = "Copy addon resources to local directory"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
|
||||
update: bpy.props.BoolProperty(default=False)
|
||||
@ -71,6 +71,18 @@ class BSBST_preferences(bpy.types.AddonPreferences):
|
||||
split.label(text='The required resources were not found at the specified directory.', icon='ERROR')
|
||||
op = split.operator('brushstroke_tools.copy_resources', icon='IMPORT')
|
||||
op.update = False
|
||||
elif self.resource_path:
|
||||
lib_version = utils.read_lib_version()
|
||||
version_comp = utils.compare_versions(lib_version, utils.addon_version)
|
||||
if bool(version_comp):
|
||||
col.label(text=f"Version mismatch: Local Data ({'.'.join([str(i) for i in lib_version])}) {'>' if version_comp>0 else '<'} Addon ({'.'.join([str(i) for i in utils.addon_version])})", icon='ERROR')
|
||||
split = col.split(factor=0.75)
|
||||
if version_comp>0:
|
||||
split.label(text="Consider upgrading the addon or re-copying the data.")
|
||||
else:
|
||||
split.label(text="Consider upgrading re-copying the data.")
|
||||
op = split.operator('brushstroke_tools.copy_resources', icon='IMPORT')
|
||||
op.update = False
|
||||
|
||||
if self.import_method == 'LINK' and not self.resource_path:
|
||||
col.label(text='Linking the resources from the default addon directory is not recommended.', icon='ERROR')
|
||||
|
Loading…
Reference in New Issue
Block a user