Add Easy_Weight
to Addons
#47
@ -23,7 +23,7 @@ bl_info = {
|
|||||||
"tracker_url": "https://gitlab.com/blender/easy_weight/-/issues/new",
|
"tracker_url": "https://gitlab.com/blender/easy_weight/-/issues/new",
|
||||||
}
|
}
|
||||||
|
|
||||||
import bpy
|
import bpy, importlib
|
||||||
|
|
||||||
from . import smart_weight_transfer
|
from . import smart_weight_transfer
|
||||||
from . import force_apply_mirror
|
from . import force_apply_mirror
|
||||||
@ -42,6 +42,7 @@ modules = [
|
|||||||
|
|
||||||
def register():
|
def register():
|
||||||
for m in modules:
|
for m in modules:
|
||||||
|
importlib.reload(m)
|
||||||
m.register()
|
m.register()
|
||||||
|
|
||||||
def unregister():
|
def unregister():
|
||||||
|
@ -39,7 +39,7 @@ class EASYWEIGHT_OT_force_apply_mirror(bpy.types.Operator):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
ob = context.object
|
ob = context.object
|
||||||
if not ob and ob.type=='MESH': return False
|
if not ob or ob.type!='MESH': return False
|
||||||
for m in ob.modifiers:
|
for m in ob.modifiers:
|
||||||
if m.type=='MIRROR':
|
if m.type=='MIRROR':
|
||||||
return True
|
return True
|
||||||
|
@ -200,7 +200,7 @@ class EASYWEIGHT_OT_smart_weight_transfer(bpy.types.Operator):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return (context.object is not None)# and (context.object.mode=='WEIGHT_PAINT')
|
return context.object # and (context.object.mode=='WEIGHT_PAINT')
|
||||||
|
|
||||||
def draw_smart_weight_transfer(self, context):
|
def draw_smart_weight_transfer(self, context):
|
||||||
operator = self.layout.operator(EASYWEIGHT_OT_smart_weight_transfer.bl_idname, text=EASYWEIGHT_OT_smart_weight_transfer.bl_label)
|
operator = self.layout.operator(EASYWEIGHT_OT_smart_weight_transfer.bl_idname, text=EASYWEIGHT_OT_smart_weight_transfer.bl_label)
|
||||||
|
Loading…
Reference in New Issue
Block a user