weightpaint_clean, option to clean all vgroups
weightpaint_envelope_assign - can update active vgroup only weightpaint_normalize - fixups BKE_plugin_types - made the max length 32 ratehr then 16 so you can fill the text space in pupBlock
This commit is contained in:
@@ -78,6 +78,8 @@ def list2MeshWeight(me, groupNames, vWeightList):
|
||||
if len(vWeightList) != len(me.verts):
|
||||
raise 'Error, Lists Differ in size, do not modify your mesh.verts before updating the weights'
|
||||
|
||||
act_group = me.activeGroup
|
||||
|
||||
# Clear the vert group.
|
||||
currentGroupNames= me.getVertGroupNames()
|
||||
for group in currentGroupNames:
|
||||
@@ -100,6 +102,9 @@ def list2MeshWeight(me, groupNames, vWeightList):
|
||||
except:
|
||||
pass # vert group is not used anymore.
|
||||
|
||||
try: me.activeGroup = act_group
|
||||
except: pass
|
||||
|
||||
me.update()
|
||||
|
||||
|
||||
@@ -134,6 +139,8 @@ def dict2MeshWeight(me, groupNames, vWeightDict):
|
||||
if len(vWeightDict) != len(me.verts):
|
||||
raise 'Error, Lists Differ in size, do not modify your mesh.verts before updating the weights'
|
||||
|
||||
act_group = me.activeGroup
|
||||
|
||||
# Clear the vert group.
|
||||
currentGroupNames= me.getVertGroupNames()
|
||||
for group in currentGroupNames:
|
||||
@@ -159,6 +166,9 @@ def dict2MeshWeight(me, groupNames, vWeightDict):
|
||||
except:
|
||||
pass # vert group is not used anymore.
|
||||
|
||||
try: me.activeGroup = act_group
|
||||
except: pass
|
||||
|
||||
me.update()
|
||||
|
||||
def dictWeightMerge(dict_weights):
|
||||
@@ -290,6 +300,23 @@ def mesh2linkedFaces(me):
|
||||
return [fg for fg in face_groups if fg]
|
||||
|
||||
|
||||
|
||||
def getEdgeLoopsFromFaces(faces):
|
||||
'''
|
||||
Takes me.faces or a list of faces and returns the edge loops
|
||||
These edge loops are the edges that sit between quads, so they dont touch
|
||||
1 quad, not not connected will make 2 edge loops, both only containing 2 edges.
|
||||
'''
|
||||
|
||||
edges = {}
|
||||
|
||||
for f in faces:
|
||||
for i, edkey in enumerate(f.edge_keys):
|
||||
try: edges[edkey].append((f, i))
|
||||
except: edges[edkey] = [(f, i)]
|
||||
|
||||
|
||||
|
||||
def getMeshFromObject(ob, container_mesh=None, apply_modifiers=True, vgroups=True, scn=None):
|
||||
'''
|
||||
ob - the object that you want to get the mesh from
|
||||
|
||||
Reference in New Issue
Block a user