Add Easy_Weight to Addons #47

Merged
Nick Alberelli merged 48 commits from feature/easy_weights into main 2023-05-17 22:13:57 +02:00
3 changed files with 4 additions and 3 deletions
Showing only changes of commit 974d73de91 - Show all commits

View File

@ -23,7 +23,7 @@ bl_info = {
"tracker_url": "https://gitlab.com/blender/easy_weight/-/issues/new",
}
import bpy
import bpy, importlib
from . import smart_weight_transfer
from . import force_apply_mirror
@ -42,6 +42,7 @@ modules = [
def register():
for m in modules:
importlib.reload(m)
m.register()
def unregister():

View File

@ -39,7 +39,7 @@ class EASYWEIGHT_OT_force_apply_mirror(bpy.types.Operator):
@classmethod
def poll(cls, context):
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:
if m.type=='MIRROR':
return True

View File

@ -200,7 +200,7 @@ class EASYWEIGHT_OT_smart_weight_transfer(bpy.types.Operator):
@classmethod
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):
operator = self.layout.operator(EASYWEIGHT_OT_smart_weight_transfer.bl_idname, text=EASYWEIGHT_OT_smart_weight_transfer.bl_label)