Anim Cupboard: Add Selection Sets to Animation Panel #81
@ -1,5 +1,5 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from addon_utils import check, paths, enable
|
from addon_utils import check, paths
|
||||||
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
@ -8,14 +8,15 @@ import sys
|
|||||||
# RELEASE SCRIPTS: official scripts distributed in Blender releases
|
# RELEASE SCRIPTS: official scripts distributed in Blender releases
|
||||||
|
|
||||||
addon_enabled = False
|
addon_enabled = False
|
||||||
paths_list = paths()
|
|
||||||
addon_list = []
|
|
||||||
for path in paths_list:
|
def check_addon_enabled():
|
||||||
for mod_name, mod_path in bpy.path.module_names(path):
|
for path in paths():
|
||||||
if mod_name == 'bone_selection_sets':
|
for mod_name, mod_path in bpy.path.module_names(path):
|
||||||
is_enabled, is_loaded = check(mod_name)
|
if mod_name == 'bone_selection_sets':
|
||||||
addon_enabled = is_enabled
|
is_enabled, is_loaded = check(mod_name)
|
||||||
break
|
return is_enabled
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class POSE_PT_selection_sets_view3d(bpy.types.Panel):
|
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):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
if not addon_enabled:
|
if not check_addon_enabled():
|
||||||
layout.label(text="Addon 'Bone Selection Sets' not Enabled", icon="ERROR")
|
layout.label(text="Addon 'Bone Selection Sets' not Enabled", icon="ERROR")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user