Anim Cupboard: Add Selection Sets to Animation Panel #81

Merged
Nick Alberelli merged 4 commits from feature/anim-cupboard-selection-set into main 2023-06-16 14:12:17 +02:00
Showing only changes of commit e4d3636e0d - Show all commits

View File

@ -1,5 +1,5 @@
import bpy
from addon_utils import check, paths, enable
from addon_utils import check, paths
import sys
@ -8,14 +8,15 @@ import sys
# RELEASE SCRIPTS: official scripts distributed in Blender releases
addon_enabled = False
paths_list = paths()
addon_list = []
for path in paths_list:
def check_addon_enabled():
for path in paths():
for mod_name, mod_path in bpy.path.module_names(path):
if mod_name == 'bone_selection_sets':
is_enabled, is_loaded = check(mod_name)
addon_enabled = is_enabled
break
return is_enabled
return False
class POSE_PT_selection_sets_view3d(bpy.types.Panel):
@ -30,7 +31,7 @@ class POSE_PT_selection_sets_view3d(bpy.types.Panel):
def draw(self, context):
layout = self.layout
if not addon_enabled:
if not check_addon_enabled():
layout.label(text="Addon 'Bone Selection Sets' not Enabled", icon="ERROR")
return