Add Easy_Weight
to Addons
#47
@ -73,8 +73,9 @@ class DeleteEmptyDeformGroups(Operator):
|
|||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
obj = context.object
|
obj = context.object
|
||||||
ob_is_mesh = obj and obj.type=='MESH'
|
ob_is_mesh = obj and obj.type=='MESH'
|
||||||
|
if not ob_is_mesh: return False
|
||||||
ob_has_arm_mod = 'ARMATURE' in (m.type for m in obj.modifiers)
|
ob_has_arm_mod = 'ARMATURE' in (m.type for m in obj.modifiers)
|
||||||
return all((ob_is_mesh, obj.vertex_groups, ob_has_arm_mod))
|
return obj.vertex_groups and ob_has_arm_mod
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
empty_groups = get_empty_deforming_vgroups(context.object)
|
empty_groups = get_empty_deforming_vgroups(context.object)
|
||||||
@ -208,8 +209,9 @@ class DeleteUnusedVertexGroups(Operator):
|
|||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
obj = context.object
|
obj = context.object
|
||||||
ob_is_mesh = obj and obj.type=='MESH'
|
ob_is_mesh = obj and obj.type=='MESH'
|
||||||
|
if not ob_is_mesh: return False
|
||||||
ob_has_groups = len(obj.vertex_groups) > 0
|
ob_has_groups = len(obj.vertex_groups) > 0
|
||||||
return all((ob_is_mesh, ob_has_groups))
|
return ob_has_groups
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
deleted_names = delete_unused_vgroups(context.object)
|
deleted_names = delete_unused_vgroups(context.object)
|
||||||
@ -228,9 +230,10 @@ class CreateMirrorGroups(Operator):
|
|||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
obj = context.object
|
obj = context.object
|
||||||
ob_is_mesh = obj and obj.type=='MESH'
|
ob_is_mesh = obj and obj.type=='MESH'
|
||||||
|
if not ob_is_mesh: return False
|
||||||
ob_has_arm_mod = 'ARMATURE' in (m.type for m in obj.modifiers)
|
ob_has_arm_mod = 'ARMATURE' in (m.type for m in obj.modifiers)
|
||||||
ob_has_mirror_mod = 'MIRROR' in (m.type for m in obj.modifiers)
|
ob_has_mirror_mod = 'MIRROR' in (m.type for m in obj.modifiers)
|
||||||
return all((ob_is_mesh, obj.vertex_groups, ob_has_arm_mod, ob_has_mirror_mod))
|
return obj.vertex_groups and ob_has_arm_mod and ob_has_mirror_mod
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
obj = context.object
|
obj = context.object
|
||||||
|
Loading…
Reference in New Issue
Block a user