Anim Cupboard: Add Selection Sets to Animation Panel #81
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user